From e2efe4bc7b96febe5b7938128ea6b1ce8f605cf3 Mon Sep 17 00:00:00 2001 From: Pierrick Charron Date: Thu, 3 Dec 2009 15:24:43 +0000 Subject: [PATCH] Fixed bug #45120 (PDOStatement->execute() returns true then false for same statement). --- NEWS | 2 ++ ext/pdo/pdo_stmt.c | 1 + ext/pdo_mysql/tests/bug_45120.phpt | 2 -- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 06ac7d3841..49d1321c00 100644 --- a/NEWS +++ b/NEWS @@ -97,6 +97,8 @@ PHP NEWS - Fixed bug #49244 (Floating point NaN cause garbage characters). (Sjoerd) - Fixed bug #49224 (Compile error due to old DNS functions on AIX systems). (Scott) +- Fixed bug #45120 (PDOStatement->execute() returns true then false for same + statement). (Pierrick) 19 Nov 2009, PHP 5.3.1 diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 69cc7439c5..0277fe5cac 100755 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -497,6 +497,7 @@ static PHP_METHOD(PDOStatement, execute) /* no changes were made */ stmt->active_query_string = stmt->query_string; stmt->active_query_stringlen = stmt->query_stringlen; + ret = 1; } else if (ret == -1) { /* something broke */ PDO_HANDLE_STMT_ERR(); diff --git a/ext/pdo_mysql/tests/bug_45120.phpt b/ext/pdo_mysql/tests/bug_45120.phpt index 0e46d5eafd..db5da823f7 100644 --- a/ext/pdo_mysql/tests/bug_45120.phpt +++ b/ext/pdo_mysql/tests/bug_45120.phpt @@ -42,8 +42,6 @@ bug_45120($db); print "done!"; ?> ---XFAIL-- -This is an open PDO bug. It is not a PDO_MYSQL bug --EXPECT-- Emulated Prepared Statements Native Prepared Statements -- 2.50.1