Author: turnstep
Date: Wed Nov 12 12:41:32 2008
New Revision: 12069
Modified:
DBD-Pg/trunk/t/02attribs.t
DBD-Pg/trunk/t/03dbmethod.t
DBD-Pg/trunk/t/12placeholders.t
DBD-Pg/trunk/t/dbdpg_test_setup.pl
Log:
Remove all language-specific error checking, per RT 40604.
Modified: DBD-Pg/trunk/t/02attribs.t
==============================================================================
--- DBD-Pg/trunk/t/02attribs.t (original)
+++ DBD-Pg/trunk/t/02attribs.t Wed Nov 12 12:41:32 2008
@@ -1480,12 +1480,12 @@
$t='Database handle attribute "ReadOnly" prevents INSERT queries from working when on';
$SQL = 'INSERT INTO dbd_pg_test (id) VALUES (50)';
eval { $dbh4->do($SQL); };
- like ($@, qr{transaction is read-only}, $t);
+ is($dbh4->state, '25006', $t);
$dbh4->rollback();
$sth = $dbh4->prepare($SQL);
eval { $sth->execute(); };
- like ($@, qr{transaction is read-only}, $t);
+ is($dbh4->state, '25006', $t);
$dbh4->rollback();
$t='Database handle attribute "ReadOnly" allows INSERT queries when switched off';
Modified: DBD-Pg/trunk/t/03dbmethod.t
==============================================================================
--- DBD-Pg/trunk/t/03dbmethod.t (original)
+++ DBD-Pg/trunk/t/03dbmethod.t Wed Nov 12 12:41:32 2008
@@ -71,7 +71,7 @@
eval {
$dbh->last_insert_id(undef,undef,undef,undef,{sequence=>'dbd_pg_nonexistentsequence_test'});
};
-like ($@, qr{ERROR}, $t);
+is ($dbh->state, '42P01', $t);
$t='DB handle method "last_insert_id" fails when given a non-existent table';
$dbh->rollback();
Modified: DBD-Pg/trunk/t/12placeholders.t
==============================================================================
--- DBD-Pg/trunk/t/12placeholders.t (original)
+++ DBD-Pg/trunk/t/12placeholders.t Wed Nov 12 12:41:32 2008
@@ -157,7 +157,7 @@
eval {
$dbh->do(q{SELECT ??}, undef, 'public', 'error');
};
-like ($@, qr{ERROR}, $t);
+is($dbh->state, '42601', $t);
$t='Prepare/execute with non-DML placeholder works';
$dbh->commit();
Modified: DBD-Pg/trunk/t/dbdpg_test_setup.pl
==============================================================================
--- DBD-Pg/trunk/t/dbdpg_test_setup.pl (original)
+++ DBD-Pg/trunk/t/dbdpg_test_setup.pl Wed Nov 12 12:41:32 2008
@@ -451,7 +451,9 @@
$dbh = DBI->connect($testdsn, $testuser, '',
{RaiseError => 1, PrintError => 0, AutoCommit => 1});
};
- if ($@ =~ /starting up/ or $@ =~ /PGSQL\.$testport/) {
+ ## Regardless of the error, try again.
+ ## We used to check the message, but LANG problems may complicate that.
+ if ($@) {
if ($loop++ < 5) {
sleep 1;
redo STARTUP;
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.