diff --git a/manifest b/manifest index 9e7f8c7095..0c1fb94072 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Synchronize\slemon.c\sto\sthe\sversion\son\sthe\s2.8\sbranch.\s(CVS\s1513) -D 2004-05-31T23:13:45 +C Remove\sthe\ssqlite3_error_string()\sAPI.\s(CVS\s1514) +D 2004-05-31T23:56:43 F Makefile.in ab7b0d5118e2da97bac66be8684a1034e3500f5a F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906 F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd @@ -36,7 +36,7 @@ F src/hash.c 440c2f8cb373ee1b4e13a0988489c7cd95d55b6f F src/hash.h 762d95f1e567664d1eafc1687de755626be962fb F src/insert.c 4268d9e3959cc845ea243fb4ec7507269404dad9 F src/legacy.c ad23746f15f67e34577621b1875f639c94839e1f -F src/main.c 2a5d141a8301888268d02d4366ea568ff440200f +F src/main.c 5e9c2c4342a652a5c4de2e7dcf60cea1acf1fb72 F src/md5.c 4302e84ae516c616bb079c4e6d038c0addb33481 F src/os.h ab42f4a7c4c716f26b988e759b6e12085a3bfc67 F src/os_common.h 744286a27de55c52f1b18921e8d17abbf7fafc0f @@ -53,27 +53,27 @@ F src/pragma.c 7f432dee3c94460638df1e5fffeb59a560943d13 F src/printf.c ef750e8e2398ca7e8b58be991075f08c6a7f0e53 F src/random.c eff68e3f257e05e81eae6c4d50a51eb88beb4ff3 F src/select.c 0297717eb7331604687c2e29c147d3a311359df1 -F src/shell.c cca774504cefa4cf4db27dce175081c6bb7993be -F src/sqlite.h.in 3e2a7cdbfad6b8d1c7f2f3c363476d48388711b3 -F src/sqliteInt.h 950104baea45ee81c9113e3c41b5e9f30def9eaa +F src/shell.c a9e2ad8f6c1d39b04bad61a0ec655e9a3a360b50 +F src/sqlite.h.in 67ae321428f7de80046a12892d289e4024b4976a +F src/sqliteInt.h 8a3a6dc8ef5141563698a3b7a62fca7158cff1f5 F src/table.c af14284fa36c8d41f6829e3f2819dce07d3e2de2 -F src/tclsqlite.c 8146beb4ade50cd83d3bf7a41c8ebddb9840e967 -F src/test1.c 60a589a17ab104b2b4851e6860b08be0c7d753b9 +F src/tclsqlite.c ed8663e7703346ace72ca3899dba15dbfc0883d7 +F src/test1.c 42c494918ecfab5a86586a28a66a73968312aad1 F src/test2.c 6195a1ca2c8d0d2d93644e86da3289b403486872 F src/test3.c 86117b74ec7353d76f5cd85c144c7cda23a7e11b F src/test4.c caf675e443460ec76b04d78e1688986c17c82cec F src/test5.c a894fbfa8a7dcdc2cbc0c38c11149cc5c8252cea -F src/tokenize.c b68758abaccd8882c48209b7a54db975f17d498a +F src/tokenize.c 183c5d7da11affab5d70d903d33409c8c0ce6c5b F src/trigger.c 04b2c310d0d056b213609cab6df5fff03d5eaf88 F src/update.c 259f06e7b22c684b2d3dda54a18185892d6e9573 F src/utf.c c18b4e66bd13872b7199444addaa04785ff1b80a F src/util.c 3b647719c0bece41491300b605cff96a7a26f03a F src/vacuum.c c91acc316127411980982938d050b299d42b81ef -F src/vdbe.c bff63e4fe25a1378bfb6e577fbba3291a4e3625a +F src/vdbe.c cc754eddc0d2e741e57c4557c77754d8bbd93eeb F src/vdbe.h e73f890e0f2a6c42b183d7d6937947930fe4fdeb F src/vdbeInt.h 5d357541db688b21ce05a88b3ea4d9a1fb09f232 F src/vdbeapi.c 77d2e681a992ef189032cd9c1b7bf922f01ebe3e -F src/vdbeaux.c a422970213a2fe9b0048df756fc81f20939eeada +F src/vdbeaux.c 17b99f8d5fb6ec097e38b793c282ddc8a301a5a3 F src/vdbemem.c 5d029d83bc60eaf9c45837fcbc0b03348ec95d7a F src/where.c 444a7c3a8b1eb7bba072e489af628555d21d92a4 F test/all.test 569a92a8ee88f5300c057cc4a8f50fbbc69a3242 @@ -212,7 +212,7 @@ F www/support.tcl 67682848d6ddd283370451dc3da2e56cded9fc9a F www/tclsqlite.tcl 19191cf2a1010eaeff74c51d83fd5f5a4d899075 F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9 F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4 -P f3b80bbb97ed0b0c1cf634068f28f23802ec71a8 -R d129c1da630241ec087f33fd2514dd7b -U drh -Z da82754f0587159beaceb9f3b45617ea +P 6ab3af8847a7b0f1508824c9d8e0ec9685219371 +R 430f7ef65e5c91eaa2bde24b0b951b9f +U danielk1977 +Z cd835fabb1a406eb8762317c7be1255b diff --git a/manifest.uuid b/manifest.uuid index 6a9759bd11..ab789b5d5d 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -6ab3af8847a7b0f1508824c9d8e0ec9685219371 \ No newline at end of file +af8e2006d808031a040f293c44f3bfbe841b866b \ No newline at end of file diff --git a/src/main.c b/src/main.c index ef08c91d94..77ec427361 100644 --- a/src/main.c +++ b/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.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 "os.h" @@ -212,7 +212,7 @@ static int sqlite3InitOne(sqlite *db, int iDb, char **pzErrMsg){ if( db->aDb[iDb].pBt==0 ) return SQLITE_OK; rc = sqlite3BtreeCursor(db->aDb[iDb].pBt, MASTER_ROOT, 0, 0, 0, &curMain); if( rc!=SQLITE_OK && rc!=SQLITE_EMPTY ){ - sqlite3SetString(pzErrMsg, sqlite3_error_string(rc), (char*)0); + sqlite3SetString(pzErrMsg, sqlite3ErrStr(rc), (char*)0); 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]); } if( rc ){ - sqlite3SetString(pzErrMsg, sqlite3_error_string(rc), (char*)0); + sqlite3SetString(pzErrMsg, sqlite3ErrStr(rc), (char*)0); sqlite3BtreeCloseCursor(curMain); return rc; } @@ -493,7 +493,7 @@ void sqlite3RollbackAll(sqlite *db){ ** Return a static string that describes the kind of error specified in the ** argument. */ -const char *sqlite3_error_string(int rc){ +const char *sqlite3ErrStr(int rc){ const char *z; switch( rc ){ 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 ** sqlite3_open() call. */ - return sqlite3_error_string(SQLITE_NOMEM); + return sqlite3ErrStr(SQLITE_NOMEM); } if( db->zErrMsg ){ return db->zErrMsg; } - return sqlite3_error_string(db->errCode); + return sqlite3ErrStr(db->errCode); } /* diff --git a/src/shell.c b/src/shell.c index 8bff195868..0d69ac7c69 100644 --- a/src/shell.c +++ b/src/shell.c @@ -12,7 +12,7 @@ ** This file contains code to implement the "sqlite" command line ** 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 #include @@ -1063,7 +1063,7 @@ static void process_input(struct callback_data *p, FILE *in){ sqlite3_free(zErrMsg); zErrMsg = 0; }else{ - printf("SQL error: %s\n", sqlite3_error_string(rc)); + printf("SQL error: %s\n", sqlite3ErrStr(rc)); } } free(zSql); diff --git a/src/sqlite.h.in b/src/sqlite.h.in index d801b33b7a..9ae774b87b 100644 --- a/src/sqlite.h.in +++ b/src/sqlite.h.in @@ -12,7 +12,7 @@ ** This header file defines the interface that the SQLite library ** 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_ #define _SQLITE_H_ @@ -213,13 +213,6 @@ int sqlite3_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 ** return at its earliest opportunity. This routine is typically ** called in response to a user action such as pressing "Cancel" diff --git a/src/sqliteInt.h b/src/sqliteInt.h index da78ae8282..1fcb4bb9b0 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -11,7 +11,7 @@ ************************************************************************* ** 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 "sqlite3.h" @@ -1357,3 +1357,4 @@ int sqlite3utfTranslate(const void *, int , u8 , void **, int *, u8); u8 sqlite3UtfReadBom(const void *zData, int nData); void *sqlite3HexToBlob(const char *z); int sqlite3TwoPartName(Parse *, Token *, Token *, Token **); +const char *sqlite3ErrStr(int); diff --git a/src/tclsqlite.c b/src/tclsqlite.c index cfdb4da66b..0fa9fe60e3 100644 --- a/src/tclsqlite.c +++ b/src/tclsqlite.c @@ -11,7 +11,7 @@ ************************************************************************* ** 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 */ @@ -773,7 +773,7 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){ free(zErrMsg); rc = TCL_ERROR; }else if( rc!=SQLITE_OK ){ - Tcl_AppendResult(interp, sqlite3_error_string(rc), 0); + Tcl_AppendResult(interp, sqlite3ErrStr(rc), 0); rc = TCL_ERROR; } break; @@ -795,7 +795,7 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){ #ifdef SQLITE_HAS_CODEC rc = sqlite_rekey(pDb->db, pKey, nKey); if( rc ){ - Tcl_AppendResult(interp, sqlite3_error_string(rc), 0); + Tcl_AppendResult(interp, sqlite3ErrStr(rc), 0); rc = TCL_ERROR; } #endif diff --git a/src/test1.c b/src/test1.c index 46791359d3..9a8efce670 100644 --- a/src/test1.c +++ b/src/test1.c @@ -13,7 +13,7 @@ ** is not included in the SQLite library. It is used for automated ** 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 "tcl.h" @@ -722,7 +722,7 @@ static int test_register_func( if( getDbPointer(interp, argv[1], &db) ) return TCL_ERROR; rc = sqlite3_create_function(db, argv[2], -1, 0, 0, 0, testFunc, 0, 0); if( rc!=0 ){ - Tcl_AppendResult(interp, sqlite3_error_string(rc), 0); + Tcl_AppendResult(interp, sqlite3ErrStr(rc), 0); return TCL_ERROR; } return TCL_OK; @@ -839,7 +839,7 @@ static int test_bind( if( rc ){ char zBuf[50]; 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_OK; diff --git a/src/tokenize.c b/src/tokenize.c index 37d7b9f539..aacf745d45 100644 --- a/src/tokenize.c +++ b/src/tokenize.c @@ -15,7 +15,7 @@ ** individual tokens and sends those tokens one-by-one over to the ** 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 "os.h" @@ -479,7 +479,7 @@ abort_parse: } sqlite3ParserFree(pEngine, free); 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); } if( pParse->zErrMsg ){ diff --git a/src/vdbe.c b/src/vdbe.c index 1698584fe0..80d5d96b39 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -43,7 +43,7 @@ ** in this file for details. If in doubt, do not deviate from existing ** 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 "os.h" @@ -2271,7 +2271,7 @@ case OP_Transaction: { p->pTos = pTos; return SQLITE_BUSY; }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; } break; @@ -2473,7 +2473,7 @@ case OP_OpenWrite: { p->pTos = &pTos[1 + (pOp->p2<=0)]; /* Operands must remain on stack */ return SQLITE_BUSY; }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; } break; @@ -4527,7 +4527,7 @@ abort_due_to_misuse: abort_due_to_error: if( p->zErrMsg==0 ){ 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; @@ -4542,6 +4542,6 @@ abort_due_to_interrupt: }else{ rc = SQLITE_INTERRUPT; } - sqlite3SetString(&p->zErrMsg, sqlite3_error_string(rc), (char*)0); + sqlite3SetString(&p->zErrMsg, sqlite3ErrStr(rc), (char*)0); goto vdbe_halt; } diff --git a/src/vdbeaux.c b/src/vdbeaux.c index 20e2016c3e..acf4f8291f 100644 --- a/src/vdbeaux.c +++ b/src/vdbeaux.c @@ -566,7 +566,7 @@ int sqlite3VdbeList( p->rc = SQLITE_INTERRUPT; } rc = SQLITE_ERROR; - sqlite3SetString(&p->zErrMsg, sqlite3_error_string(p->rc), (char*)0); + sqlite3SetString(&p->zErrMsg, sqlite3ErrStr(p->rc), (char*)0); }else{ Op *pOp = &p->aOp[i]; Mem *pMem = p->aStack; @@ -935,7 +935,7 @@ int sqlite3VdbeReset(Vdbe *p, char **pzErrMsg){ int needXcommit = 0; 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); db->activeVdbeCnt--; return SQLITE_MISUSE; @@ -949,7 +949,7 @@ int sqlite3VdbeReset(Vdbe *p, char **pzErrMsg){ } p->zErrMsg = 0; }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); }else{ sqlite3Error(p->db, SQLITE_OK, 0); @@ -1042,9 +1042,9 @@ int sqlite3VdbeFinalize(Vdbe *p, char **pzErrMsg){ sqlite *db; 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 ){ - sqlite3Error(p->db, SQLITE_MISUSE, sqlite3_error_string(SQLITE_MISUSE),0); + sqlite3Error(p->db, SQLITE_MISUSE, 0); } return SQLITE_MISUSE; }