Skip Menu |

This queue is for tickets about the DBD-SQLite CPAN distribution.

Report information
The Basics
Id: 32723
Status: resolved
Priority: 0/
Queue: DBD-SQLite

Owner: Nobody in particular
Requestors: dzs-pr [...]

Bug Information
Severity: Normal
Broken in: 1.14
Fixed in: (no value)

Subject: last_insert_rowid should handle sqlite_int64, not int
Download (untitled) / with headers
text/plain 579b
In SQLite.xs, the return type of last_insert_rowid should be a 64-bit integer, not an plain "int". use DBI; my $dbh = DBI->connect("dbi:SQLite:dbname=:memory:"); $dbh->do("create table foo (a integer not null primary key, b text)"); $dbh->do("insert into foo (a, b) values (12345678901234, 'test')"); my $id = $dbh->func('last_insert_rowid'); print "id=$id ", $id != 12345678901234 ? 'NOT ' : '', "ok\n"; When perl is compiled with 64-bit int support (use64bitint=define), it's sufficient to use "IV", rather than "int". Other variations are not covered in the attached patch.
Subject: patch-SQLite.xs
Download patch-SQLite.xs
text/x-csrc 211b
--- SQLite.xs.orig 2007-08-22 17:01:07.000000000 -0700 +++ SQLite.xs 2008-01-27 20:28:52.642520098 -0800 @@ -21,7 +21,7 @@ OUTPUT: RETVAL -int +IV last_insert_rowid(dbh) SV *dbh CODE:
Confirming patch applied.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to