diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-12-10 15:51:17 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-12-10 15:53:23 +0100 |
commit | 15b51a215ac08fa72aa6ea44755f7134710f9004 (patch) | |
tree | 3d0889e9df957283e4d4d785a68505243f73a3c9 /ext/pdo_mysql | |
parent | dde5572937e8165abac5fbaa2c4fbb85d7e391b2 (diff) | |
download | php-git-15b51a215ac08fa72aa6ea44755f7134710f9004.tar.gz |
Fixed bug #79131
When a driver reports an error during EVT_ALLOC (and some over EVTs),
make sure we handle it as usual, i.e. warn or throw.
This requires some adjustments in PDO PgSQL to stop manually doing
this through an impl error.
Unfortunately the PDO PgSQL error messages regress because of this,
as they now include a completely arbitrary error code. There doesn't
seem to be an ability to skip it right now.
Diffstat (limited to 'ext/pdo_mysql')
-rw-r--r-- | ext/pdo_mysql/tests/pdo_mysql_prepare_emulated_anonymous.phpt | 4 | ||||
-rw-r--r-- | ext/pdo_mysql/tests/pdo_mysql_prepare_native_named_placeholder.phpt | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_emulated_anonymous.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_emulated_anonymous.phpt index abd2615ce8..5d403c0caa 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_emulated_anonymous.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_emulated_anonymous.phpt @@ -64,7 +64,7 @@ require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> ---EXPECT-- +--EXPECTF-- array(1) { [0]=> array(2) { @@ -75,6 +75,8 @@ array(1) { } } now the same with native PS + +Warning: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number in %s on line %d [005] Execute has failed, 'HY093' array ( 0 => 'HY093', 1 => NULL, diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_named_placeholder.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_named_placeholder.phpt index 6b553375d6..ea4d097809 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_named_placeholder.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_named_placeholder.phpt @@ -72,7 +72,8 @@ require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> ---EXPECT-- +--EXPECTF-- +Warning: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number in %s on line %d [003] Execute has failed, 'HY093' array ( 0 => 'HY093', 1 => NULL, |