Browse code

- extend debugging with result type information

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@3968 689a6050-402a-0410-94f2-e92a70836424

Henning Westerholt authored on 01/04/2008 08:54:30
Showing 1 changed files
... ...
@@ -87,34 +87,40 @@ int db_mysql_get_columns(const db_con_t* _h, db_res_t* _r)
87 87
 			case MYSQL_TYPE_DECIMAL:
88 88
 			case MYSQL_TYPE_NEWDECIMAL:
89 89
 			case MYSQL_TYPE_TIMESTAMP:
90
+				LM_DBG("use DB_INT result type");
90 91
 				RES_TYPES(_r)[col] = DB_INT;
91 92
 				break;
92 93
 
93 94
 			case MYSQL_TYPE_FLOAT:
94 95
 			case MYSQL_TYPE_DOUBLE:
96
+				LM_DBG("use DB_DOUBLE result type");
95 97
 				RES_TYPES(_r)[col] = DB_DOUBLE;
96 98
 				break;
97 99
 
98 100
 			case MYSQL_TYPE_DATETIME:
101
+				LM_DBG("use DB_DATETIME result type");
99 102
 				RES_TYPES(_r)[col] = DB_DATETIME;
100 103
 				break;
101 104
 
102 105
 			case MYSQL_TYPE_BLOB:
106
+				LM_DBG("use DB_BLOB result type");
103 107
 				RES_TYPES(_r)[col] = DB_BLOB;
104 108
 				break;
105 109
 
106 110
 			case FIELD_TYPE_SET:
111
+				LM_DBG("use DB_BITMAP result type");
107 112
 				RES_TYPES(_r)[col] = DB_BITMAP;
108 113
 				break;
109 114
 
110 115
 			case MYSQL_TYPE_STRING:
111 116
 			case MYSQL_TYPE_VAR_STRING:
117
+				LM_DBG("use DB_STRING result type");
112 118
 				RES_TYPES(_r)[col] = DB_STRING;
113 119
 				break;
114 120
 
115 121
 			default:
116 122
 				LM_WARN("unhandled data type column (%.*s) type id (%d), "
117
-						"use STRING as default\n", RES_NAMES(_r)[col]->len,
123
+						"use DB_STRING as default\n", RES_NAMES(_r)[col]->len,
118 124
 						RES_NAMES(_r)[col]->s, fields[col].type);
119 125
 				RES_TYPES(_r)[col] = DB_STRING;
120 126
 				break;