svn: /php/php-src/ branches/PHP_5_3/ext/pdo_mysql/tests/bug_44454.phpt trunk/ext/pdo_mysql/tests/bug_44454.phpt

From: Date: Mon, 20 Sep 2010 09:04:48 +0000
Subject: svn: /php/php-src/ branches/PHP_5_3/ext/pdo_mysql/tests/bug_44454.phpt trunk/ext/pdo_mysql/tests/bug_44454.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-63529@lists.php.net to get a copy of this message
uw Mon, 20 Sep 2010 09:04:48 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=303600 Log: Dont be strict on error messages, they can vary by server version Changed paths: U php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/bug_44454.phpt U php/php-src/trunk/ext/pdo_mysql/tests/bug_44454.phpt Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/bug_44454.phpt =================================================================== --- php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/bug_44454.phpt 2010-09-20 09:02:31 UTC (rev 303599) +++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/bug_44454.phpt 2010-09-20 09:04:48 UTC (rev 303600) @@ -33,6 +33,10 @@ } } + $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 @@ ... 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 @@ ... 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 @@ ... 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 @@ ... PDO - array ( 0 => '23000', 1 => 1062, - 2 => 'Duplicate entry \'1-1\' for key 1', + 2 => 'Duplicate entry \'1-1\' for key %s', ) done! Modified: php/php-src/trunk/ext/pdo_mysql/tests/bug_44454.phpt =================================================================== --- php/php-src/trunk/ext/pdo_mysql/tests/bug_44454.phpt 2010-09-20 09:02:31 UTC (rev 303599) +++ php/php-src/trunk/ext/pdo_mysql/tests/bug_44454.phpt 2010-09-20 09:04:48 UTC (rev 303600) @@ -33,6 +33,10 @@ } } + $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 @@ ... 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 @@ ... 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 @@ ... 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 @@ ... PDO - array ( 0 => '23000', 1 => 1062, - 2 => 'Duplicate entry \'1-1\' for key 1', + 2 => 'Duplicate entry \'1-1\' for key %s', ) done!

« previous php.cvs (#63529) next »