andrey Thu May 28 17:47:18 2009 UTC Modified files: /php-src/ext/mysqlnd mysqlnd_ps.c mysqlnd_result.c mysqlnd_result_meta.c Log: Fix a valgrind warning as well as more trace log information http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_ps.c?r1=1.28&r2=1.29&diff_format=u Index: php-src/ext/mysqlnd/mysqlnd_ps.c diff -u php-src/ext/mysqlnd/mysqlnd_ps.c:1.28 php-src/ext/mysqlnd/mysqlnd_ps.c:1.29 --- php-src/ext/mysqlnd/mysqlnd_ps.c:1.28 Thu May 28 16:35:16 2009 +++ php-src/ext/mysqlnd/mysqlnd_ps.c Thu May 28 17:47:18 2009 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_ps.c,v 1.28 2009/05/28 16:35:16 andrey Exp $ */ +/* $Id: mysqlnd_ps.c,v 1.29 2009/05/28 17:47:18 andrey Exp $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_wireprotocol.h" @@ -1373,6 +1373,7 @@ /* Prevent from freeing */ /* Don't update is_ref, or we will leak during conversion */ Z_ADDREF_P(stmt->param_bind[i].zv); + stmt->param_bind[i].flags = 0; if (stmt->param_bind[i].type == MYSQL_TYPE_LONG_BLOB) { stmt->param_bind[i].flags &= ~MYSQLND_PARAM_BIND_BLOB_USED; } http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_result.c?r1=1.32&r2=1.33&diff_format=u Index: php-src/ext/mysqlnd/mysqlnd_result.c diff -u php-src/ext/mysqlnd/mysqlnd_result.c:1.32 php-src/ext/mysqlnd/mysqlnd_result.c:1.33 --- php-src/ext/mysqlnd/mysqlnd_result.c:1.32 Thu May 28 16:35:16 2009 +++ php-src/ext/mysqlnd/mysqlnd_result.c Thu May 28 17:47:18 2009 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_result.c,v 1.32 2009/05/28 16:35:16 andrey Exp $ */ +/* $Id: mysqlnd_result.c,v 1.33 2009/05/28 17:47:18 andrey Exp $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_wireprotocol.h" @@ -100,8 +100,10 @@ zval **data_begin = result->stored_data->data; unsigned int field_count = result->meta->field_count; unsigned int row_count = result->stored_data->row_count; + DBG_ENTER("mysqlnd_res_initialize_result_set_rest"); + if (!data_cursor || row_count == result->stored_data->initialized_rows) { - return; + DBG_VOID_RETURN; } while ((data_cursor - data_begin) < (row_count * field_count)) { if (NULL == data_cursor[0]) { @@ -128,6 +130,7 @@ } data_cursor += field_count; } + DBG_VOID_RETURN; } /* }}} */ @@ -1752,6 +1755,7 @@ not during mysqli_fetch_field() time. */ if (result->stored_data && (result->stored_data->initialized_rows < result->stored_data->row_count)) { + DBG_INF_FMT("We have decode the whole result set to be able to satisfy this meta request"); /* we have to initialize the rest to get the updated max length */ mysqlnd_res_initialize_result_set_rest(result TSRMLS_CC); } @@ -1780,6 +1784,7 @@ not during mysqli_fetch_field_direct() time. */ if (result->stored_data && (result->stored_data->initialized_rows < result->stored_data->row_count)) { + DBG_INF_FMT("We have decode the whole result set to be able to satisfy this meta request"); /* we have to initialized the rest to get the updated max length */ mysqlnd_res_initialize_result_set_rest(result TSRMLS_CC); } http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_result_meta.c?r1=1.12&r2=1.13&diff_format=u Index: php-src/ext/mysqlnd/mysqlnd_result_meta.c diff -u php-src/ext/mysqlnd/mysqlnd_result_meta.c:1.12 php-src/ext/mysqlnd/mysqlnd_result_meta.c:1.13 --- php-src/ext/mysqlnd/mysqlnd_result_meta.c:1.12 Mon Mar 30 19:43:47 2009 +++ php-src/ext/mysqlnd/mysqlnd_result_meta.c Thu May 28 17:47:18 2009 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_result_meta.c,v 1.12 2009/03/30 19:43:47 felipe Exp $ */ +/* $Id: mysqlnd_result_meta.c,v 1.13 2009/05/28 17:47:18 andrey Exp $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_priv.h" @@ -372,8 +372,12 @@ { DBG_ENTER("mysqlnd_res_meta::fetch_field"); if (meta->current_field >= meta->field_count) { + DBG_INF("no more fields"); DBG_RETURN(NULL); } + DBG_INF_FMT("name=%s max_length=%u", + meta->fields[meta->current_field].name? meta->fields[meta->current_field].name:"", + meta->fields[meta->current_field].max_length); DBG_RETURN(&meta->fields[meta->current_field++]); } /* }}} */ @@ -386,6 +390,9 @@ { DBG_ENTER("mysqlnd_res_meta::fetch_field_direct"); DBG_INF_FMT("fieldnr=%d", fieldnr); + DBG_INF_FMT("name=%s max_length=%u", + meta->fields[meta->current_field].name? meta->fields[meta->current_field].name:"", + meta->fields[meta->current_field].max_length); DBG_RETURN(&meta->fields[fieldnr]); } /* }}} */
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php