summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_result.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2008-03-20 13:25:49 +0000
committerAndrey Hristov <andrey@php.net>2008-03-20 13:25:49 +0000
commit0e884df573239f8128f46d550aa42d69032135a7 (patch)
treefdb95d9b8ff803bdfbae9d2bd8489ee2c08f1463 /ext/mysqlnd/mysqlnd_result.c
parenta81de7c7a1d6181aabe2eb75e0761ca939094715 (diff)
downloadphp-git-0e884df573239f8128f46d550aa42d69032135a7.tar.gz
- Don't modify the variables which are passed for parameter binding.
We need to clone them, if there will be a transformation (convert_to_xxx) which will change the origin. - Make mysqlnd more compatible to libmysql, in this case if the execute of a statement fails set the state of the statement back to PREPARED - A test case to check the case of a failing statement.
Diffstat (limited to 'ext/mysqlnd/mysqlnd_result.c')
-rw-r--r--ext/mysqlnd/mysqlnd_result.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/mysqlnd/mysqlnd_result.c b/ext/mysqlnd/mysqlnd_result.c
index f987ffba65..9815cc1097 100644
--- a/ext/mysqlnd/mysqlnd_result.c
+++ b/ext/mysqlnd/mysqlnd_result.c
@@ -518,8 +518,8 @@ mysqlnd_query_read_result_set_header(MYSQLND *conn, MYSQLND_STMT *stmt TSRMLS_DC
conn->last_query_type = QUERY_SELECT;
CONN_SET_STATE(conn, CONN_FETCHING_DATA);
/* PS has already allocated it */
+ conn->field_count = rset_header.field_count;
if (!stmt) {
- conn->field_count = rset_header.field_count;
result =
conn->current_result=
mysqlnd_result_init(rset_header.field_count,
@@ -533,7 +533,6 @@ mysqlnd_query_read_result_set_header(MYSQLND *conn, MYSQLND_STMT *stmt TSRMLS_DC
prepared statements can't send result set metadata for these queries
on prepare stage. Read it now.
*/
- conn->field_count = rset_header.field_count;
result =
stmt->result =
mysqlnd_result_init(rset_header.field_count,