diff options
author | drh <drh@noemail.net> | 2010-02-23 17:36:32 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2010-02-23 17:36:32 +0000 |
commit | 9978c97ec5d480741365687534690f04bc8cc6e4 (patch) | |
tree | 85ee2b948fb789b9245796ca35a2e947e8e662e2 /src/sqliteInt.h | |
parent | 127f9d75e289e3a4cd45a16889bced0d94a1a608 (diff) | |
download | sqlite-9978c97ec5d480741365687534690f04bc8cc6e4.tar.gz sqlite-9978c97ec5d480741365687534690f04bc8cc6e4.zip |
Remove the obsolete sqlite3SafetyOn() mechanism. Add additional logging
output for CORRUPT, and CANTOPEN errors.
FossilOrigin-Name: 7c4cca6d1a23a6d1591b62f58c3716a944969947
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r-- | src/sqliteInt.h | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 4e79cea5f..c14c3c4cb 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -2414,17 +2414,19 @@ int sqlite3WalkSelectFrom(Walker*, Select*); } /* -** The SQLITE_CORRUPT_BKPT macro can be either a constant (for production -** builds) or a function call (for debugging). If it is a function call, -** it allows the operator to set a breakpoint at the spot where database -** corruption is first detected. +** The SQLITE_*_BKPT macros are substitutes for the error codes with +** the same name but without the _BKPT suffix. These macros invoke +** routines that report the line-number on which the error originated +** using sqlite3_log(). The routines also provide a convenient place +** to set a debugger breakpoint. */ -#ifdef SQLITE_DEBUG - int sqlite3Corrupt(void); -# define SQLITE_CORRUPT_BKPT sqlite3Corrupt() -#else -# define SQLITE_CORRUPT_BKPT SQLITE_CORRUPT -#endif +int sqlite3CorruptError(int); +int sqlite3MisuseError(int); +int sqlite3CantopenError(int); +#define SQLITE_CORRUPT_BKPT sqlite3CorruptError(__LINE__) +#define SQLITE_MISUSE_BKPT sqlite3MisuseError(__LINE__) +#define SQLITE_CANTOPEN_BKPT sqlite3CantopenError(__LINE__) + /* ** FTS4 is really an extension for FTS3. It is enabled using the @@ -2724,13 +2726,6 @@ FuncDef *sqlite3FindFunction(sqlite3*,const char*,int,int,u8,int); void sqlite3RegisterBuiltinFunctions(sqlite3*); void sqlite3RegisterDateTimeFunctions(void); void sqlite3RegisterGlobalFunctions(void); -#ifdef SQLITE_DEBUG - int sqlite3SafetyOn(sqlite3*); - int sqlite3SafetyOff(sqlite3*); -#else -# define sqlite3SafetyOn(A) 0 -# define sqlite3SafetyOff(A) 0 -#endif int sqlite3SafetyCheckOk(sqlite3*); int sqlite3SafetyCheckSickOrOk(sqlite3*); void sqlite3ChangeCookie(Parse*, int); |