summaryrefslogtreecommitdiff
path: root/ext/pdo_mysql/mysql_statement.c
diff options
context:
space:
mode:
authorHartmut Holzgraefe <hholzgra@php.net>2005-02-27 12:05:46 +0000
committerHartmut Holzgraefe <hholzgra@php.net>2005-02-27 12:05:46 +0000
commit81770f3c398ef9c6b9fa76f45c94533575f6f0af (patch)
treeea0b89e3c1625c146a65d0dba890a203f49024fd /ext/pdo_mysql/mysql_statement.c
parentfa5070b39cdd22cc80b41db44346dbfa430d3b28 (diff)
downloadphp-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-xext/pdo_mysql/mysql_statement.c11
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;