Module: sip-router
Branch: janakj/mysql
Commit: 48855bffd52e5431ad3eb15ad48e3131e331b4f9
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=48855bf…
Author: Henning Westerholt <henning.westerholt(a)1und1.de>
Committer: Henning Westerholt <henning.westerholt(a)1und1.de>
Date: Tue Apr 1 08:54:30 2008 +0000
- extend debugging with result type information
git-svn-id:
https://openser.svn.sourceforge.net/svnroot/openser/trunk@3968
689a6050-402a-0410-94f2-e92a70836424
---
modules/db_mysql/km_res.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/modules/db_mysql/km_res.c b/modules/db_mysql/km_res.c
index 3243919..5dac175 100644
--- a/modules/db_mysql/km_res.c
+++ b/modules/db_mysql/km_res.c
@@ -87,34 +87,40 @@ int db_mysql_get_columns(const db_con_t* _h, db_res_t* _r)
case MYSQL_TYPE_DECIMAL:
case MYSQL_TYPE_NEWDECIMAL:
case MYSQL_TYPE_TIMESTAMP:
+ LM_DBG("use DB_INT result type");
RES_TYPES(_r)[col] = DB_INT;
break;
case MYSQL_TYPE_FLOAT:
case MYSQL_TYPE_DOUBLE:
+ LM_DBG("use DB_DOUBLE result type");
RES_TYPES(_r)[col] = DB_DOUBLE;
break;
case MYSQL_TYPE_DATETIME:
+ LM_DBG("use DB_DATETIME result type");
RES_TYPES(_r)[col] = DB_DATETIME;
break;
case MYSQL_TYPE_BLOB:
+ LM_DBG("use DB_BLOB result type");
RES_TYPES(_r)[col] = DB_BLOB;
break;
case FIELD_TYPE_SET:
+ LM_DBG("use DB_BITMAP result type");
RES_TYPES(_r)[col] = DB_BITMAP;
break;
case MYSQL_TYPE_STRING:
case MYSQL_TYPE_VAR_STRING:
+ LM_DBG("use DB_STRING result type");
RES_TYPES(_r)[col] = DB_STRING;
break;
default:
LM_WARN("unhandled data type column (%.*s) type id (%d), "
- "use STRING as default\n", RES_NAMES(_r)[col]->len,
+ "use DB_STRING as default\n", RES_NAMES(_r)[col]->len,
RES_NAMES(_r)[col]->s, fields[col].type);
RES_TYPES(_r)[col] = DB_STRING;
break;