andrey Thu May 28 17:47:38 2009 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/mysqlnd mysqlnd_ps.c mysqlnd_result.c
mysqlnd_result_meta.c
Log:
MFH: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.3.2.25&r2=1.3.2.26&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_ps.c
diff -u php-src/ext/mysqlnd/mysqlnd_ps.c:1.3.2.25
php-src/ext/mysqlnd/mysqlnd_ps.c:1.3.2.26
--- php-src/ext/mysqlnd/mysqlnd_ps.c:1.3.2.25 Thu May 28 16:35:41 2009
+++ php-src/ext/mysqlnd/mysqlnd_ps.c Thu May 28 17:47:37 2009
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mysqlnd_ps.c,v 1.3.2.25 2009/05/28 16:35:41 andrey Exp $ */
+/* $Id: mysqlnd_ps.c,v 1.3.2.26 2009/05/28 17:47:37 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.4.2.28&r2=1.4.2.29&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_result.c
diff -u php-src/ext/mysqlnd/mysqlnd_result.c:1.4.2.28
php-src/ext/mysqlnd/mysqlnd_result.c:1.4.2.29
--- php-src/ext/mysqlnd/mysqlnd_result.c:1.4.2.28 Thu May 28 16:35:41 2009
+++ php-src/ext/mysqlnd/mysqlnd_result.c Thu May 28 17:47:37 2009
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mysqlnd_result.c,v 1.4.2.28 2009/05/28 16:35:41 andrey Exp $ */
+/* $Id: mysqlnd_result.c,v 1.4.2.29 2009/05/28 17:47:37 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.3.2.8&r2=1.3.2.9&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_result_meta.c
diff -u php-src/ext/mysqlnd/mysqlnd_result_meta.c:1.3.2.8
php-src/ext/mysqlnd/mysqlnd_result_meta.c:1.3.2.9
--- php-src/ext/mysqlnd/mysqlnd_result_meta.c:1.3.2.8 Mon Mar 30 16:52:33 2009
+++ php-src/ext/mysqlnd/mysqlnd_result_meta.c Thu May 28 17:47:38 2009
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mysqlnd_result_meta.c,v 1.3.2.8 2009/03/30 16:52:33 felipe Exp $ */
+/* $Id: mysqlnd_result_meta.c,v 1.3.2.9 2009/05/28 17:47:38 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