Explorar o código

- partial revert of commit rev5359 for db_mysql module
- generalize db_str2val function in the DB API core, the string copying
behaviour can now configured (its done for db_postgres, db_unixodbc,
not done for db_mysql like in the 1.3, 1.4 branches)
- still TODO: fix NULL case in db_unixodbc, try to fix double copying


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

Henning Westerholt %!s(int64=16) %!d(string=hai) anos
pai
achega
f62841030e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      modules/db_mysql/km_row.c

+ 1 - 1
modules/db_mysql/km_row.c

@@ -63,7 +63,7 @@ int db_mysql_convert_row(const db_con_t* _h, db_res_t* _res, db_row_t* _r)
 
 
 	for(i = 0; i < RES_COL_N(_res); i++) {
 	for(i = 0; i < RES_COL_N(_res); i++) {
 		if (db_str2val(RES_TYPES(_res)[i], &(ROW_VALUES(_r)[i]),
 		if (db_str2val(RES_TYPES(_res)[i], &(ROW_VALUES(_r)[i]),
-			    ((MYSQL_ROW)CON_ROW(_h))[i], lengths[i]) < 0) {
+			    ((MYSQL_ROW)CON_ROW(_h))[i], lengths[i], 0) < 0) {
 			LM_ERR("failed to convert value\n");
 			LM_ERR("failed to convert value\n");
 			LM_DBG("free row at %p\n", _r);
 			LM_DBG("free row at %p\n", _r);
 			db_free_row(_r);
 			db_free_row(_r);