mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 22:28:47 -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.
|
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
|
1.19_06 Sat 4 Apr 2009
|
||||||
- Fixed a segv with an error function under x86 linux
|
- Fixed a segv with an error function under x86 linux
|
||||||
(and hopefully Mac OSX). (TOKUHIROM)
|
(and hopefully Mac OSX). (TOKUHIROM)
|
||||||
|
|
|
@ -8,10 +8,10 @@ BEGIN {
|
||||||
|
|
||||||
use t::lib::Test;
|
use t::lib::Test;
|
||||||
|
|
||||||
if ($^O eq 'MSWin32') {
|
#if ($^O eq 'MSWin32') {
|
||||||
print "1..0 # Skip changing active database's schema doesn't work under Windows\n";
|
# print "1..0 # Skip changing active database's schema doesn't work under Windows\n";
|
||||||
exit 0;
|
# exit 0;
|
||||||
}
|
#}
|
||||||
|
|
||||||
do 't/lib.pl';
|
do 't/lib.pl';
|
||||||
if ($@) {
|
if ($@) {
|
||||||
|
@ -64,6 +64,10 @@ while (Testing()) {
|
||||||
die("fork: $!");
|
die("fork: $!");
|
||||||
} elsif ($pid == 0) {
|
} elsif ($pid == 0) {
|
||||||
# Child: drop the second table
|
# Child: drop the second table
|
||||||
|
if ($^O =~ /win32/i) {
|
||||||
|
# sqlite prohibits thread sharing parent connection
|
||||||
|
$dbh = DBI->connect("DBI:SQLite:dbname=foo", '', '');
|
||||||
|
}
|
||||||
if (!$state) {
|
if (!$state) {
|
||||||
$dbh->do("DROP TABLE $table2")
|
$dbh->do("DROP TABLE $table2")
|
||||||
or DbiError($dbh->err, $dbh->errstr);
|
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
|
# 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"))
|
Test($state or $dbh->do("DROP TABLE $table1"))
|
||||||
or DbiError($dbh->err, $dbh->errstr);
|
or DbiError($dbh->err, $dbh->errstr);
|
||||||
|
|
Loading…
Add table
Reference in a new issue