summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Wendel <uw@php.net>2010-09-20 09:04:48 +0000
committerUlf Wendel <uw@php.net>2010-09-20 09:04:48 +0000
commit70d231bf135d02efd8243eea6779a842ebfe386d (patch)
tree5324722efc6def79c3eb76b382a5b9fbae6d078b
parente389303ef352be8da202b0206bb1d3000b5d6337 (diff)
downloadphp-git-70d231bf135d02efd8243eea6779a842ebfe386d.tar.gz
Dont be strict on error messages, they can vary by server version
-rw-r--r--ext/pdo_mysql/tests/bug_44454.phpt12
1 files changed, 8 insertions, 4 deletions
diff --git a/ext/pdo_mysql/tests/bug_44454.phpt b/ext/pdo_mysql/tests/bug_44454.phpt
index 7ad7f85459..89a4e2a3f7 100644
--- a/ext/pdo_mysql/tests/bug_44454.phpt
+++ b/ext/pdo_mysql/tests/bug_44454.phpt
@@ -33,6 +33,10 @@ function bug_44454($db) {
}
}
+ $db->exec('DROP TABLE IF EXISTS test');
+ $db->exec('CREATE TABLE test(a INT, b INT, UNIQUE KEY idx_ab (a, b))');
+ $db->exec('INSERT INTO test(a, b) VALUES (1, 1)');
+
} catch (Exception $e) {
printf("... While error %s\n", $e->getMessage()); ;
}
@@ -79,7 +83,7 @@ Native Prepared Statements
... PDO - array (
0 => '23000',
1 => 1062,
- 2 => 'Duplicate entry \'1-1\' for key 1',
+ 2 => 'Duplicate entry \'1-1\' for key %s',
)
... SELECT has returned 1 row...
... INSERT should fail...
@@ -87,7 +91,7 @@ Native Prepared Statements
... PDO - array (
0 => '23000',
1 => 1062,
- 2 => 'Duplicate entry \'1-1\' for key 1',
+ 2 => 'Duplicate entry \'1-1\' for key %s',
)
Emulated Prepared Statements
@@ -97,7 +101,7 @@ Emulated Prepared Statements
... PDO - array (
0 => '23000',
1 => 1062,
- 2 => 'Duplicate entry \'1-1\' for key 1',
+ 2 => 'Duplicate entry \'1-1\' for key %s',
)
... SELECT has returned 1 row...
... INSERT should fail...
@@ -105,6 +109,6 @@ Emulated Prepared Statements
... PDO - array (
0 => '23000',
1 => 1062,
- 2 => 'Duplicate entry \'1-1\' for key 1',
+ 2 => 'Duplicate entry \'1-1\' for key %s',
)
done!