diff options
| author | Andrey Hristov <andrey@php.net> | 2009-05-29 12:19:40 +0000 |
|---|---|---|
| committer | Andrey Hristov <andrey@php.net> | 2009-05-29 12:19:40 +0000 |
| commit | ccf066517048a4eee5cef8f0a87b927c12970356 (patch) | |
| tree | 8e40412993ebc508cfe422ccf045cf63dfebffd4 /ext/mysqlnd/mysqlnd_ps.c | |
| parent | 3f17909a6022144c5ef6ee6256d6760e3569080d (diff) | |
| download | php-git-ccf066517048a4eee5cef8f0a87b927c12970356.tar.gz | |
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()
Diffstat (limited to 'ext/mysqlnd/mysqlnd_ps.c')
| -rw-r--r-- | ext/mysqlnd/mysqlnd_ps.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/mysqlnd/mysqlnd_ps.c b/ext/mysqlnd/mysqlnd_ps.c index f0dca777eb..ba4ea3120f 100644 --- a/ext/mysqlnd/mysqlnd_ps.c +++ b/ext/mysqlnd/mysqlnd_ps.c @@ -588,7 +588,7 @@ MYSQLND_METHOD(mysqlnd_stmt, execute)(MYSQLND_STMT * const stmt TSRMLS_DC) 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 @@ MYSQLND_METHOD(mysqlnd_stmt, reset)(MYSQLND_STMT * const stmt TSRMLS_DC) 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 && |
