Browse Source

- fixed compile error - MYSQL_TYPE_NEWDECIMAL date type is supported
only starting with mysql 5.0, Reported by Andrew Pogrebennyk.
related to opensips bug 2085158, credits to Bogdan


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

Henning Westerholt 17 years ago
parent
commit
b863b51e88
1 changed files with 2 additions and 0 deletions
  1. 2 0
      modules/db_mysql/km_res.c

+ 2 - 0
modules/db_mysql/km_res.c

@@ -92,7 +92,9 @@ int db_mysql_get_columns(const db_con_t* _h, db_res_t* _r)
 			case MYSQL_TYPE_INT24:
 			case MYSQL_TYPE_LONGLONG:
 			case MYSQL_TYPE_DECIMAL:
+			#if MYSQL_VERSION_ID > 49999
 			case MYSQL_TYPE_NEWDECIMAL:
+			#endif
 			case MYSQL_TYPE_TIMESTAMP:
 				LM_DBG("use DB_INT result type\n");
 				RES_TYPES(_r)[col] = DB_INT;