[SR-Dev] git:janakj/mysql: - fixed compile error - MYSQL_TYPE_NEWDECIMAL date type is supported

Jan Janak jan at iptel.org
Mon Feb 16 22:07:53 CET 2009


Module: sip-router
Branch: janakj/mysql
Commit: b863b51e8893c3ec47ceeb795cca3e16103084be
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b863b51e8893c3ec47ceeb795cca3e16103084be

Author: Henning Westerholt <henning.westerholt at 1und1.de>
Committer: Henning Westerholt <henning.westerholt at 1und1.de>
Date:   Tue Sep  2 08:48:31 2008 +0000

- 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

---

 modules/db_mysql/km_res.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules/db_mysql/km_res.c b/modules/db_mysql/km_res.c
index e572621..44e4f48 100644
--- a/modules/db_mysql/km_res.c
+++ b/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;




More information about the sr-dev mailing list