diff options
author | Hartmut Holzgraefe <hholzgra@php.net> | 2005-02-27 12:05:46 +0000 |
---|---|---|
committer | Hartmut Holzgraefe <hholzgra@php.net> | 2005-02-27 12:05:46 +0000 |
commit | 81770f3c398ef9c6b9fa76f45c94533575f6f0af (patch) | |
tree | ea0b89e3c1625c146a65d0dba890a203f49024fd /ext/pdo_mysql/mysql_statement.c | |
parent | fa5070b39cdd22cc80b41db44346dbfa430d3b28 (diff) | |
download | php-git-81770f3c398ef9c6b9fa76f45c94533575f6f0af.tar.gz |
no need to check for execution status, always free a result set if there
is one
Diffstat (limited to 'ext/pdo_mysql/mysql_statement.c')
-rwxr-xr-x | ext/pdo_mysql/mysql_statement.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c index ad0441beb5..7f5530dbf2 100755 --- a/ext/pdo_mysql/mysql_statement.c +++ b/ext/pdo_mysql/mysql_statement.c @@ -49,13 +49,12 @@ static int pdo_mysql_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC) pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data; pdo_mysql_db_handle *H = S->H; - if (stmt->executed) { - /* ensure that we free any previous unfetched results */ - if (S->result) { - mysql_free_result(S->result); - S->result = NULL; - } + /* ensure that we free any previous unfetched results */ + if (S->result) { + mysql_free_result(S->result); + S->result = NULL; } + if (mysql_real_query(H->server, stmt->active_query_string, stmt->active_query_stringlen) != 0) { pdo_mysql_error_stmt(stmt); return 0; |