1
0
Fork 0
mirror of https://github.com/DBD-SQLite/DBD-SQLite synced 2025-06-07 22:28:47 -04:00

Cleared as many simple, obvious or duplicate RT bugs as I could find

This commit is contained in:
Adam Kennedy 2009-04-04 04:19:55 +00:00
parent e75314771a
commit e87308e952
4 changed files with 37 additions and 7 deletions

15
Changes
View file

@ -22,9 +22,24 @@ Changes for Perl extension DBD-SQLite.
- Resolved #32570: segmentation fault during tests 07 & 08 (ADAMK) - Resolved #32570: segmentation fault during tests 07 & 08 (ADAMK)
- Resolved #41631: Dot doesn't work in quoted column aliases (ADAMK) - Resolved #41631: Dot doesn't work in quoted column aliases (ADAMK)
- Resolved #403: test failure on "Testing select speed (large table) (ADAMK) - Resolved #403: test failure on "Testing select speed (large table) (ADAMK)
- Resolved #35769: dbimp.c uses uninitialized variables. (ADAMK)
- Resolved #27701 and #27702: (unnamed) (ADAMK)
- Resolved #31239: prepare_cached...statement handle
DBIx::ContextualFetch::st=HASH still Active (ADAMK)
- Resolved #41047: Re: Bug#506157: libdbd-sqlite3-perl: unsufficient
error message while opening database for writing (ADAMK)
- Resolved #25196 (bug in prepare?) (ADAMK)\
- Resolved #36651: Bug involving "closing dbh with active
statement handles" (ADAMK)
- Resolved #34408: Primary key name wrong with newline in
CREATE TABLE (ADAMK)
- Resolved #34600: t/06_error.t stalling (ADAMK)
- Resolved #22688: DBD::SQLITE Error Report (ADAMK)
1.19_07 Sat 4 Apr 2009 1.19_07 Sat 4 Apr 2009
- Starting to work the RT queue now the basics are settled. - Starting to work the RT queue now the basics are settled.
Many of the items marked as resolved by my just indicate that I have
confirmed someone else applied the fix. (ADAMK)
- Re-enable and fix t/70schemachange.t, as per RT #43448 (CORION) - Re-enable and fix t/70schemachange.t, as per RT #43448 (CORION)
- Added a canary test to probe for RT #36863 - Added a canary test to probe for RT #36863
(segfault on OSX 10.5.2) (CORION) (segfault on OSX 10.5.2) (CORION)

View file

@ -732,9 +732,9 @@ sqlite_st_FETCH_attrib (SV *sth, imp_sth_t *imp_sth, SV *keysv)
const char *fieldname = sqlite3_column_name(imp_sth->stmt, n); const char *fieldname = sqlite3_column_name(imp_sth->stmt, n);
if (fieldname) { if (fieldname) {
/* warn("Name [%d]: %s\n", n, fieldname); */ /* warn("Name [%d]: %s\n", n, fieldname); */
// char *dot = instr(fieldname, "."); /* char *dot = instr(fieldname, "."); */
// if (dot) /* drop table name from field name */ /* if (dot) drop table name from field name */
// fieldname = ++dot; /* fieldname = ++dot; */
av_store(av, n, newSVpv(fieldname, 0)); av_store(av, n, newSVpv(fieldname, 0));
} }
} }

View file

@ -8,11 +8,23 @@ BEGIN {
$^W = 1; $^W = 1;
} }
use Test::More tests => 5; use Test::More tests => 6;
use t::lib::Test; use t::lib::Test;
my $dbh = connect_ok(); my $dbh = connect_ok();
$dbh->do("CREATE TABLE f (f1, f2, f3)"); $dbh->do(<<'END_SQL');
CREATE TABLE f
(
f1 integer NOT NULL PRIMARY KEY,
f2 integer,
f3 text
)
END_SQL
# Confirm fix for #34408: Primary key name wrong with newline in CREATE TABLE
my $pkh = $dbh->primary_key_info( undef, undef, 'f' );
my @pk = $pkh->fetchall_arrayref();
is_deeply( \@pk, [ [ [ undef, undef, 'f', 'f1', 1, 'PRIMARY KEY' ] ] ], '->primary_key_info ok' );
my $sth = $dbh->prepare("SELECT f.f1, f.* FROM f"); my $sth = $dbh->prepare("SELECT f.f1, f.* FROM f");
isa_ok( $sth, 'DBI::st' ); isa_ok( $sth, 'DBI::st' );
@ -20,3 +32,4 @@ ok( $sth->execute, '->execute ok' );
my $names = $sth->{NAME}; my $names = $sth->{NAME};
is( scalar(@$names), 4, 'Got 4 columns' ); is( scalar(@$names), 4, 'Got 4 columns' );
is_deeply( $names, [ 'f1', 'f1', 'f2', 'f3' ], 'Table prepending is disabled by default' ); is_deeply( $names, [ 'f1', 'f1', 'f2', 'f3' ], 'Table prepending is disabled by default' );

View file

@ -17,7 +17,7 @@ my $dbh = connect_ok(
$dbh->do("CREATE TABLE MST (id, lbl)"); $dbh->do("CREATE TABLE MST (id, lbl)");
$dbh->do("CREATE TABLE TRN (no, id, qty)"); $dbh->do("CREATE TABLE TRN (no, id, qty)");
$dbh->commit; #not work? $dbh->commit;
$dbh->do("INSERT INTO MST VALUES(1, 'ITEM1')"); $dbh->do("INSERT INTO MST VALUES(1, 'ITEM1')");
$dbh->do("INSERT INTO MST VALUES(2, 'ITEM2')"); $dbh->do("INSERT INTO MST VALUES(2, 'ITEM2')");
$dbh->do("INSERT INTO MST VALUES(3, 'ITEM3')"); $dbh->do("INSERT INTO MST VALUES(3, 'ITEM3')");
@ -25,7 +25,7 @@ $dbh->do("INSERT INTO TRN VALUES('A', 1, 5)");
$dbh->do("INSERT INTO TRN VALUES('B', 2, 2)"); $dbh->do("INSERT INTO TRN VALUES('B', 2, 2)");
$dbh->do("INSERT INTO TRN VALUES('C', 1, 4)"); $dbh->do("INSERT INTO TRN VALUES('C', 1, 4)");
$dbh->do("INSERT INTO TRN VALUES('D', 3, 3)"); $dbh->do("INSERT INTO TRN VALUES('D', 3, 3)");
$dbh->rollback; #not work? $dbh->rollback;
my $sth = $dbh->prepare( my $sth = $dbh->prepare(
"SELECT TRN.id AS ID, MST.LBL AS TITLE, "SELECT TRN.id AS ID, MST.LBL AS TITLE,
@ -39,3 +39,5 @@ print(join(', ', @$names), "\n");
while(my $raD = $sth->fetchrow_arrayref()) { while(my $raD = $sth->fetchrow_arrayref()) {
print join(":", @$raD), "\n"; print join(":", @$raD), "\n";
} }
$dbh->rollback;