From 81770f3c398ef9c6b9fa76f45c94533575f6f0af Mon Sep 17 00:00:00 2001 From: Hartmut Holzgraefe Date: Sun, 27 Feb 2005 12:05:46 +0000 Subject: [PATCH] no need to check for execution status, always free a result set if there is one --- ext/pdo_mysql/mysql_statement.c | 11 +++++------ 1 file 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; -- 2.50.1