mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Remove the sqlite3_error_string() API. (CVS 1514)
FossilOrigin-Name: af8e2006d808031a040f293c44f3bfbe841b866b
This commit is contained in:
30
manifest
30
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Synchronize\slemon.c\sto\sthe\sversion\son\sthe\s2.8\sbranch.\s(CVS\s1513)
|
C Remove\sthe\ssqlite3_error_string()\sAPI.\s(CVS\s1514)
|
||||||
D 2004-05-31T23:13:45
|
D 2004-05-31T23:56:43
|
||||||
F Makefile.in ab7b0d5118e2da97bac66be8684a1034e3500f5a
|
F Makefile.in ab7b0d5118e2da97bac66be8684a1034e3500f5a
|
||||||
F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
|
F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
|
||||||
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
|
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
|
||||||
@@ -36,7 +36,7 @@ F src/hash.c 440c2f8cb373ee1b4e13a0988489c7cd95d55b6f
|
|||||||
F src/hash.h 762d95f1e567664d1eafc1687de755626be962fb
|
F src/hash.h 762d95f1e567664d1eafc1687de755626be962fb
|
||||||
F src/insert.c 4268d9e3959cc845ea243fb4ec7507269404dad9
|
F src/insert.c 4268d9e3959cc845ea243fb4ec7507269404dad9
|
||||||
F src/legacy.c ad23746f15f67e34577621b1875f639c94839e1f
|
F src/legacy.c ad23746f15f67e34577621b1875f639c94839e1f
|
||||||
F src/main.c 2a5d141a8301888268d02d4366ea568ff440200f
|
F src/main.c 5e9c2c4342a652a5c4de2e7dcf60cea1acf1fb72
|
||||||
F src/md5.c 4302e84ae516c616bb079c4e6d038c0addb33481
|
F src/md5.c 4302e84ae516c616bb079c4e6d038c0addb33481
|
||||||
F src/os.h ab42f4a7c4c716f26b988e759b6e12085a3bfc67
|
F src/os.h ab42f4a7c4c716f26b988e759b6e12085a3bfc67
|
||||||
F src/os_common.h 744286a27de55c52f1b18921e8d17abbf7fafc0f
|
F src/os_common.h 744286a27de55c52f1b18921e8d17abbf7fafc0f
|
||||||
@@ -53,27 +53,27 @@ F src/pragma.c 7f432dee3c94460638df1e5fffeb59a560943d13
|
|||||||
F src/printf.c ef750e8e2398ca7e8b58be991075f08c6a7f0e53
|
F src/printf.c ef750e8e2398ca7e8b58be991075f08c6a7f0e53
|
||||||
F src/random.c eff68e3f257e05e81eae6c4d50a51eb88beb4ff3
|
F src/random.c eff68e3f257e05e81eae6c4d50a51eb88beb4ff3
|
||||||
F src/select.c 0297717eb7331604687c2e29c147d3a311359df1
|
F src/select.c 0297717eb7331604687c2e29c147d3a311359df1
|
||||||
F src/shell.c cca774504cefa4cf4db27dce175081c6bb7993be
|
F src/shell.c a9e2ad8f6c1d39b04bad61a0ec655e9a3a360b50
|
||||||
F src/sqlite.h.in 3e2a7cdbfad6b8d1c7f2f3c363476d48388711b3
|
F src/sqlite.h.in 67ae321428f7de80046a12892d289e4024b4976a
|
||||||
F src/sqliteInt.h 950104baea45ee81c9113e3c41b5e9f30def9eaa
|
F src/sqliteInt.h 8a3a6dc8ef5141563698a3b7a62fca7158cff1f5
|
||||||
F src/table.c af14284fa36c8d41f6829e3f2819dce07d3e2de2
|
F src/table.c af14284fa36c8d41f6829e3f2819dce07d3e2de2
|
||||||
F src/tclsqlite.c 8146beb4ade50cd83d3bf7a41c8ebddb9840e967
|
F src/tclsqlite.c ed8663e7703346ace72ca3899dba15dbfc0883d7
|
||||||
F src/test1.c 60a589a17ab104b2b4851e6860b08be0c7d753b9
|
F src/test1.c 42c494918ecfab5a86586a28a66a73968312aad1
|
||||||
F src/test2.c 6195a1ca2c8d0d2d93644e86da3289b403486872
|
F src/test2.c 6195a1ca2c8d0d2d93644e86da3289b403486872
|
||||||
F src/test3.c 86117b74ec7353d76f5cd85c144c7cda23a7e11b
|
F src/test3.c 86117b74ec7353d76f5cd85c144c7cda23a7e11b
|
||||||
F src/test4.c caf675e443460ec76b04d78e1688986c17c82cec
|
F src/test4.c caf675e443460ec76b04d78e1688986c17c82cec
|
||||||
F src/test5.c a894fbfa8a7dcdc2cbc0c38c11149cc5c8252cea
|
F src/test5.c a894fbfa8a7dcdc2cbc0c38c11149cc5c8252cea
|
||||||
F src/tokenize.c b68758abaccd8882c48209b7a54db975f17d498a
|
F src/tokenize.c 183c5d7da11affab5d70d903d33409c8c0ce6c5b
|
||||||
F src/trigger.c 04b2c310d0d056b213609cab6df5fff03d5eaf88
|
F src/trigger.c 04b2c310d0d056b213609cab6df5fff03d5eaf88
|
||||||
F src/update.c 259f06e7b22c684b2d3dda54a18185892d6e9573
|
F src/update.c 259f06e7b22c684b2d3dda54a18185892d6e9573
|
||||||
F src/utf.c c18b4e66bd13872b7199444addaa04785ff1b80a
|
F src/utf.c c18b4e66bd13872b7199444addaa04785ff1b80a
|
||||||
F src/util.c 3b647719c0bece41491300b605cff96a7a26f03a
|
F src/util.c 3b647719c0bece41491300b605cff96a7a26f03a
|
||||||
F src/vacuum.c c91acc316127411980982938d050b299d42b81ef
|
F src/vacuum.c c91acc316127411980982938d050b299d42b81ef
|
||||||
F src/vdbe.c bff63e4fe25a1378bfb6e577fbba3291a4e3625a
|
F src/vdbe.c cc754eddc0d2e741e57c4557c77754d8bbd93eeb
|
||||||
F src/vdbe.h e73f890e0f2a6c42b183d7d6937947930fe4fdeb
|
F src/vdbe.h e73f890e0f2a6c42b183d7d6937947930fe4fdeb
|
||||||
F src/vdbeInt.h 5d357541db688b21ce05a88b3ea4d9a1fb09f232
|
F src/vdbeInt.h 5d357541db688b21ce05a88b3ea4d9a1fb09f232
|
||||||
F src/vdbeapi.c 77d2e681a992ef189032cd9c1b7bf922f01ebe3e
|
F src/vdbeapi.c 77d2e681a992ef189032cd9c1b7bf922f01ebe3e
|
||||||
F src/vdbeaux.c a422970213a2fe9b0048df756fc81f20939eeada
|
F src/vdbeaux.c 17b99f8d5fb6ec097e38b793c282ddc8a301a5a3
|
||||||
F src/vdbemem.c 5d029d83bc60eaf9c45837fcbc0b03348ec95d7a
|
F src/vdbemem.c 5d029d83bc60eaf9c45837fcbc0b03348ec95d7a
|
||||||
F src/where.c 444a7c3a8b1eb7bba072e489af628555d21d92a4
|
F src/where.c 444a7c3a8b1eb7bba072e489af628555d21d92a4
|
||||||
F test/all.test 569a92a8ee88f5300c057cc4a8f50fbbc69a3242
|
F test/all.test 569a92a8ee88f5300c057cc4a8f50fbbc69a3242
|
||||||
@@ -212,7 +212,7 @@ F www/support.tcl 67682848d6ddd283370451dc3da2e56cded9fc9a
|
|||||||
F www/tclsqlite.tcl 19191cf2a1010eaeff74c51d83fd5f5a4d899075
|
F www/tclsqlite.tcl 19191cf2a1010eaeff74c51d83fd5f5a4d899075
|
||||||
F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9
|
F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9
|
||||||
F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
|
F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
|
||||||
P f3b80bbb97ed0b0c1cf634068f28f23802ec71a8
|
P 6ab3af8847a7b0f1508824c9d8e0ec9685219371
|
||||||
R d129c1da630241ec087f33fd2514dd7b
|
R 430f7ef65e5c91eaa2bde24b0b951b9f
|
||||||
U drh
|
U danielk1977
|
||||||
Z da82754f0587159beaceb9f3b45617ea
|
Z cd835fabb1a406eb8762317c7be1255b
|
||||||
|
@@ -1 +1 @@
|
|||||||
6ab3af8847a7b0f1508824c9d8e0ec9685219371
|
af8e2006d808031a040f293c44f3bfbe841b866b
|
12
src/main.c
12
src/main.c
@@ -14,7 +14,7 @@
|
|||||||
** other files are for internal use by SQLite and should not be
|
** other files are for internal use by SQLite and should not be
|
||||||
** accessed by users of the library.
|
** accessed by users of the library.
|
||||||
**
|
**
|
||||||
** $Id: main.c,v 1.200 2004/05/31 19:34:33 drh Exp $
|
** $Id: main.c,v 1.201 2004/05/31 23:56:43 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
@@ -212,7 +212,7 @@ static int sqlite3InitOne(sqlite *db, int iDb, char **pzErrMsg){
|
|||||||
if( db->aDb[iDb].pBt==0 ) return SQLITE_OK;
|
if( db->aDb[iDb].pBt==0 ) return SQLITE_OK;
|
||||||
rc = sqlite3BtreeCursor(db->aDb[iDb].pBt, MASTER_ROOT, 0, 0, 0, &curMain);
|
rc = sqlite3BtreeCursor(db->aDb[iDb].pBt, MASTER_ROOT, 0, 0, 0, &curMain);
|
||||||
if( rc!=SQLITE_OK && rc!=SQLITE_EMPTY ){
|
if( rc!=SQLITE_OK && rc!=SQLITE_EMPTY ){
|
||||||
sqlite3SetString(pzErrMsg, sqlite3_error_string(rc), (char*)0);
|
sqlite3SetString(pzErrMsg, sqlite3ErrStr(rc), (char*)0);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -239,7 +239,7 @@ static int sqlite3InitOne(sqlite *db, int iDb, char **pzErrMsg){
|
|||||||
rc = sqlite3BtreeGetMeta(db->aDb[iDb].pBt, i+1, &meta[i]);
|
rc = sqlite3BtreeGetMeta(db->aDb[iDb].pBt, i+1, &meta[i]);
|
||||||
}
|
}
|
||||||
if( rc ){
|
if( rc ){
|
||||||
sqlite3SetString(pzErrMsg, sqlite3_error_string(rc), (char*)0);
|
sqlite3SetString(pzErrMsg, sqlite3ErrStr(rc), (char*)0);
|
||||||
sqlite3BtreeCloseCursor(curMain);
|
sqlite3BtreeCloseCursor(curMain);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@@ -493,7 +493,7 @@ void sqlite3RollbackAll(sqlite *db){
|
|||||||
** Return a static string that describes the kind of error specified in the
|
** Return a static string that describes the kind of error specified in the
|
||||||
** argument.
|
** argument.
|
||||||
*/
|
*/
|
||||||
const char *sqlite3_error_string(int rc){
|
const char *sqlite3ErrStr(int rc){
|
||||||
const char *z;
|
const char *z;
|
||||||
switch( rc ){
|
switch( rc ){
|
||||||
case SQLITE_OK: z = "not an error"; break;
|
case SQLITE_OK: z = "not an error"; break;
|
||||||
@@ -789,12 +789,12 @@ const char *sqlite3_errmsg(sqlite3 *db){
|
|||||||
/* If db is NULL, then assume that a malloc() failed during an
|
/* If db is NULL, then assume that a malloc() failed during an
|
||||||
** sqlite3_open() call.
|
** sqlite3_open() call.
|
||||||
*/
|
*/
|
||||||
return sqlite3_error_string(SQLITE_NOMEM);
|
return sqlite3ErrStr(SQLITE_NOMEM);
|
||||||
}
|
}
|
||||||
if( db->zErrMsg ){
|
if( db->zErrMsg ){
|
||||||
return db->zErrMsg;
|
return db->zErrMsg;
|
||||||
}
|
}
|
||||||
return sqlite3_error_string(db->errCode);
|
return sqlite3ErrStr(db->errCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
** This file contains code to implement the "sqlite" command line
|
** This file contains code to implement the "sqlite" command line
|
||||||
** utility for accessing SQLite databases.
|
** utility for accessing SQLite databases.
|
||||||
**
|
**
|
||||||
** $Id: shell.c,v 1.100 2004/05/31 19:34:33 drh Exp $
|
** $Id: shell.c,v 1.101 2004/05/31 23:56:43 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -1063,7 +1063,7 @@ static void process_input(struct callback_data *p, FILE *in){
|
|||||||
sqlite3_free(zErrMsg);
|
sqlite3_free(zErrMsg);
|
||||||
zErrMsg = 0;
|
zErrMsg = 0;
|
||||||
}else{
|
}else{
|
||||||
printf("SQL error: %s\n", sqlite3_error_string(rc));
|
printf("SQL error: %s\n", sqlite3ErrStr(rc));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
free(zSql);
|
free(zSql);
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
** This header file defines the interface that the SQLite library
|
** This header file defines the interface that the SQLite library
|
||||||
** presents to client programs.
|
** presents to client programs.
|
||||||
**
|
**
|
||||||
** @(#) $Id: sqlite.h.in,v 1.87 2004/05/31 19:34:33 drh Exp $
|
** @(#) $Id: sqlite.h.in,v 1.88 2004/05/31 23:56:43 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#ifndef _SQLITE_H_
|
#ifndef _SQLITE_H_
|
||||||
#define _SQLITE_H_
|
#define _SQLITE_H_
|
||||||
@@ -213,13 +213,6 @@ int sqlite3_changes(sqlite*);
|
|||||||
*/
|
*/
|
||||||
int sqlite3_last_statement_changes(sqlite*);
|
int sqlite3_last_statement_changes(sqlite*);
|
||||||
|
|
||||||
/* If the parameter to this routine is one of the return value constants
|
|
||||||
** defined above, then this routine returns a constant text string which
|
|
||||||
** descripts (in English) the meaning of the return value.
|
|
||||||
*/
|
|
||||||
const char *sqlite3_error_string(int);
|
|
||||||
#define sqliteErrStr sqlite3_error_string /* Legacy. Do not use in new code. */
|
|
||||||
|
|
||||||
/* This function causes any pending database operation to abort and
|
/* This function causes any pending database operation to abort and
|
||||||
** return at its earliest opportunity. This routine is typically
|
** return at its earliest opportunity. This routine is typically
|
||||||
** called in response to a user action such as pressing "Cancel"
|
** called in response to a user action such as pressing "Cancel"
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
*************************************************************************
|
*************************************************************************
|
||||||
** Internal interface definitions for SQLite.
|
** Internal interface definitions for SQLite.
|
||||||
**
|
**
|
||||||
** @(#) $Id: sqliteInt.h,v 1.265 2004/05/31 18:51:58 drh Exp $
|
** @(#) $Id: sqliteInt.h,v 1.266 2004/05/31 23:56:43 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "sqlite3.h"
|
#include "sqlite3.h"
|
||||||
@@ -1357,3 +1357,4 @@ int sqlite3utfTranslate(const void *, int , u8 , void **, int *, u8);
|
|||||||
u8 sqlite3UtfReadBom(const void *zData, int nData);
|
u8 sqlite3UtfReadBom(const void *zData, int nData);
|
||||||
void *sqlite3HexToBlob(const char *z);
|
void *sqlite3HexToBlob(const char *z);
|
||||||
int sqlite3TwoPartName(Parse *, Token *, Token *, Token **);
|
int sqlite3TwoPartName(Parse *, Token *, Token *, Token **);
|
||||||
|
const char *sqlite3ErrStr(int);
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
*************************************************************************
|
*************************************************************************
|
||||||
** A TCL Interface to SQLite
|
** A TCL Interface to SQLite
|
||||||
**
|
**
|
||||||
** $Id: tclsqlite.c,v 1.77 2004/05/31 18:51:58 drh Exp $
|
** $Id: tclsqlite.c,v 1.78 2004/05/31 23:56:43 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#ifndef NO_TCL /* Omit this whole file if TCL is unavailable */
|
#ifndef NO_TCL /* Omit this whole file if TCL is unavailable */
|
||||||
|
|
||||||
@@ -773,7 +773,7 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
|
|||||||
free(zErrMsg);
|
free(zErrMsg);
|
||||||
rc = TCL_ERROR;
|
rc = TCL_ERROR;
|
||||||
}else if( rc!=SQLITE_OK ){
|
}else if( rc!=SQLITE_OK ){
|
||||||
Tcl_AppendResult(interp, sqlite3_error_string(rc), 0);
|
Tcl_AppendResult(interp, sqlite3ErrStr(rc), 0);
|
||||||
rc = TCL_ERROR;
|
rc = TCL_ERROR;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -795,7 +795,7 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
|
|||||||
#ifdef SQLITE_HAS_CODEC
|
#ifdef SQLITE_HAS_CODEC
|
||||||
rc = sqlite_rekey(pDb->db, pKey, nKey);
|
rc = sqlite_rekey(pDb->db, pKey, nKey);
|
||||||
if( rc ){
|
if( rc ){
|
||||||
Tcl_AppendResult(interp, sqlite3_error_string(rc), 0);
|
Tcl_AppendResult(interp, sqlite3ErrStr(rc), 0);
|
||||||
rc = TCL_ERROR;
|
rc = TCL_ERROR;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
** is not included in the SQLite library. It is used for automated
|
** is not included in the SQLite library. It is used for automated
|
||||||
** testing of the SQLite library.
|
** testing of the SQLite library.
|
||||||
**
|
**
|
||||||
** $Id: test1.c,v 1.67 2004/05/31 19:34:33 drh Exp $
|
** $Id: test1.c,v 1.68 2004/05/31 23:56:43 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
#include "tcl.h"
|
#include "tcl.h"
|
||||||
@@ -722,7 +722,7 @@ static int test_register_func(
|
|||||||
if( getDbPointer(interp, argv[1], &db) ) return TCL_ERROR;
|
if( getDbPointer(interp, argv[1], &db) ) return TCL_ERROR;
|
||||||
rc = sqlite3_create_function(db, argv[2], -1, 0, 0, 0, testFunc, 0, 0);
|
rc = sqlite3_create_function(db, argv[2], -1, 0, 0, 0, testFunc, 0, 0);
|
||||||
if( rc!=0 ){
|
if( rc!=0 ){
|
||||||
Tcl_AppendResult(interp, sqlite3_error_string(rc), 0);
|
Tcl_AppendResult(interp, sqlite3ErrStr(rc), 0);
|
||||||
return TCL_ERROR;
|
return TCL_ERROR;
|
||||||
}
|
}
|
||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
@@ -839,7 +839,7 @@ static int test_bind(
|
|||||||
if( rc ){
|
if( rc ){
|
||||||
char zBuf[50];
|
char zBuf[50];
|
||||||
sprintf(zBuf, "(%d) ", rc);
|
sprintf(zBuf, "(%d) ", rc);
|
||||||
Tcl_AppendResult(interp, zBuf, sqlite3_error_string(rc), 0);
|
Tcl_AppendResult(interp, zBuf, sqlite3ErrStr(rc), 0);
|
||||||
return TCL_ERROR;
|
return TCL_ERROR;
|
||||||
}
|
}
|
||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
** individual tokens and sends those tokens one-by-one over to the
|
** individual tokens and sends those tokens one-by-one over to the
|
||||||
** parser for analysis.
|
** parser for analysis.
|
||||||
**
|
**
|
||||||
** $Id: tokenize.c,v 1.75 2004/05/31 18:51:58 drh Exp $
|
** $Id: tokenize.c,v 1.76 2004/05/31 23:56:43 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
@@ -479,7 +479,7 @@ abort_parse:
|
|||||||
}
|
}
|
||||||
sqlite3ParserFree(pEngine, free);
|
sqlite3ParserFree(pEngine, free);
|
||||||
if( pParse->rc!=SQLITE_OK && pParse->rc!=SQLITE_DONE && pParse->zErrMsg==0 ){
|
if( pParse->rc!=SQLITE_OK && pParse->rc!=SQLITE_DONE && pParse->zErrMsg==0 ){
|
||||||
sqlite3SetString(&pParse->zErrMsg, sqlite3_error_string(pParse->rc),
|
sqlite3SetString(&pParse->zErrMsg, sqlite3ErrStr(pParse->rc),
|
||||||
(char*)0);
|
(char*)0);
|
||||||
}
|
}
|
||||||
if( pParse->zErrMsg ){
|
if( pParse->zErrMsg ){
|
||||||
|
10
src/vdbe.c
10
src/vdbe.c
@@ -43,7 +43,7 @@
|
|||||||
** in this file for details. If in doubt, do not deviate from existing
|
** in this file for details. If in doubt, do not deviate from existing
|
||||||
** commenting and indentation practices when changing or adding code.
|
** commenting and indentation practices when changing or adding code.
|
||||||
**
|
**
|
||||||
** $Id: vdbe.c,v 1.353 2004/05/31 18:51:58 drh Exp $
|
** $Id: vdbe.c,v 1.354 2004/05/31 23:56:43 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
@@ -2271,7 +2271,7 @@ case OP_Transaction: {
|
|||||||
p->pTos = pTos;
|
p->pTos = pTos;
|
||||||
return SQLITE_BUSY;
|
return SQLITE_BUSY;
|
||||||
}else if( (*db->xBusyCallback)(db->pBusyArg, "", busy++)==0 ){
|
}else if( (*db->xBusyCallback)(db->pBusyArg, "", busy++)==0 ){
|
||||||
sqlite3SetString(&p->zErrMsg, sqlite3_error_string(rc), (char*)0);
|
sqlite3SetString(&p->zErrMsg, sqlite3ErrStr(rc), (char*)0);
|
||||||
busy = 0;
|
busy = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -2473,7 +2473,7 @@ case OP_OpenWrite: {
|
|||||||
p->pTos = &pTos[1 + (pOp->p2<=0)]; /* Operands must remain on stack */
|
p->pTos = &pTos[1 + (pOp->p2<=0)]; /* Operands must remain on stack */
|
||||||
return SQLITE_BUSY;
|
return SQLITE_BUSY;
|
||||||
}else if( (*db->xBusyCallback)(db->pBusyArg, pOp->p3, ++busy)==0 ){
|
}else if( (*db->xBusyCallback)(db->pBusyArg, pOp->p3, ++busy)==0 ){
|
||||||
sqlite3SetString(&p->zErrMsg, sqlite3_error_string(rc), (char*)0);
|
sqlite3SetString(&p->zErrMsg, sqlite3ErrStr(rc), (char*)0);
|
||||||
busy = 0;
|
busy = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -4527,7 +4527,7 @@ abort_due_to_misuse:
|
|||||||
abort_due_to_error:
|
abort_due_to_error:
|
||||||
if( p->zErrMsg==0 ){
|
if( p->zErrMsg==0 ){
|
||||||
if( sqlite3_malloc_failed ) rc = SQLITE_NOMEM;
|
if( sqlite3_malloc_failed ) rc = SQLITE_NOMEM;
|
||||||
sqlite3SetString(&p->zErrMsg, sqlite3_error_string(rc), (char*)0);
|
sqlite3SetString(&p->zErrMsg, sqlite3ErrStr(rc), (char*)0);
|
||||||
}
|
}
|
||||||
goto vdbe_halt;
|
goto vdbe_halt;
|
||||||
|
|
||||||
@@ -4542,6 +4542,6 @@ abort_due_to_interrupt:
|
|||||||
}else{
|
}else{
|
||||||
rc = SQLITE_INTERRUPT;
|
rc = SQLITE_INTERRUPT;
|
||||||
}
|
}
|
||||||
sqlite3SetString(&p->zErrMsg, sqlite3_error_string(rc), (char*)0);
|
sqlite3SetString(&p->zErrMsg, sqlite3ErrStr(rc), (char*)0);
|
||||||
goto vdbe_halt;
|
goto vdbe_halt;
|
||||||
}
|
}
|
||||||
|
@@ -566,7 +566,7 @@ int sqlite3VdbeList(
|
|||||||
p->rc = SQLITE_INTERRUPT;
|
p->rc = SQLITE_INTERRUPT;
|
||||||
}
|
}
|
||||||
rc = SQLITE_ERROR;
|
rc = SQLITE_ERROR;
|
||||||
sqlite3SetString(&p->zErrMsg, sqlite3_error_string(p->rc), (char*)0);
|
sqlite3SetString(&p->zErrMsg, sqlite3ErrStr(p->rc), (char*)0);
|
||||||
}else{
|
}else{
|
||||||
Op *pOp = &p->aOp[i];
|
Op *pOp = &p->aOp[i];
|
||||||
Mem *pMem = p->aStack;
|
Mem *pMem = p->aStack;
|
||||||
@@ -935,7 +935,7 @@ int sqlite3VdbeReset(Vdbe *p, char **pzErrMsg){
|
|||||||
int needXcommit = 0;
|
int needXcommit = 0;
|
||||||
|
|
||||||
if( p->magic!=VDBE_MAGIC_RUN && p->magic!=VDBE_MAGIC_HALT ){
|
if( p->magic!=VDBE_MAGIC_RUN && p->magic!=VDBE_MAGIC_HALT ){
|
||||||
sqlite3SetString(pzErrMsg, sqlite3_error_string(SQLITE_MISUSE), (char*)0);
|
sqlite3SetString(pzErrMsg, sqlite3ErrStr(SQLITE_MISUSE), (char*)0);
|
||||||
sqlite3Error(p->db, SQLITE_MISUSE, 0 ,0);
|
sqlite3Error(p->db, SQLITE_MISUSE, 0 ,0);
|
||||||
db->activeVdbeCnt--;
|
db->activeVdbeCnt--;
|
||||||
return SQLITE_MISUSE;
|
return SQLITE_MISUSE;
|
||||||
@@ -949,7 +949,7 @@ int sqlite3VdbeReset(Vdbe *p, char **pzErrMsg){
|
|||||||
}
|
}
|
||||||
p->zErrMsg = 0;
|
p->zErrMsg = 0;
|
||||||
}else if( p->rc ){
|
}else if( p->rc ){
|
||||||
sqlite3SetString(pzErrMsg, sqlite3_error_string(p->rc), (char*)0);
|
sqlite3SetString(pzErrMsg, sqlite3ErrStr(p->rc), (char*)0);
|
||||||
sqlite3Error(p->db, p->rc, 0);
|
sqlite3Error(p->db, p->rc, 0);
|
||||||
}else{
|
}else{
|
||||||
sqlite3Error(p->db, SQLITE_OK, 0);
|
sqlite3Error(p->db, SQLITE_OK, 0);
|
||||||
@@ -1042,9 +1042,9 @@ int sqlite3VdbeFinalize(Vdbe *p, char **pzErrMsg){
|
|||||||
sqlite *db;
|
sqlite *db;
|
||||||
|
|
||||||
if( p->magic!=VDBE_MAGIC_RUN && p->magic!=VDBE_MAGIC_HALT ){
|
if( p->magic!=VDBE_MAGIC_RUN && p->magic!=VDBE_MAGIC_HALT ){
|
||||||
sqlite3SetString(pzErrMsg, sqlite3_error_string(SQLITE_MISUSE), (char*)0);
|
sqlite3SetString(pzErrMsg, sqlite3ErrStr(SQLITE_MISUSE), (char*)0);
|
||||||
if( p->magic==VDBE_MAGIC_INIT ){
|
if( p->magic==VDBE_MAGIC_INIT ){
|
||||||
sqlite3Error(p->db, SQLITE_MISUSE, sqlite3_error_string(SQLITE_MISUSE),0);
|
sqlite3Error(p->db, SQLITE_MISUSE, 0);
|
||||||
}
|
}
|
||||||
return SQLITE_MISUSE;
|
return SQLITE_MISUSE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user