aboutsummaryrefslogtreecommitdiff
path: root/src/callback.c
AgeCommit message (Collapse)AuthorLines
2025-11-13A better fix for the issue with RETURNING triggers on eponymous virtual ↵dan-10/+3
tables and SQLITE_SCHEMA errors first addressed by [45d820ca22]. FossilOrigin-Name: bf399992cb98e5d5f002a90b521328d5c2f113ebab8601653452d78222077bde
2025-11-10Avoid dropping RETURNING triggers when the schema is reset while preparing a ↵dan-2/+10
statement. FossilOrigin-Name: e26bcef7522a6f6ee8d55fa30e7fe06419566cf4e8c2df0c33c92a4c89f58c05
2025-01-21The FuncDev.nArg field values -3 and -4 now have special meansing of 1 or moredrh-2/+8
or 2 or more arguments, respectively. This saves space in the built-in function table, resulting in slightly faster performance and a reduced binary size. FossilOrigin-Name: 753fd747f24c5e9a019eb00b8a4f66e65c6733ba10a7adbd1b55786867c32ca6
2023-05-12Ensure that all prepared statements are expired and forced to repreparedrh-0/+1
whenever the database text encoding changes. [forum:/forumpost/43cbfc4d23|Forum post 43cbfc4d23]. FossilOrigin-Name: 469718f106e1cfa7f8f4714a9e743108c361af81e0258061c2b76880a7c352ae
2022-08-22Add the new internal interface sqlite3DbNNFreeNN(db,ptr) where both thedrh-2/+4
db and ptr parameters are guaranteed to be non-NULL. Use this where appropriate to save more than 2 million CPU cycles on the standard performance test. FossilOrigin-Name: e5eaa80e81fdf86f2875a912b880272b8d099b82b08e945a7988c5dd0fe9d6b5
2022-01-08Merge the JSON function enhancements from the json-enhancements branch intodrh-1/+0
json-in-core. FossilOrigin-Name: e116501c2f0e594eb7a3dd804daa943cc508f32ded3078aed21b695ec83bcd4c
2021-10-07Protect all accesses to the FuncDef.u and Expr.u unions using nearbydrh-0/+2
assert()s or branches. FossilOrigin-Name: 9af863f065e0bef491c2ab7525194505f9516f4e6dfc789d2e3a9d2c2438533a
2020-03-05Change the sqlite3.pDfltColl (the default collating sequence for thedrh-3/+16
database connection) so that it is the collating sequence appropriate for the database encoding, not the UTF8 collating sequence. This helps to ensure that the database encoding collation is always used, even for expressions that do not have an defined collating sequence. Ticket [1b8d7264567eb6fc]. FossilOrigin-Name: 4a5851893c3d71cc823b6ab5df5e58a852cd322fff26290f1ea05b63d67f564a
2020-01-08Performance improvements and test cases added. Allow "PRAGMA trusted_schema=ON"drh-4/+5
FossilOrigin-Name: 30882ca80f6c51f6bb7b2692c1ac3f19a7c61a23aa8730be79aec0ae3ef08d54
2019-10-22Move the sqlite3LocateCollSeq(), sqlite3FindCollSeq(), anddrh-49/+83
sqlite3GetCollSeq() routines so that they are all beside one another in the callback.c source file. No logic changes. FossilOrigin-Name: 9ff80a9bf8fee776e2f282d0597215b77d48093ebc71d047ad1457da0582ddbc
2018-12-05Simplifications to the sqlite3_normalized_sql() implementation.drh-18/+3
FossilOrigin-Name: 94ea6379178e3ff6a0d1d5819ca4ac558bdadb1ca8a3637c797079db7dc0cd61
2018-10-29Add the sqlite3_normalized_sql() API.mistachkin-2/+17
FossilOrigin-Name: 592b66e8058dd03a056a036e2606247c9efdb06d15eebe9bcc455f7f55e30ae6
2018-05-26Store application-defined function names as lower-case to avoid the needdrh-0/+2
for case conversions before calling xFindFunction on virtual tables. Avoid using lookaside to store the destructors for application defined functions, as lookaside should be reserved for transient allocations. FossilOrigin-Name: 777189ce88799f93f393fd14fd716111c85bcdcb23690fd561f78ea2bd2ce5da
2017-12-08The query planner tries to avoids using indexes that use unknown collatingdrh-0/+1
functions. FossilOrigin-Name: 02013fc120bf71a8be3550c696a588af8c92f2209f8e5db530624878ddc8aa7e
2017-08-17Defer schema resets when the query planner is running.drh-1/+1
Proposed fix for ticket [be436a7f4587ce517]. FossilOrigin-Name: a7bc7752ba0266684f5317e424a4ee9add4af002272082183519e708ab9ffc79
2017-07-26Add the new sqlite3.mDbFlags field. Factor out bits of sqlite3.flags thatdrh-2/+2
do not interact with PRAGMA statements into sqlite3.mDbFlags. FossilOrigin-Name: 3808a00f06d372cc531da039d97bd974e4a6576a30cf63bf562f83f186b313b3
2017-07-06Avoid unnecessary upper-to-lower case conversion for function names whendrh-1/+2
registering the built-in functions. FossilOrigin-Name: 06269257647db51fbc9f8cda88abac5db28b6f917a509768af7686dfa2b94511
2017-07-06Small size reduction in findCollSeqEntry().drh-3/+2
FossilOrigin-Name: 55ecd30304517acd23f89b3450fd6a5e18ac2f79aa24a4ff693f8d71a49f7837
2017-07-06Avoid unnecessary calls to sqlite3GetCollSeq() for a small performance gain.drh-1/+1
FossilOrigin-Name: 503ba172e4c32e288abf006fc5cb53fd2b0313c4ee4c526c2d9c4c21b7178f2d
2016-02-24Change a char* to const char* in order to suppress some harmlessdrh-2/+2
compiler warnings. FossilOrigin-Name: 56f62e34ae9d5c7db07367f0007df258b2e76bd2
2016-02-15Improvements to the application-defined function mechanism so that it isdrh-30/+38
more compact and runs faster, especially when the application defines thousands of new SQL functions. FossilOrigin-Name: 3201fbcc5105d23132e6b8b7ac825e66af4f8a39
2016-02-05Improvements to the way that OOM errors are processed.drh-2/+2
FossilOrigin-Name: c3ef03478a5788c855b3aef385d43ae7f494f440
2016-01-14Combine the xFunc and xStep pointers of the FuncDef object into a singledrh-5/+5
pointer xSFunc. FossilOrigin-Name: 0d1b3d7d3ca66cb0b97493f1aeade1703af3c9f4
2014-09-06Fix typos in comments. No code changes.peter.d.reid-1/+1
FossilOrigin-Name: e62aab5e9290503869e1f4d5e0fefd2b4dee0a69
2014-08-21Simplify the interface to the symbol table, saving 600 bytes of code space.drh-4/+4
FossilOrigin-Name: 14b0f561fe15622b61c6676c9c455dca6b9ba5f0
2014-08-05Rename the internal Schema.flags field to Schema.schemaFlags.drh-2/+2
FossilOrigin-Name: 5ae80b3c8f032528359c8c762505ce24da8db96f
2013-12-14Allow the SQLITE_DETERMINISTIC flag to be ORed into the preferred text encodingdrh-1/+0
of application-defined functions, to mark the function as deterministic. FossilOrigin-Name: 5716fc2341ddd8cf64139e7168597f864da4e10b
2013-09-06Combine the FuncDef.iPrefEnc and FuncDef.flags fields into a singledrh-3/+3
new FuncDef.funcFlags field. FossilOrigin-Name: 97b10e66e98e84755aa577f8da017bf1aea2056c
2012-10-05Consolidate all occurrences of the "no such collation sequence" error messagedrh-5/+7
into a single spot. FossilOrigin-Name: 8ea67522fb03134f355ecb776b70c6917241cab2
2012-04-07Fix the application-defined function logic so that functions with a variabledrh-35/+54
number of parameters can be replaced or deleted correctly. Also refactor some of the function-finder code for clarity of presentation. FossilOrigin-Name: 09d5581c81fb6a9bf6a369d0abf5ef6b54637576
2011-04-04Rename sqlite3SchemaFree() to sqlite3SchemaClear() to more accurately reflectdrh-3/+3
its function. FossilOrigin-Name: 71d7440023f67760d0bff4bd7459fe88bd226f30
2011-03-18Add a generation counter to the Schema object and enhance OP_VerifySchemadrh-1/+4
to also check the Schema generation. Fix for ticket [f7b4edece25c99]. FossilOrigin-Name: 36c04dd1695f0899b53ce58738181b146fc005ed
2010-09-16Updates to the requirements on the sqlite3_create_function() family ofdrh-1/+1
interfaces. FossilOrigin-Name: f03c608993d1c37b45ba8e0a6a4e941bdcb57ffa
2010-07-24Make sure all memory from sqlite3DbMalloc() is freed by sqlite3DbFree() anddrh-1/+1
all memory from sqlite3_malloc() is freed by sqlite3_free(). FossilOrigin-Name: ac1f37a647e9ed1c00a901d26d9956a86c40117a
2010-07-23Remove additional traces (mostly in comments) of the Table.dbMem field.drh-1/+0
FossilOrigin-Name: 5c58f44aeb224e106497368d9290d75a08807761
2010-07-23Remove the Table.dbMem variable, as it is no longer being used for its ↵dan-1/+1
original purpose. FossilOrigin-Name: 6eddc6e601cf8f585c6c2cf79f36fcbfe98a307e
2010-04-24When commands such as ALTER TABLE and VACUUM use SQL internally, make suredrh-1/+6
they use only the built-in functions and not application-defined overrides for those functions. FossilOrigin-Name: 0291ed974d5bf1e344e2c38422530cc961b897da
2009-11-10Remove the obsolete "$Id:$" RCS identifier strings from the source code.drh-2/+0
FossilOrigin-Name: f6c045f649036958078cb15cd9d5453680c82b0c
2009-09-19Check in implementation of foreign key constraints.dan-0/+2
FossilOrigin-Name: d5d399811876391642937edeb9e8434dd9e356f5
2009-09-07Warning cleanup from the MSVC compile.shane-1/+1
FossilOrigin-Name: 26cd015c0ee1c18dd37f11b47ce35cfa320b3514
2009-08-20All the sqlite3GetCollSeq() function to specify an arbitrary text encoding.drh-10/+10
FossilOrigin-Name: 4ee44322ca3c92ed8d6f5d4a3f89d219bf379595
2009-06-17Changes to prepare.c and callback.c to promote better test coverage. (CVS 6770)drh-5/+2
FossilOrigin-Name: 08cca219f16efab93cb00f04d2e2f8033893e5f1
2009-05-20Updates to the extension loading logic to support full coverage testing. ↵drh-1/+2
(CVS 6659) FossilOrigin-Name: 929cfbc66f6e2ea6b44417305d0f4ae36567c9bf
2009-05-11Rework the logic that generates a schema for tables created using drh-22/+21
"CREATE TABLE ... AS SELECT ...". Instead of trying to copy the raw datatype string from the right-hand side, just make the type one of TEXT, INT, REAL, NUM, or nothing. This is much simpler than trying to parse and quote datatype strings. Other minor implifications to build.c are bundled with this change. (CVS 6626) FossilOrigin-Name: 33cf83591e6e13875ef6ada5b8ac8ab07619d8bc
2009-05-03Changes to facility full coverage testing of util.c. (CVS 6597)drh-3/+3
FossilOrigin-Name: a612299092a48b38c5f9cf430bbcaf41777cbcb3
2009-05-02Remove the aFKey hash table, which was not being used. Simplify thedrh-8/+6
FKey object. Simplify the hash.c module since the copyKey parameter formerly used only by aFKey is now no longer required. (CVS 6594) FossilOrigin-Name: 80c43a355c6e482457abc2f9c3ad3a565cec55fb
2009-03-24Changes to insure that lookaside memory allocations are never used to hold drh-1/+2
schema content. Ticket #3743. (CVS 6377) FossilOrigin-Name: ea74d8dc62f5784089aa8ef098e97c505a79b176
2009-03-05Corrected typos and misspellings. Ticket #3702. (CVS 6336)shane-2/+2
FossilOrigin-Name: 6404afa0c515a6536fc2e878d4fb451e4dc06942
2009-01-31Better error message when coalesce() has too few arguments. Ticket #3623. ↵drh-3/+6
(CVS 6222) FossilOrigin-Name: 9cd43c82a3c123829806aa7bf14efdd29f4424d8
2008-12-10Additional work at eliminating silly compiler warnings. (CVS 6010)drh-2/+2
FossilOrigin-Name: ea01d43788a75e39c7f03c22681d1a338d52cf0e