mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 14:19:10 -04:00
re-enable and fix t/70schemachange.t as per RT #43448
This commit is contained in:
parent
6adac653fe
commit
1591f375b9
2 changed files with 17 additions and 5 deletions
3
Changes
3
Changes
|
@ -1,5 +1,8 @@
|
|||
Revision history for Perl extension DBD-SQLite.
|
||||
|
||||
1.19_07 not released yet
|
||||
- re-enable and fix t/70schemachange.t, as per RT #43448 (CORION)
|
||||
|
||||
1.19_06 Sat 4 Apr 2009
|
||||
- Fixed a segv with an error function under x86 linux
|
||||
(and hopefully Mac OSX). (TOKUHIROM)
|
||||
|
|
|
@ -8,10 +8,10 @@ BEGIN {
|
|||
|
||||
use t::lib::Test;
|
||||
|
||||
if ($^O eq 'MSWin32') {
|
||||
print "1..0 # Skip changing active database's schema doesn't work under Windows\n";
|
||||
exit 0;
|
||||
}
|
||||
#if ($^O eq 'MSWin32') {
|
||||
# print "1..0 # Skip changing active database's schema doesn't work under Windows\n";
|
||||
# exit 0;
|
||||
#}
|
||||
|
||||
do 't/lib.pl';
|
||||
if ($@) {
|
||||
|
@ -64,6 +64,10 @@ while (Testing()) {
|
|||
die("fork: $!");
|
||||
} elsif ($pid == 0) {
|
||||
# Child: drop the second table
|
||||
if ($^O =~ /win32/i) {
|
||||
# sqlite prohibits thread sharing parent connection
|
||||
$dbh = DBI->connect("DBI:SQLite:dbname=foo", '', '');
|
||||
}
|
||||
if (!$state) {
|
||||
$dbh->do("DROP TABLE $table2")
|
||||
or DbiError($dbh->err, $dbh->errstr);
|
||||
|
@ -74,7 +78,12 @@ while (Testing()) {
|
|||
}
|
||||
|
||||
# Parent: wait for the child to finish, then attempt to use the database
|
||||
Test(waitpid($pid, 0) >= 0) or print("waitpid: $!\n");
|
||||
Test(waitpid($pid, 0) != -1) or print("waitpid: $!\n");
|
||||
|
||||
if ($^O =~ /win32/i) {
|
||||
# schema changed, need to reconnect
|
||||
$dbh = DBI->connect("DBI:SQLite:dbname=foo", '', '');
|
||||
}
|
||||
|
||||
Test($state or $dbh->do("DROP TABLE $table1"))
|
||||
or DbiError($dbh->err, $dbh->errstr);
|
||||
|
|
Loading…
Add table
Reference in a new issue