From 43aad25b1b535f1c8c44ae964bf53e40eb351378 Mon Sep 17 00:00:00 2001 From: dan Date: Mon, 27 Jan 2025 11:50:03 +0000 Subject: Add the sqlite3_setlk_timeout() API. For setting the timeout used by SQLITE_ENABLE_SETLK_TIMEOUT blocking locks without also setting the regular retry-based busy-timeout. FossilOrigin-Name: 4a7eb492797abb47b18b7dfc557aeae43a0dea5b861efc203398d5059b10d131 --- src/sqliteInt.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/sqliteInt.h') diff --git a/src/sqliteInt.h b/src/sqliteInt.h index b8c9136a5..aa12b8976 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -1744,6 +1744,9 @@ struct sqlite3 { Savepoint *pSavepoint; /* List of active savepoints */ int nAnalysisLimit; /* Number of index rows to ANALYZE */ int busyTimeout; /* Busy handler timeout, in msec */ +#ifdef SQLITE_ENABLE_SETLK_TIMEOUT + int setlkTimeout; /* Blocking lock timeout, in msec */ +#endif int nSavepoint; /* Number of non-transaction savepoints */ int nStatement; /* Number of nested statement-transactions */ i64 nDeferredCons; /* Net deferred constraints this transaction. */ -- cgit v1.2.3 From 462888819e3582e30c8a513285bd4d524a64f66e Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 30 Jan 2025 15:26:16 +0000 Subject: Have sqlite3_enable_setlk(-1) configure indefinite blocking locks where they are supported. FossilOrigin-Name: 62009565d2f2a2c4d347e1da0d5b4ad43056742df47fd6ddb92e62f53a2b57f1 --- src/sqliteInt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sqliteInt.h') diff --git a/src/sqliteInt.h b/src/sqliteInt.h index aa12b8976..631bb2a24 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -1745,7 +1745,7 @@ struct sqlite3 { int nAnalysisLimit; /* Number of index rows to ANALYZE */ int busyTimeout; /* Busy handler timeout, in msec */ #ifdef SQLITE_ENABLE_SETLK_TIMEOUT - int setlkTimeout; /* Blocking lock timeout, in msec */ + int setlkTimeout; /* Blocking lock timeout, in msec. -1 -> inf. */ #endif int nSavepoint; /* Number of non-transaction savepoints */ int nStatement; /* Number of nested statement-transactions */ -- cgit v1.2.3 From 0d9f2a15f236dd87b05d33c8c1e09df1f4612b75 Mon Sep 17 00:00:00 2001 From: drh <> Date: Mon, 3 Feb 2025 21:04:21 +0000 Subject: The Parse.addrExplain field is never even if SQLITE_OMIT_EXPLAIN is defined. FossilOrigin-Name: 5d81a984c6aabb9fa9180efde8ca942b40f1ec18ff5a89f2fbb1252734f051d3 --- src/sqliteInt.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/sqliteInt.h') diff --git a/src/sqliteInt.h b/src/sqliteInt.h index a37e0523a..f47009c15 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -3914,9 +3914,7 @@ struct Parse { int nVtabLock; /* Number of virtual tables to lock */ #endif int nHeight; /* Expression tree height of current sub-select */ -#ifndef SQLITE_OMIT_EXPLAIN int addrExplain; /* Address of current OP_Explain opcode */ -#endif VList *pVList; /* Mapping between variable names and numbers */ Vdbe *pReprepare; /* VM being reprepared (sqlite3Reprepare()) */ const char *zTail; /* All SQL text past the last semicolon parsed */ -- cgit v1.2.3 From ede1690cce75ecd6fb965c2ff99c54f92e694ed6 Mon Sep 17 00:00:00 2001 From: drh <> Date: Fri, 7 Feb 2025 13:37:15 +0000 Subject: Reduce the amount of memset() needed to initialize the Parse object. FossilOrigin-Name: 284538d8486ef3e9bee1ab980043b53c144743c31b984be13a5cc137e7cbec31 --- src/sqliteInt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/sqliteInt.h') diff --git a/src/sqliteInt.h b/src/sqliteInt.h index f47009c15..bbef593df 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -3879,8 +3879,6 @@ struct Parse { int addrCrTab; /* Address of OP_CreateBtree on CREATE TABLE */ Returning *pReturning; /* The RETURNING clause */ } u1; - u32 oldmask; /* Mask of old.* columns referenced */ - u32 newmask; /* Mask of new.* columns referenced */ LogEst nQueryLoop; /* Est number of iterations of a query (10*log2(N)) */ u8 eTriggerOp; /* TK_UPDATE, TK_INSERT or TK_DELETE */ u8 bReturning; /* Coding a RETURNING trigger */ @@ -3897,6 +3895,8 @@ struct Parse { int aTempReg[8]; /* Holding area for temporary registers */ Parse *pOuterParse; /* Outer Parse object when nested */ Token sNameToken; /* Token with unqualified schema object name */ + u32 oldmask; /* Mask of old.* columns referenced */ + u32 newmask; /* Mask of new.* columns referenced */ /************************************************************************ ** Above is constant between recursions. Below is reset before and after -- cgit v1.2.3 From 7fd936e5ed08c3bae9207c092a22a5c98520a3cb Mon Sep 17 00:00:00 2001 From: drh <> Date: Fri, 7 Feb 2025 15:49:21 +0000 Subject: Further reduction in the amount of memset() needed to initialize the Parse object. FossilOrigin-Name: 45e462c0060e51c3375a226d636148e3415ee6020e544ecc84861c7aef4ecf7b --- src/sqliteInt.h | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'src/sqliteInt.h') diff --git a/src/sqliteInt.h b/src/sqliteInt.h index bbef593df..acc36f07c 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -3841,6 +3841,8 @@ struct Parse { #endif #ifdef SQLITE_DEBUG u8 ifNotExists; /* Might be true if IF NOT EXISTS. Assert()s only */ + u8 isCreate; /* CREATE TABLE, INDEX, or VIEW (but not TRIGGER) + ** and ALTER TABLE ADD COLUMN. */ #endif int nRangeReg; /* Size of the temporary register block */ int iRangeReg; /* First register in temporary register block */ @@ -3856,11 +3858,8 @@ struct Parse { ExprList *pConstExpr;/* Constant expressions */ IndexedExpr *pIdxEpr;/* List of expressions used by active indexes */ IndexedExpr *pIdxPartExpr; /* Exprs constrained by index WHERE clauses */ - Token constraintName;/* Name of the constraint currently being parsed */ yDbMask writeMask; /* Start a write transaction on these databases */ yDbMask cookieMask; /* Bitmask of schema verified databases */ - int regRowid; /* Register holding rowid of CREATE TABLE entry */ - int regRoot; /* Register holding root page number for new objects */ int nMaxArg; /* Max args passed to user function by sub-program */ int nSelect; /* Number of SELECT stmts. Counter for Select.selId */ #ifndef SQLITE_OMIT_PROGRESS_CALLBACK @@ -3875,10 +3874,6 @@ struct Parse { Table *pTriggerTab; /* Table triggers are being coded for */ TriggerPrg *pTriggerPrg; /* Linked list of coded triggers */ ParseCleanup *pCleanup; /* List of cleanup operations to run after parse */ - union { - int addrCrTab; /* Address of OP_CreateBtree on CREATE TABLE */ - Returning *pReturning; /* The RETURNING clause */ - } u1; LogEst nQueryLoop; /* Est number of iterations of a query (10*log2(N)) */ u8 eTriggerOp; /* TK_UPDATE, TK_INSERT or TK_DELETE */ u8 bReturning; /* Coding a RETURNING trigger */ @@ -3897,6 +3892,17 @@ struct Parse { Token sNameToken; /* Token with unqualified schema object name */ u32 oldmask; /* Mask of old.* columns referenced */ u32 newmask; /* Mask of new.* columns referenced */ + union { + struct { /* These fields available when isCreate is true */ + int addrCrTab; /* Address of OP_CreateBtree on CREATE TABLE */ + int regRowid; /* Register holding rowid of CREATE TABLE entry */ + int regRoot; /* Register holding root page for new objects */ + Token constraintName; /* Name of the constraint currently being parsed */ + } cr; + struct { /* These fields available to all other statements */ + Returning *pReturning; /* The RETURNING clause */ + } d; + } u1; /************************************************************************ ** Above is constant between recursions. Below is reset before and after -- cgit v1.2.3 From 84b0f221f4e92139077d8246cc373e8264224a97 Mon Sep 17 00:00:00 2001 From: drh <> Date: Fri, 7 Feb 2025 19:09:20 +0000 Subject: Fix comments on the Parse.nMaxArgs field so that they are correct. Add assert()s to ensure they are correct. Other Parse changes to reduce the amount of memset() needed to initialize it. FossilOrigin-Name: c56092507c96723030589ddd9121bc993d615a7acd453305fc3b1dbb9e30554c --- src/sqliteInt.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/sqliteInt.h') diff --git a/src/sqliteInt.h b/src/sqliteInt.h index acc36f07c..359ed1b6b 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -3823,19 +3823,20 @@ struct Parse { char *zErrMsg; /* An error message */ Vdbe *pVdbe; /* An engine for executing database bytecode */ int rc; /* Return code from execution */ - u8 colNamesSet; /* TRUE after OP_ColumnName has been issued to pVdbe */ - u8 checkSchema; /* Causes schema cookie check after an error */ + LogEst nQueryLoop; /* Est number of iterations of a query (10*log2(N)) */ u8 nested; /* Number of nested calls to the parser/code generator */ u8 nTempReg; /* Number of temporary registers in aTempReg[] */ u8 isMultiWrite; /* True if statement may modify/insert multiple rows */ u8 mayAbort; /* True if statement may throw an ABORT exception */ u8 hasCompound; /* Need to invoke convertCompoundSelectToSubquery() */ - u8 okConstFactor; /* OK to factor out constants */ u8 disableLookaside; /* Number of times lookaside has been disabled */ u8 prepFlags; /* SQLITE_PREPARE_* flags */ u8 withinRJSubrtn; /* Nesting level for RIGHT JOIN body subroutines */ - u8 bHasWith; /* True if statement contains WITH */ u8 mSubrtnSig; /* mini Bloom filter on available SubrtnSig.selId */ + u8 eTriggerOp; /* TK_UPDATE, TK_INSERT or TK_DELETE */ + u8 bReturning; /* Coding a RETURNING trigger */ + u8 eOrconf; /* Default ON CONFLICT policy for trigger steps */ + u8 disableTriggers; /* True to disable triggers */ #if defined(SQLITE_DEBUG) || defined(SQLITE_COVERAGE_TEST) u8 earlyCleanup; /* OOM inside sqlite3ParserAddCleanup() */ #endif @@ -3844,6 +3845,10 @@ struct Parse { u8 isCreate; /* CREATE TABLE, INDEX, or VIEW (but not TRIGGER) ** and ALTER TABLE ADD COLUMN. */ #endif + u8 colNamesSet :1; /* TRUE after OP_ColumnName has been issued to pVdbe */ + u8 bHasWith :1; /* True if statement contains WITH */ + u8 okConstFactor :1; /* OK to factor out constants */ + u8 checkSchema :1; /* Causes schema cookie check after an error */ int nRangeReg; /* Size of the temporary register block */ int iRangeReg; /* First register in temporary register block */ int nErr; /* Number of errors seen */ @@ -3860,7 +3865,7 @@ struct Parse { IndexedExpr *pIdxPartExpr; /* Exprs constrained by index WHERE clauses */ yDbMask writeMask; /* Start a write transaction on these databases */ yDbMask cookieMask; /* Bitmask of schema verified databases */ - int nMaxArg; /* Max args passed to user function by sub-program */ + int nMaxArg; /* Max args to xUpdate and xFilter vtab methods */ int nSelect; /* Number of SELECT stmts. Counter for Select.selId */ #ifndef SQLITE_OMIT_PROGRESS_CALLBACK u32 nProgressSteps; /* xProgress steps taken during sqlite3_prepare() */ @@ -3874,11 +3879,6 @@ struct Parse { Table *pTriggerTab; /* Table triggers are being coded for */ TriggerPrg *pTriggerPrg; /* Linked list of coded triggers */ ParseCleanup *pCleanup; /* List of cleanup operations to run after parse */ - LogEst nQueryLoop; /* Est number of iterations of a query (10*log2(N)) */ - u8 eTriggerOp; /* TK_UPDATE, TK_INSERT or TK_DELETE */ - u8 bReturning; /* Coding a RETURNING trigger */ - u8 eOrconf; /* Default ON CONFLICT policy for trigger steps */ - u8 disableTriggers; /* True to disable triggers */ /************************************************************************** ** Fields above must be initialized to zero. The fields that follow, -- cgit v1.2.3 From 03c65171b8ff533b28927a1e5fb7939b87077de0 Mon Sep 17 00:00:00 2001 From: drh <> Date: Sat, 8 Feb 2025 13:34:19 +0000 Subject: Fix GCC-isms and compiler warnings introduced by recent check-ins [c56092507c967230] and [6e57848fe1e0e2b5]. FossilOrigin-Name: 91102c04375f83cffcd0f3204870e476636f651710e9e6fb773cf74085ef7636 --- src/sqliteInt.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/sqliteInt.h') diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 359ed1b6b..e46744a12 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -843,6 +843,11 @@ typedef INT16_TYPE i16; /* 2-byte signed integer */ typedef UINT8_TYPE u8; /* 1-byte unsigned integer */ typedef INT8_TYPE i8; /* 1-byte signed integer */ +/* A bitfield type for use inside of structures. Always follow with :N where +** N is the number of bits. +*/ +typedef unsigned bft; /* Bit Field Type */ + /* ** SQLITE_MAX_U32 is a u64 constant that is the maximum u64 value ** that can be stored in a u32 without loss of data. The value @@ -3845,10 +3850,10 @@ struct Parse { u8 isCreate; /* CREATE TABLE, INDEX, or VIEW (but not TRIGGER) ** and ALTER TABLE ADD COLUMN. */ #endif - u8 colNamesSet :1; /* TRUE after OP_ColumnName has been issued to pVdbe */ - u8 bHasWith :1; /* True if statement contains WITH */ - u8 okConstFactor :1; /* OK to factor out constants */ - u8 checkSchema :1; /* Causes schema cookie check after an error */ + bft colNamesSet :1; /* TRUE after OP_ColumnName has been issued to pVdbe */ + bft bHasWith :1; /* True if statement contains WITH */ + bft okConstFactor :1; /* OK to factor out constants */ + bft checkSchema :1; /* Causes schema cookie check after an error */ int nRangeReg; /* Size of the temporary register block */ int iRangeReg; /* First register in temporary register block */ int nErr; /* Number of errors seen */ -- cgit v1.2.3 From 66172ceb890bb0e6a03478f02b5603335abdfe1e Mon Sep 17 00:00:00 2001 From: drh <> Date: Sat, 8 Feb 2025 16:16:08 +0000 Subject: Put a 16-byte hash table for column names on each Table object, to speed up column name lookups. FossilOrigin-Name: 11eb8f99e5c4974cb6ba39e5bbc99f6b88b9e01006b70d5fea85c2a6d4f7044f --- src/sqliteInt.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/sqliteInt.h') diff --git a/src/sqliteInt.h b/src/sqliteInt.h index e46744a12..c8ecaf857 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -2431,6 +2431,7 @@ struct Table { } u; Trigger *pTrigger; /* List of triggers on this object */ Schema *pSchema; /* Schema that contains this table */ + u8 aHx[16]; /* Column aHt[K%sizeof(aHt)] might have hash K */ }; /* -- cgit v1.2.3 From 2d878947004909b22c2057eb124b9d00fabe8d82 Mon Sep 17 00:00:00 2001 From: dan Date: Mon, 10 Feb 2025 20:46:14 +0000 Subject: Experimental change to allow clients to block when taking a SHARED lock to connect to a wal mode database. FossilOrigin-Name: d2d6a000fb9bf8097e0ce9979685408d183be3ab785ceeb11ec1f97a81a83e41 --- src/sqliteInt.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/sqliteInt.h') diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 631bb2a24..f56625cef 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -1746,6 +1746,7 @@ struct sqlite3 { int busyTimeout; /* Busy handler timeout, in msec */ #ifdef SQLITE_ENABLE_SETLK_TIMEOUT int setlkTimeout; /* Blocking lock timeout, in msec. -1 -> inf. */ + int setlkFlags; /* Flags passed to setlk_timeout() */ #endif int nSavepoint; /* Number of non-transaction savepoints */ int nStatement; /* Number of nested statement-transactions */ -- cgit v1.2.3 From ef86b942b9ffbfc2086da7865effea3e7950c7a0 Mon Sep 17 00:00:00 2001 From: drh <> Date: Mon, 17 Feb 2025 17:33:14 +0000 Subject: Code changes that make it easier to prove that no 32-bit integer overflows happen during memory allocation. No problems fixed; this change is just to make future maintenance easier. FossilOrigin-Name: 215650a5a1d55bdbca9c92524804a1a54456a17f42a17e53747b21a6507506f5 --- src/sqliteInt.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/sqliteInt.h') diff --git a/src/sqliteInt.h b/src/sqliteInt.h index c8ecaf857..6ebd8eb4f 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -1016,6 +1016,14 @@ typedef INT16_TYPE LogEst; #define LARGEST_UINT64 (0xffffffff|(((u64)0xffffffff)<<32)) #define SMALLEST_INT64 (((i64)-1) - LARGEST_INT64) +/* +** Macro SMXV(n) return the maximum value that can be held in variable n, +** assuming n is a signed integer type. UMXV(n) is similar for unsigned +** integer types. +*/ +#define SMXV(n) ((((i64)1)<<(sizeof(n)-1))-1) +#define UMXV(n) ((((i64)1)<<(sizeof(n)))-1) + /* ** Round up a number to the next larger multiple of 8. This is used ** to force 8-byte alignment on 64-bit architectures. -- cgit v1.2.3 From ce25007db8df01e3271486574d520d4dea4cf97a Mon Sep 17 00:00:00 2001 From: drh <> Date: Fri, 21 Feb 2025 17:03:22 +0000 Subject: Detect when a UNIQUE or PRIMARY KEY on a WITHOUT ROWID table would need to use more than SQLITE_LIMIT_COLUMN columns and raise an error. Also include some unrelated compiler warning fixes. FossilOrigin-Name: d7729dbbf231d57cbcaaa5004d0a9c4957f112dd6520052995b232aa521c0ca3 --- src/sqliteInt.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/sqliteInt.h') diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 6ebd8eb4f..d4b998309 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -3097,10 +3097,10 @@ struct Expr { /* Macros can be used to test, set, or clear bits in the ** Expr.flags field. */ -#define ExprHasProperty(E,P) (((E)->flags&(P))!=0) -#define ExprHasAllProperty(E,P) (((E)->flags&(P))==(P)) -#define ExprSetProperty(E,P) (E)->flags|=(P) -#define ExprClearProperty(E,P) (E)->flags&=~(P) +#define ExprHasProperty(E,P) (((E)->flags&(u32)(P))!=0) +#define ExprHasAllProperty(E,P) (((E)->flags&(u32)(P))==(u32)(P)) +#define ExprSetProperty(E,P) (E)->flags|=(u32)(P) +#define ExprClearProperty(E,P) (E)->flags&=~(u32)(P) #define ExprAlwaysTrue(E) (((E)->flags&(EP_OuterON|EP_IsTrue))==EP_IsTrue) #define ExprAlwaysFalse(E) (((E)->flags&(EP_OuterON|EP_IsFalse))==EP_IsFalse) #define ExprIsFullSize(E) (((E)->flags&(EP_Reduced|EP_TokenOnly))==0) @@ -4908,7 +4908,7 @@ void sqlite3SubqueryColumnTypes(Parse*,Table*,Select*,char); Table *sqlite3ResultSetOfSelect(Parse*,Select*,char); void sqlite3OpenSchemaTable(Parse *, int); Index *sqlite3PrimaryKeyIndex(Table*); -i16 sqlite3TableColumnToIndex(Index*, i16); +i16 sqlite3TableColumnToIndex(Index*, int); #ifdef SQLITE_OMIT_GENERATED_COLUMNS # define sqlite3TableColumnToStorage(T,X) (X) /* No-op pass-through */ # define sqlite3StorageColumnToTable(T,X) (X) /* No-op pass-through */ -- cgit v1.2.3 From cc803b209f2ffa9dcaad43c37eb8ccafaed199bd Mon Sep 17 00:00:00 2001 From: drh <> Date: Fri, 21 Feb 2025 20:35:37 +0000 Subject: The number of declared columns in an index is limited to SQLITE_LIMIT_COLUMN. But the actual number of columns in the implementation might need to be twice as much to account for the primary key at the end. Ensure that the code is able to deal with this. This is a correction to check-in [d7729dbbf231d57c]. FossilOrigin-Name: 5822feec43be9352fd87bf9968c39c0218e01ab5fe3ba50431ae21cba79e6c89 --- src/sqliteInt.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/sqliteInt.h') diff --git a/src/sqliteInt.h b/src/sqliteInt.h index d4b998309..de3ce7aa2 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -2759,7 +2759,7 @@ struct Index { Pgno tnum; /* DB Page containing root of this index */ LogEst szIdxRow; /* Estimated average row size in bytes */ u16 nKeyCol; /* Number of columns forming the key */ - u16 nColumn; /* Number of columns stored in the index */ + u16 nColumn; /* Nr columns in btree. Can be 2*Table.nCol */ u8 onError; /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */ unsigned idxType:2; /* 0:Normal 1:UNIQUE, 2:PRIMARY KEY, 3:IPK */ unsigned bUnordered:1; /* Use this index for == or IN queries only */ @@ -4908,7 +4908,7 @@ void sqlite3SubqueryColumnTypes(Parse*,Table*,Select*,char); Table *sqlite3ResultSetOfSelect(Parse*,Select*,char); void sqlite3OpenSchemaTable(Parse *, int); Index *sqlite3PrimaryKeyIndex(Table*); -i16 sqlite3TableColumnToIndex(Index*, int); +int sqlite3TableColumnToIndex(Index*, int); #ifdef SQLITE_OMIT_GENERATED_COLUMNS # define sqlite3TableColumnToStorage(T,X) (X) /* No-op pass-through */ # define sqlite3StorageColumnToTable(T,X) (X) /* No-op pass-through */ @@ -5006,7 +5006,7 @@ void sqlite3SrcListAssignCursors(Parse*, SrcList*); void sqlite3IdListDelete(sqlite3*, IdList*); void sqlite3ClearOnOrUsing(sqlite3*, OnOrUsing*); void sqlite3SrcListDelete(sqlite3*, SrcList*); -Index *sqlite3AllocateIndexObject(sqlite3*,i16,int,char**); +Index *sqlite3AllocateIndexObject(sqlite3*,int,int,char**); void sqlite3CreateIndex(Parse*,Token*,Token*,SrcList*,ExprList*,int,Token*, Expr*, int, int, u8); void sqlite3DropIndex(Parse*, SrcList*, int); -- cgit v1.2.3 From b6205d4bc346c48b61d2fbba3e2030bc12e74ed5 Mon Sep 17 00:00:00 2001 From: drh <> Date: Mon, 24 Feb 2025 13:51:24 +0000 Subject: Add the unistr_quote() function that works like quote(), but also escape control characters using unistr() if necessary. FossilOrigin-Name: e99e37b54baf7283588ead4983e613a1e14c58a0b92be5f7b25b4d9d287b5324 --- src/sqliteInt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sqliteInt.h') diff --git a/src/sqliteInt.h b/src/sqliteInt.h index de3ce7aa2..5e3ec4dad 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -5142,7 +5142,7 @@ Select *sqlite3SelectDup(sqlite3*,const Select*,int); FuncDef *sqlite3FunctionSearch(int,const char*); void sqlite3InsertBuiltinFuncs(FuncDef*,int); FuncDef *sqlite3FindFunction(sqlite3*,const char*,int,u8,u8); -void sqlite3QuoteValue(StrAccum*,sqlite3_value*); +void sqlite3QuoteValue(StrAccum*,sqlite3_value*,int); void sqlite3RegisterBuiltinFunctions(void); void sqlite3RegisterDateTimeFunctions(void); void sqlite3RegisterJsonFunctions(void); -- cgit v1.2.3 From a357a90f12e927ec169168cd89e54dc4fa905717 Mon Sep 17 00:00:00 2001 From: drh <> Date: Tue, 25 Feb 2025 11:47:34 +0000 Subject: Consolidate two different UTF8 encoders into a single subroutine. FossilOrigin-Name: 6208e494858b9d362efc7db4e8aac6f8e93fe51d2e038c94dfa97c55a74688a0 --- src/sqliteInt.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/sqliteInt.h') diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 5e3ec4dad..a1cfe8920 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -5143,6 +5143,7 @@ FuncDef *sqlite3FunctionSearch(int,const char*); void sqlite3InsertBuiltinFuncs(FuncDef*,int); FuncDef *sqlite3FindFunction(sqlite3*,const char*,int,u8,u8); void sqlite3QuoteValue(StrAccum*,sqlite3_value*,int); +int sqlite3AppendOneUtf8Character(char*, u32); void sqlite3RegisterBuiltinFunctions(void); void sqlite3RegisterDateTimeFunctions(void); void sqlite3RegisterJsonFunctions(void); -- cgit v1.2.3