summaryrefslogtreecommitdiff
path: root/src/sqliteInt.h
AgeCommit message (Collapse)AuthorLines
8 daysEnsure that the collations used by an ORDER BY attached to a compound SELECT ↵dan-0/+5
are determined correctly in the case where the ORDER BY contains a mix of terms with and without explicit collation sequences. Report [bugs:/info/2026-11-04T01:00:55Z | 2026-11-04T01:00:55Z]. FossilOrigin-Name: 485b7480fcb80f625dabe015f56073e020b0bcb8655bce0081f542d465c8e051
8 daysNew debugging interface, callable from gdb or similar:drh-0/+1
sqlite3ShowSelectAsSql(). Similar to sqlite3ShowSelect() except that the output is reconstructed SQL text rather than the AST. FossilOrigin-Name: 7919b2227b685a21e492e4a18dd83b3c33da483e45971edd14f3e65d5406d4df
8 daysMake most tunable parameters in the query planner adjustable usingdrh-11/+22
SQLITE_TESTCTRL_TUNE on builds with SQLITE_DEBUG or SQLITE_ENABLE_TUNING. Add the tool/tuningverify.tcl script to verify alignment between the tunable parameter array and Tuning() macros and have makefiles run that script and fail if something is amiss. FossilOrigin-Name: 7c66b6f510e63aeb39268157c4feb063f2d18617a6523d164b70101821f78d0a
2026-11-07Ensure trigger programs that use views do not end up with duplicate ↵dan-0/+8
select-ids in the parse-tree. Report [bugs:/info/2026-11-03T02:11:56Z | 2026-11-03T02:11:56Z]. FossilOrigin-Name: 6240e0daa7936d4e90eec6e4e11c24cdddd41da1070cabc79d831fac6e89231a
2026-11-05Include the sNameToken field of Parse in the reset-after-recursiondrh-2/+2
section in order to avoid a harmless UBSAN warning. FossilOrigin-Name: 42c751c00127dad1d5a4d6c24890e111d9d993ce5050b5bb9818752de58d8ddf
2026-11-04Fix a problem with ALTER TABLE in cases where an identifier in a view or ↵dan-0/+1
trigger's ORDER BY clause matches a column being renamed and an alias generated by expanding a "*" within the query. Report [bugs:/info/2026-11-03T01:27:10Z | 2026-11-03T01:27:10Z]. FossilOrigin-Name: 0c0b346b86b60dd3771351a33a8b6e82d5c20c94949aa5327c46bb80200b48b6
2026-10-31Expand the optimization disable mask from 32 to 64 bits. Add a newdrh-3/+4
bit to disable the having-to-where optimization, for testing purposes. FossilOrigin-Name: 89ea66267618dd0d2ac9a1aa56665c16e209a23e6eb66bc170cd8af6a16bfb86
2026-10-31Make the "-DevTest" optimization flag available for testing purposes. Don'tdrh-1/+1
actually use it for anything permanent. Just have it available for use during debugging builds, in enable/disable features for comparison. FossilOrigin-Name: 439a702e5cb4c4afe116a39a69a41a7725e8148e057811e71401f37b57e9e1e3
2026-10-29Do not let a TEMP table or an uninitialized schema prevent unauthorizeddrh-3/+3
writes to a shadow table. [bugs:/info/2026-10-29T15:45:39Z|Bug 2026-10-29T15:45:39Z] FossilOrigin-Name: ffec289af9da0d0da1ee22104c6b3781874e8781bfb67dacf6a7b13af20ecc31
2026-10-27Expire every prepared statement that uses a schema when that schema isdrh-0/+1
cleared. In the VDBE, do not access p4.pTab or p4.pIdx fields if the prepared statement is expired. FossilOrigin-Name: 6ca068cdcef197ffe137d77d445b17a9d6b7f25d120acb55fb719b6842aef638
2026-10-26Fix missing prototype for sqlite3DbMaskUnion()drh-0/+1
FossilOrigin-Name: 7c2ea69839322d113377122e87250e746712dd7e8920ff867a95cf68c2de3917
2026-10-26A more accurate approach to resetting schemas on active statements.drh-1/+7
FossilOrigin-Name: 031a3911c352c7d1a70dc9d3b6fa32438ac585ae13e2558759b0b90580784ecf
2026-10-26More precision in controlling when to reset schemas.drh-1/+1
FossilOrigin-Name: 717b1b90c52d94c54615ef954288695adb8e1647fb2259a906641b6279af8d96
2026-10-26Update to include the latest trunk enhancements.drh-10/+0
FossilOrigin-Name: 95da88756c843bedc858c6e973170770459032340c109bdacb1efc81fc27af8a
2026-10-26Merge corrections from branch-3.54 into trunkdrh-10/+0
FossilOrigin-Name: c2c5f34f0f60d3f8b09976149d633b36754c0f139b41cb30fc27b478dee9fdd5
2026-10-26Back out the tSerial type definition change. It was a mistake.drh-10/+0
FossilOrigin-Name: fc56735f1c34ee0d8605d4f79ed2e13e5f54017898178c8d20a79d34fea6597c
2026-10-26Experimental fix to [bugs:/info/2026-10-25T19:26:00Z|Bug 2026-10-25T19:26:00Z]drh-0/+1
FossilOrigin-Name: efdff276d2c19f77be5b5b600084996126ec2ae3e2a7ed91f2e7d7e1916043ba
2026-10-25Merge all recent branch-3.54 fixes into trunkdrh-0/+10
FossilOrigin-Name: 4fee54f1d687c2e2b4a760c59d1d29fceb81623494cf65b72c309f4922dc0a7e
2026-10-25Use a new typedef "tSerial" to determine the datatype for serial-typedrh-0/+10
value. It is 32 bits for reasonable SQLITE_MAX_LENGTH but can be 64 bits if necessary. FossilOrigin-Name: 8435c6f0b1ac3025f5af5da2a0f03898142c506e5981d55a2b633e611dcecb8f
2026-10-23Fix the sqlite3_bind_value() interface so that it does not remove adrh-1/+4
byte-order mark on the value being bound. FossilOrigin-Name: 56e268312d038608b5fb2a8ed24002f478ad5a22eb0214b1a064f2926aada66c
2026-10-20Fix an adverse interaction between triggers changing a table that usesdrh-0/+1
ON DELETE SET NULL constraints and the optimization at [8c5dd6cc259e0cda], almost 12 years ago. [bugs:/info/2026-10-19T06:36:47Z|Bug 2026-10-19T06:36:47Z]. FossilOrigin-Name: 15424da529e827f3eca7d70b1c54b57f2e9e05ed866a872ea45fa538e8b72825
2026-10-18Add the SQLITE_LIMIT_CTES option to sqlite3_limit(). The default is 50K.drh-1/+1
Setting to zero disables the limit. The limit is approximate - it does not actually count CTEs but rather simply refuses to process a CTE with cursor number that exceeds this limit. This is a re-do of the fix for [bugs:/info/2026-10-04T05:35:14Z|Bug 2026-10-04T05:35:14Z] that also avoids the regression reported by [forum:/info/2026-10-16T20:30:17Z|Forum post 2026-10-16T20:30:17Z]. FossilOrigin-Name: b32709ea065da2eb41a6eb0ca20381d2bd82a356bb5f8bc76fee063d1da93004
2026-10-13Fix the implementation of Tree-Tracker.drh-0/+1
[bugs:/info/2026-10-13T02:17:32Z|Bug 2026-10-13T02:17:32Z]. FossilOrigin-Name: bfe473ab60f666449b819f0a55e936cef5359e32fd61683437d2ee3e0f3ff6c6
2026-10-10Merge branch-3.54 fixes into trunk.drh-0/+1
FossilOrigin-Name: dc388e83b05dd637aafa684eee5f7b51627d39ddfbc97633958266803e882e93
2026-10-10Back out a minor performance optimization associated withdrh-0/+1
sqlite3VdbeMakeReady() as it has been found to not work correctly on some 32-bit builds. [bugs:/info/2026-10-10T18:05:46Z|Bug 2026-10-10T18:05:46Z] FossilOrigin-Name: 6ebd1e69486cabc6be3316426f67341d75073e8b392de5d6e5307662dd0000dd
2026-10-10New extension ext/misc/optname.c provides the canonical mapping betweendrh-40/+38
optimization bitmaps and optimization names. This gives a single point of edit when there are changes. Used by the CLI, by testfixture, and by TH3. FossilOrigin-Name: 135ed9e2cc9bd37c3e158a488e37f4ce14ffeca44ff12e31f25a6686a2622ca1
2026-10-10Add comments to help remind developers to keep the table of optimizationdrh-4/+4
disable bit values in sync with the CLI and with TH3. FossilOrigin-Name: 0e707e7dba7edadda9951549ae3aa34b713a0f2210ccc486e181e833c74e2fa6
2026-10-05Merge the latest trunk enhancements into the tree-tracker branch.drh-2/+4
FossilOrigin-Name: 5fa8b22cfb3fe6a455c40e3eb4c236640fd962d33903dbced244d970f548248a
2026-10-05Ensure that eponymous virtual table objects are not left with dangling ↵dan-0/+2
schema pointers if the main database is overwritten using sqlite3_serialize(). FossilOrigin-Name: 18d2646f6fa56244be12122873cd9aa48b2074a22f0be637edfcc9b5de99158b
2026-10-04Fix expression tree depth calculations for COLLATE.drh-2/+2
[bugs:/info/2026-10-04T04:50:56Z|Bug 2026-10-04T04:50:56Z] FossilOrigin-Name: 252c0b7bf5a727d29605672bb58e06c758173c276671df3e388a68294998b4d3
2026-09-29An early attempt to implement the tree-tracker optimization.drh-3/+1
FossilOrigin-Name: ead82958b3edd02e3da8fc3dbec880215d2539d4e0e7b97d3a689793d4938d22
2026-09-11When looking up a text key in a temporary index, use the fast memcmp-based ↵jeffchen-0/+9
comparison if the index uses the built-in BINARY collation. Indexes in the schema already got this fast path because they record BINARY as a NULL collation pointer. FossilOrigin-Name: ebb4534bc8c19ba2b960112eadc328b937c11acf5b846bf9e3df53846c6e375b
2026-08-26Split the sqlite3ColumnExpr() routine out into two routines, one that worksdrh-1/+2
as before and the second sqlite3ColumnExprAuth() to deal with the authenticator in places where that is needed. FossilOrigin-Name: 51a1149bdcbe142b8eb92c2b817d3973bf88aaa73859e0c475505aa201da920b
2026-08-26An attempt to make the authorizer effective at preventing the use ofdrh-1/+1
some functions within the DEFAULT clause of a table. FossilOrigin-Name: 321e41b09179acba59958bdd6b07e4b7d915b9c0dfca143e4914b3690692c201
2026-08-25Merge the latest trunk enhancements into the union-to-union-all branch.drh-6/+7
FossilOrigin-Name: c58631b26ad6ee39d8db2700a26413249fd88d137c3a7944bad7af07cd7fe121
2026-08-22Remove some unnecessary sqlite3_test_control() optimization control flagsdrh-6/+7
for a small performance increase and size reduction. FossilOrigin-Name: 2a9cb1e12ab4b81875e2d08f6cdecfb08b57137a69f6eb4efd19a56347184c3b
2026-08-22New optimization bit SQLITE_UnionLimit.drh-0/+1
FossilOrigin-Name: 5890dbe54dd06fc7770267f59a430a47a39f7aaa0563274b851931e0dae754b2
2026-08-20Merge the latest trunk enhancements into the reduce-reprepares branch.drh-1/+14
FossilOrigin-Name: 62ad88fe1ccd647ef77910d116856d6f2d9c96a726a2a270eacc8f5785875264
2026-08-18Merge the latest trunk enhancements into the opt-inline-jsonbPayloadSizedrh-1/+10
branch. FossilOrigin-Name: 88fbeafc8d783fe72625c3c631cf0163ff98b2eb42152e401e14d3df66199a7a
2026-08-18Refactor the new code on this branch.dan-1/+1
FossilOrigin-Name: 76a03b5314bd3a48e5f8de60c47cdb6ae749a8741bf0dede0a3b599a796d76d1
2026-08-18Correctly process an "x IS TRUE" expression that appears in the second or ↵dan-0/+1
later rows of a VALUES() clause. Possible fix for report [bugs:/info/2026-08-18T05:06:40Z 2026-08-18T05:06:40Z]. FossilOrigin-Name: 1be96edbd5f695e8a12620e4d74d2b7bc7fb277a956c4b5e5ee8274121920c7b
2026-08-18Add SQLITE_LIMIT_TRIGGER_STEPS and -DSQLITE_MAX_TRIGGER_STEPS=n. Default ↵drh-1/+1
maximum is 65000. FossilOrigin-Name: 6fbed57b1447725ae9d923d69b509fd5932d8c6bae6cf6ac0d1248a943752a58
2026-08-16Partial in-lining of jsonbPayloadSize(), happens in only 5 performance criticaldrh-1/+14
places instead of everywhere. This gives 96% of the performance increase with only 18% of the object code size increase. FossilOrigin-Name: e934c4a7aa66bf9d0214a7946b5ea51b92c11996c920ea8e2ed2513319518f43
2026-08-16Change the variable name for the variable-number bitmap cache. Make the sizedrh-1/+8
of the cache configurable at compile-time. FossilOrigin-Name: 35c9c6e6352ff855eea4782da2270ff2937a969116db9d481bc0701375749c2b
2026-08-16Add a small bitmap to the Parse object recording which variable numbers ↵jeffchen-0/+1
below 128 are already in Parse.pVList, so that repeated or out-of-order ?NNN parameters avoid a linear scan of the VList on each occurrence. Optimize particularly well on ORM testset. FossilOrigin-Name: 306f8f3ccbd7d5c4993f0f084db73950b2c00fb356c10f00e579c7d413ddab6b
2026-08-12Create a new varint decoder that does not need to return the size of thedrh-3/+1
varint, and use that in sqlite3BtreeTableMoveto(). Omit the pointless getVarint and putVarint macros and use the actual function names instead. FossilOrigin-Name: f845ede54c065ebd222f3f3488f655f2cbbf2c40bae782b3f4eac76cbb0525ad
2026-08-12Do not use the propagate-constant optimization on a constant that isbug-2026-08-12T09_26_04Zdrh-0/+1
really a function that might return a subtype. FossilOrigin-Name: a5bf606f3b76b66988d9f4ce97ca48827c2583e2e275f50a2fdfc8bb08719779
2026-08-10Experimental changes to improve performance of the OP_MakeRecord opcode,drh-0/+3
and especially the code the writes integer content into the record. This change is not yet 100% correct. It is a work in progress. Parking on a branch because I need to stop and work on other things. FossilOrigin-Name: fa8dd2af6da66d14e6e2dbf68692d02322f750198fdf97be0b72f04e0a4ca79b
2026-08-10Replace the EIGHT_BYTE_U64 macro with the in-line function sqlite3Get8byte()drh-6/+22
which is more efficient cross-platform. FossilOrigin-Name: 9492183f2f954d89be698e0d48123d50a6dc96c06b18482e1f06ae9031506033
2026-07-23Enhance Bloom-filter support so that it works with blob values and withdrh-0/+1
text values as long as the collating sequence is binary. FossilOrigin-Name: a67bff640c9e4ffdf2f48c049eaf829b9e43d167a1055bf8780ff29c910bbade