mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 22:28:47 -04:00
extended errcode is available only if SQLite >= 3.6.5
This commit is contained in:
parent
5a163d925d
commit
4891d48782
1 changed files with 2 additions and 0 deletions
2
dbdimp.c
2
dbdimp.c
|
@ -185,8 +185,10 @@ _sqlite_open(pTHX_ SV *dbh, const char *dbname, sqlite3 **db, int flags, int ext
|
||||||
rc = sqlite3_open(dbname, db);
|
rc = sqlite3_open(dbname, db);
|
||||||
}
|
}
|
||||||
if ( rc != SQLITE_OK ) {
|
if ( rc != SQLITE_OK ) {
|
||||||
|
#if SQLITE_VERSION_NUMBER >= 3006005
|
||||||
if (extended)
|
if (extended)
|
||||||
rc = sqlite3_extended_errcode(*db);
|
rc = sqlite3_extended_errcode(*db);
|
||||||
|
#endif
|
||||||
sqlite_error(dbh, rc, sqlite3_errmsg(*db));
|
sqlite_error(dbh, rc, sqlite3_errmsg(*db));
|
||||||
if (*db) sqlite3_close(*db);
|
if (*db) sqlite3_close(*db);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue