From: Pierrick Charron Date: Thu, 3 Dec 2009 15:24:43 +0000 (+0000) Subject: Fixed bug #45120 (PDOStatement->execute() returns true then false for same statement). X-Git-Tag: php-5.4.0alpha1~191^2~2305 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=13010b552b0af39f3cd2c2464a035a5170625515;p=php Fixed bug #45120 (PDOStatement->execute() returns true then false for same statement). --- diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 0ab02319b7..8093deb553 100755 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -496,6 +496,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