| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- Index: DBD-SQLite-1.13/Makefile.PL
- --- DBD-SQLite-1.13/Makefile.PL.orig 2006-09-08 05:45:13.000000000 +0200
- +++ DBD-SQLite-1.13/Makefile.PL 2006-09-19 20:05:27.104172279 +0200
- @@ -10,34 +10,6 @@
- }
- use Config;
- use strict;
- -eval {
- - require DBD::SQLite;
- - if ($DBD::SQLite::VERSION < 1.0) {
- - print <<EOT;
- -
- -**** WARNING **** WARNING **** WARNING **** WARNING **** WARNING ****
- -
- -Your version of DBD::SQLite currently installed ($DBD::SQLite::VERSION) uses
- -the old sqlite database format. This version of DBD::SQLite will *NOT*
- -open these files, and installing this module may cause problems on your
- -system. If this is a live environment you should upgrade with caution.
- -
- -To upgrade a database, download and install both sqlite 2.x and 3.x from
- -http://www.sqlite.org/ and issue:
- -
- - sqlite OLD.DB .dump | sqlite3 NEW.DB
- -
- -DBD::SQLite will NOT automatically upgrade a database for you, and using
- -this version against an old SQLite database WILL lead to database
- -corruption.
- -
- -EOT
- - if (prompt("Continue?", "N") !~ /^y/i) {
- - print "Exiting\n";
- - exit -1;
- - }
- - }
- -};
-
- # 2005/6/19, by rjray@blackperl.com
- #
- @@ -111,18 +83,19 @@
-
- my $nlid = $DBI::VERSION > 1.42 ? '' : '-Dno_last_insert_id';
-
- -my $libs = '';
- -$libs .= "-L$sqlite_lib " if ($sqlite_lib);
- -$libs .= "-lsqlite3 " unless ($force_local);
- +my $inc = `pkg-config sqlite3 --cflags-only-I`;
- +$inc =~ s/\r?\n$//s;
- +my $libs = `pkg-config sqlite3 --libs`;
- +$libs =~ s/\r?\n$//s;
-
- WriteMakefile(
- 'NAME' => 'DBD::SQLite',
- 'VERSION_FROM' => 'lib/DBD/SQLite.pm', # finds $VERSION
- 'PREREQ_PM' => {DBI => 1.21}, # e.g., Module::Name => 1.1
- 'OBJECT' => ($force_local) ? '$(O_FILES)' : 'SQLite.o dbdimp.o',
- - 'INC' => '-I. -I$(DBI_INSTARCH_DIR)' .
- + 'INC' => $inc . ' -I. -I$(DBI_INSTARCH_DIR)' .
- (($sqlite_inc) ? " -I$sqlite_inc" : ''),
- - $libs ? ('LIBS' => $libs) : (),
- + 'LIBS' => [ $libs ],
- 'OPTIMIZE' => "-O2",
- 'DEFINE' => "-DNDEBUG=1 -DSQLITE_PTR_SZ=$Config{ptrsize}" .
- ( ($Config{d_usleep} ||
- Index: DBD-SQLite-1.13/dbdimp.c
- --- DBD-SQLite-1.13/dbdimp.c.orig 2006-09-08 06:50:50.000000000 +0200
- +++ DBD-SQLite-1.13/dbdimp.c 2006-09-19 20:03:45.164447005 +0200
- @@ -394,14 +394,17 @@
-
- sqlite_trace(3, "Execute returned %d cols\n", DBIc_NUM_FIELDS(imp_sth));
- if (DBIc_NUM_FIELDS(imp_sth) == 0) {
- + char *defererr = strdup((char*)sqlite3_errmsg(imp_dbh->db));
- while ((retval = sqlite3_step(imp_sth->stmt)) != SQLITE_DONE) {
- if (retval == SQLITE_ROW) {
- continue;
- }
- sqlite3_finalize(imp_sth->stmt);
- - sqlite_error(sth, (imp_xxh_t*)imp_sth, retval, (char*)sqlite3_errmsg(imp_dbh->db));
- + sqlite_error(sth, (imp_xxh_t*)imp_sth, retval, defererr);
- + free(defererr);
- return -5;
- }
- + free(defererr);
- /* warn("Finalize\n"); */
- sqlite3_reset(imp_sth->stmt);
- imp_sth->nrow = sqlite3_changes(imp_dbh->db);
- Index: DBD-SQLite-1.13/dbdimp.h
- --- DBD-SQLite-1.13/dbdimp.h.orig 2006-09-08 06:50:50.000000000 +0200
- +++ DBD-SQLite-1.13/dbdimp.h 2006-09-19 20:03:45.164783426 +0200
- @@ -4,7 +4,7 @@
- #define _DBDIMP_H 1
-
- #include "SQLiteXS.h"
- -#include "sqliteInt.h"
- +#include "sqlite3.h"
-
- /* 30 second timeout by default */
- #define SQL_TIMEOUT 30000
|