mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Add the sqlite3_extended_errcode() interface. Change to return
SQLITE_BUSY instead of SQLITE_ERROR when a COMMIT is attempted and one or more queries are still pending. (CVS 5850) FossilOrigin-Name: 4c6a90a16627b1664bf7f15ab40b440b3bd60b48
This commit is contained in:
11
src/main.c
11
src/main.c
@@ -14,7 +14,7 @@
|
||||
** other files are for internal use by SQLite and should not be
|
||||
** accessed by users of the library.
|
||||
**
|
||||
** $Id: main.c,v 1.508 2008/10/12 00:27:53 shane Exp $
|
||||
** $Id: main.c,v 1.509 2008/10/30 15:03:16 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <ctype.h>
|
||||
@@ -1266,6 +1266,15 @@ int sqlite3_errcode(sqlite3 *db){
|
||||
}
|
||||
return db->errCode & db->errMask;
|
||||
}
|
||||
int sqlite3_extended_errcode(sqlite3 *db){
|
||||
if( db && !sqlite3SafetyCheckSickOrOk(db) ){
|
||||
return SQLITE_MISUSE;
|
||||
}
|
||||
if( !db || db->mallocFailed ){
|
||||
return SQLITE_NOMEM;
|
||||
}
|
||||
return db->errCode;
|
||||
}
|
||||
|
||||
/*
|
||||
** Create a new collating function for database "db". The name is zName
|
||||
|
||||
Reference in New Issue
Block a user