Browse code

- evaluate DECIMAL (and NEW_DECIMAL) type a DB_STRING, and not DB_INT - patch from Alex Hermann, related to #2111861

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

Henning Westerholt authored on 15/09/2008 10:26:35
Showing 1 changed files
... ...
@@ -91,10 +91,6 @@ int db_mysql_get_columns(const db_con_t* _h, db_res_t* _r)
91 91
 			case MYSQL_TYPE_LONG:
92 92
 			case MYSQL_TYPE_INT24:
93 93
 			case MYSQL_TYPE_LONGLONG:
94
-			case MYSQL_TYPE_DECIMAL:
95
-			#if MYSQL_VERSION_ID > 49999
96
-			case MYSQL_TYPE_NEWDECIMAL:
97
-			#endif
98 94
 			case MYSQL_TYPE_TIMESTAMP:
99 95
 				LM_DBG("use DB_INT result type\n");
100 96
 				RES_TYPES(_r)[col] = DB_INT;
... ...
@@ -121,6 +117,10 @@ int db_mysql_get_columns(const db_con_t* _h, db_res_t* _r)
121 117
 				RES_TYPES(_r)[col] = DB_BITMAP;
122 118
 				break;
123 119
 
120
+			case MYSQL_TYPE_DECIMAL:
121
+			#if MYSQL_VERSION_ID > 49999
122
+			case MYSQL_TYPE_NEWDECIMAL:
123
+			#endif
124 124
 			case MYSQL_TYPE_STRING:
125 125
 			case MYSQL_TYPE_VAR_STRING:
126 126
 				LM_DBG("use DB_STRING result type\n");