cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd_ps.c
| From: | Andrey Hristov | Date: | Fri, 29 May 2009 12:19:40 +0000 |
| Subject: | cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd_ps.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-58399@lists.php.net to get a copy of this message | ||
andrey Fri May 29 12:19:40 2009 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/mysqlnd mysqlnd_ps.c
Log:
MFH:Fix for the failing mysql_stmt_execute() test. Data was cleaned after
stmt_reset() but it should stay and be freed as later as next stmt_execute()
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_ps.c?r1=1.3.2.26&r2=1.3.2.27&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_ps.c
diff -u php-src/ext/mysqlnd/mysqlnd_ps.c:1.3.2.26 php-src/ext/mysqlnd/mysqlnd_ps.c:1.3.2.27
--- php-src/ext/mysqlnd/mysqlnd_ps.c:1.3.2.26 Thu May 28 17:47:37 2009
+++ php-src/ext/mysqlnd/mysqlnd_ps.c Fri May 29 12:19:40 2009
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mysqlnd_ps.c,v 1.3.2.26 2009/05/28 17:47:37 andrey Exp $ */
+/* $Id: mysqlnd_ps.c,v 1.3.2.27 2009/05/29 12:19:40 andrey Exp $ */
#include "php.h"
#include "mysqlnd.h"
#include "mysqlnd_wireprotocol.h"
@@ -588,7 +588,7 @@
SET_ERROR_AFF_ROWS(stmt);
SET_ERROR_AFF_ROWS(stmt->conn);
- if (stmt->result && stmt->state > MYSQLND_STMT_PREPARED &&
stmt->field_count) {
+ if (stmt->result && stmt->state >= MYSQLND_STMT_PREPARED &&
stmt->field_count) {
/*
We don need to copy the data from the buffers which we will clean.
Because it has already been copied. See
@@ -1192,11 +1192,11 @@
stmt->result->m.skip_result(stmt->result TSRMLS_CC);
}
- /* Now the line should be free, if it wasn't */
-
- DBG_INF("freeing result");
- /* free_result() doesn't actually free stmt->result but only the buffers */
- stmt->m->free_result(stmt TSRMLS_CC);
+ /*
+ Don't free now, let the result be usable. When the stmt will again be
+ executed then the result set will be cleaned, the bound variables will
+ be separated before that.
+ */
int4store(cmd_buf, stmt->stmt_id);
if (CONN_GET_STATE(conn) == CONN_READY &&