dan
cf1e25566b
When generating data for a RETURNING clause, avoid assuming cursor number 0 is available for use.
...
FossilOrigin-Name: 4b2c59acce6ff1bb6c9c04c45c80945ae23a26588718cc20635d60f7497adabb
2021-06-28 15:25:17 +00:00
drh
4422b3a646
The OP_ReopenIdx opcode should clear the cursor if the cursor is being
...
reused. This prevents leaving the cursor in an initialized state which
could cause problems for a subsequent OP_SeekScan opcode.
Fix for ticket [6dcbfd11cf666e21] and the OP_SeekScan optimization
of check-in [4a43430fd23f8835].
FossilOrigin-Name: d4bf5243f2bf0a2bc77ad12f3e1e4797cb62f2745f9d54eee5f675c3b5f80880
2021-06-25 14:48:24 +00:00
drh
81640a226e
Remove a redundant "ANALYZE" line from the ".fullschema" output.
...
FossilOrigin-Name: 7b47f420954000ce46d05adde6e91a2fbdab8dd528ebd8089cca4fcf9d8a3605
2021-06-25 11:21:21 +00:00
drh
69935c0935
Fix a bug in the ".fullschema" dot-command of the CLI brought to light by
...
check-in [a2ddb89b206c1387] - raising an error on at attempt to access the
rowid of a subquery or view.
FossilOrigin-Name: 36875827a416067e1b8ffba0ff0ff88313177f8d84dd8e5bc9c23ea3f2d587ba
2021-06-25 11:14:10 +00:00
larrybr
83cb9eb48e
Document sqlite3_wal_hook() return.
...
FossilOrigin-Name: 8acaf7964551b4524fcdbb8d01fae7b0911508ecf6dcf23c3e0f8d8c790b78d8
2021-06-25 00:25:38 +00:00
drh
dff34ab96f
Allow the SQLITE_OPEN_EXCLUSIVE flag in sqlite3_open(). Return the
...
SQLITE_CANTOPEN_EXISTS extended code to indicate that the open failed because
the database already exists.
FossilOrigin-Name: d091150ff80709a1e50e0431aa33021f036979e4a88e9769eeec431dfad6d5f5
2021-06-24 18:23:54 +00:00
larrybr
c06836c3b1
Make conditional nature of sqlite3_normalized_sql() better known.
...
FossilOrigin-Name: 0e0ece7111945d61278e60385f883303b593ed0d64beeb951b9c49f243531628
2021-06-23 17:41:38 +00:00
larrybr
10496f7657
Fully incorporate *_changes64() API improvement.
...
FossilOrigin-Name: 6699a2f6bec9dfcdc456ff1cd8e652588b144ec28b7eac6e403a63eab61b416e
2021-06-23 16:07:20 +00:00
drh
9b9f235165
Show CROSS JOINs in the TreeView debuggingn output.
...
FossilOrigin-Name: 72e09b6c9b74c8226b231fec021228af6bc191fc1b5798d0ff2e893f4ba203bf
2021-06-23 11:39:00 +00:00
dan
a261c02d44
Fix a problem handling ORDER BY terms of the form "ORDER BY likely(<integer>)" within window frames.
...
FossilOrigin-Name: 710f75b98bb4ac5bfdfa745c1de832dd1e4d9fb387da52b2f0d1353613f5cdc3
2021-06-23 11:12:48 +00:00
drh
415ac68ae8
When an index is used by all branches of the WHERE_MULTI_OR optimization and
...
becomes a covering index, make sure the index has been created prior to
NULLing it in the OP_NullRow opcode of a LEFT JOIN. See
[forum:/forumpost/0575376e07|forum post 0575376e07]. The covering-index for
WHERE_MULTI_OR optimization was added by [62678be3df35cdcb]. Test cases are
in the orindex01.test module of TH3.
FossilOrigin-Name: 787c76a865dc51dbca4f30432d64783199c2efb1df4619e4bbaf32182977321e
2021-06-22 23:24:58 +00:00
dan
2c7188732d
Add the sqlite3_changes64() and sqlite3_total_changes64() API functions.
...
FossilOrigin-Name: 48fdec22c966003f5577e0bf52906ef90df11e4e395723a646304e67ed976f37
2021-06-22 18:32:05 +00:00
dan
020c4f3830
Fix a problem causing sqlite3_changes() to return an incorrect value following a "DELETE FROM tbl" command on an intkey table (because internal b+tree cells were being included in the count).
...
FossilOrigin-Name: f662ff4746aaa43e63e20710b8cbfeeceab3183e953ac1685c41846d2e9d124c
2021-06-22 18:06:23 +00:00
dan
b9f8a187de
Ensure that the cell array used in balance_nonroot() is always large enough, even if the pages being balanced are corrupt.
...
FossilOrigin-Name: 53f64e83b39cb56ac7211ffc80d06da13318e1da9dbca7b9123954f5be229a0d
2021-06-22 14:59:34 +00:00
drh
4d2c20331a
Load recent dbsqlfuzz cases into test/fuzzdata8.db.
...
FossilOrigin-Name: a766bba0eead47e9ff24b6afd152a7fbd331261e04dd76feb9510585a08c5786
2021-06-20 22:52:51 +00:00
drh
b915418134
Remove a NEVER() that is reachable by a corrupt database.
...
dbsqlfuzz 8456a0f88e39a49fb675d8f77394979ebb2a03c1. Test case in TH3.
FossilOrigin-Name: 1c41e86fa102ec2b73fb7a55357ba6328fda37af316215e8808be88e2d1fd75f
2021-06-20 22:49:26 +00:00
drh
41d26396bb
Do not allow an SQLITE_CORRUPT error to mask a prior SQLITE_IOERR in
...
balance_nonroot(). dbsqlfuzz 5e1c86e7f18023f2b9abe3429977d7ea726f50d8
FossilOrigin-Name: 50e818767e423991b99b3155cb15a0d1c1b744ab6139a8273f9348aab9a53d9c
2021-06-20 22:17:49 +00:00
drh
5d8ade1f67
Remove unnecessary (redundant) variable initialization from
...
sqlite3BtreeInsert() for a small size reduction and performance increase.
FossilOrigin-Name: 70d1836474207fa045ff7aa513839c9df26ea6e180eb898b30d89bd5b3833f58
2021-06-19 20:20:23 +00:00
drh
f51bad45f0
The previous check-in is a significant change to btree, so go ahead and
...
increment the version number for the next development cycle.
FossilOrigin-Name: 2eb6697051c13bf0cc3772fd6c16bfdea0be3b01c0d985e05004c04eaf7a4a48
2021-06-19 18:35:20 +00:00
drh
42a410dcad
Split the sqlite3BtreeMovetoUnpacked() routine into two separate routines
...
sqlite3BtreeTableMoveto() and sqlite3BtreeIndexMoveto(), since we usually
know the type of btree in advance. This results in less branching and
better performance.
FossilOrigin-Name: 3b0d34e5e5f9a16c3397e4551f3b534729b1b375770f05f6ed5847818b1f4c0b
2021-06-19 18:32:20 +00:00
drh
6d72858e79
Version 3.36.0
...
FossilOrigin-Name: 5c9a6c06871cb9fe42814af9c039eb6da5427a6ec28f187af7ebfb62eafa66e5
2021-06-18 18:36:39 +00:00
drh
9c32c914b8
Add an ALWAYS on a branch in STAT4-only logic that is now always
...
true due to check-in [c21bc5a2353e660f].
FossilOrigin-Name: 7bd55eee1ac63cf6d5699ce85bc5a29bf51afdf7a80bce44937fa833947a40f4
2021-06-16 19:23:24 +00:00
dan
755708538d
Omit a handful of tests from pager1.test when testing SQLITE_ENABLE_ZIPVFS builds.
...
FossilOrigin-Name: c3036c28259c1375cd2c480c9ca0ce7f9aa1e952be4f110dde49b2b7d72a43b7
2021-06-16 18:58:01 +00:00
dan
7379b455a5
Do not run test file sessionbig.test on 32-bit platforms. It uses too much memory.
...
FossilOrigin-Name: 75e53215fe436999cdc70434c6ae96d3ce6642c71528cce9f5715fe1b1b81876
2021-06-16 16:56:56 +00:00
drh
a4df1bd5ff
Adjust the mkshellc.tcl script so that the generated code always uses
...
unix-style line endings.
FossilOrigin-Name: 9f69af4dbcb273519fa87b7868f3792560fb71b192f4ffe53b8b465334da5ae4
2021-06-16 15:56:09 +00:00
larrybr
d95a652025
Avoid ominous warning in showdb.c
...
FossilOrigin-Name: f8d7ac0104b76555142ce0d32714594f42d19b311dce2f77f42f92756b5e0c93
2021-06-16 13:26:40 +00:00
drh
cbe83495ee
Adjustments to requirement markings in comments. No changes to code.
...
FossilOrigin-Name: be00e45b723adf64bc78927dc12de3116fd04912a52e5c105a52f235c57698f5
2021-06-16 12:26:01 +00:00
drh
236bcdf3e4
Enhanced defense against integer overflow in ALTER TABLE.
...
FossilOrigin-Name: fb7f094e4e0f03622c2e7fa02483c17671a8899c7ad8aba8659177180f406704
2021-06-16 11:32:54 +00:00
drh
82f62e8324
Fix some #ifdefs so that builds work for all supported compile-time options.
...
FossilOrigin-Name: ca7d78f7818b4754fd04ea2b618dee1f01e11c6a5acb54951217c0d03df8e187
2021-06-15 20:10:25 +00:00
drh
9d82a2ccfe
Fix an incorrect ifdef in the previous check-in.
...
FossilOrigin-Name: 4b2bb46730393292364b2be7db4e73fc8f93cd5a141aaf04f20fe0119deb5ab3
2021-06-15 20:07:16 +00:00
drh
f54e79405e
Fix some minor #ifdef issues so that all of the supported compile-time
...
options continue to build.
FossilOrigin-Name: d8cf407046f20b0398f19acd0dab6acb6c742911e21e1003cb5b194dd668d98e
2021-06-15 18:46:06 +00:00
drh
17adf4e5a1
Update the "nmakehlp.c" utility program sources associated with the TCL
...
Extension Architecture, obtained from
[https://core.tcl-lang.org/sampleextension/file ]. Perhaps this new
version will sit better with salmonx's static analyzer
[forum:/forumpost/7f0beca9797ee23a|(ref1)],
[forum:/forumpost/7d5c8b19231ad57f|(ref2)].
FossilOrigin-Name: 603b851d7d923d71543760b09a55d72dbbc185ac9c353c954c331c0454992c80
2021-06-15 15:36:05 +00:00
drh
a959bf5311
Add NULL checks on all sqlite3_vfs_find(0) calls. This is not strictly
...
necessary. There are no vulnerabilities here. However, adding these
checks avoids unnecessary static analyzer complaints.
[forum:/forumpost/ce1193be15|Forum post ce1193be15].
FossilOrigin-Name: 272a15b9f418fb0b31a9808f7c42c20cf52318035ff98935d8e8519634357e8d
2021-06-15 15:15:40 +00:00
drh
972da42749
Prevent an infinite loop in the trim() SQL function if the second argument
...
is a carefully malformed UTF8 string.
FossilOrigin-Name: 829343c26ed7b87fafc70de3369625209bad91e79bb7ca2946d5c8d61cc1c3c4
2021-06-15 14:34:21 +00:00
drh
11e489d6cb
Fix typos in testcase() macros from check-in [c09d90eec2a49b94].
...
FossilOrigin-Name: d4d9869c30710914b7ba51221b2c2223a9cf16b913bd6f3866ae747494a116af
2021-06-14 20:49:33 +00:00
drh
93fd5420d0
In the authorizer, use SQLITE_DROP_INDEX, not SQLITE_DROP_TEMP_INDEX
...
when dropping an index in an attached database.
FossilOrigin-Name: e5a5acd6006133c5da4a7dd79726dbaa41c0d60ebeda890f848a6aafe5f9ef70
2021-06-14 20:41:20 +00:00
dan
ac67f56726
Fix an ALTER TABLE problem with handling infinite loops of CTEs in the database schema.
...
FossilOrigin-Name: c09d90eec2a49b948c60971294d146db5c82438855cd3fa48ddc3d2e6b44c26c
2021-06-14 20:08:48 +00:00
dan
09612a5bb8
Fix a test script problem in corruptN.test.
...
FossilOrigin-Name: 3ddfe9ae55e6d0d922fbc209768b2ac4a4792f0f63af9a8fb53d66a4b8f1d94b
2021-06-14 14:52:27 +00:00
drh
21571a94c1
An index on the expression "likely(X)" should store the true value of X,
...
even if X is a real number with no fractional part. The optimization of
storing some REAL indexed values as INT (see [10d851353c2abead]) should
be omitted for index columns that are expressions.
[forum:/forumpost/3b940c437a|Forum post 3b940c437a].
FossilOrigin-Name: 791473bc6677c2ae76f558082a4b43ca1eaf9895b76624d5b55d58f2af898ff3
2021-06-14 14:00:09 +00:00
drh
de5f21d0a8
Avoid allocating oversized column names in the sqllimit1.test module.
...
FossilOrigin-Name: 7068f1f69b4feef49260e80902e6bdae47c21a0daa16c96ed1a0984dd1f14cdc
2021-06-14 11:20:30 +00:00
drh
0d08402f34
The opcode that preceeds OP_SeekScan is usually OP_IdxGT but can sometimes
...
be OP_IdxGE. Adjust asserts accordingly. Follow-up to
[9a2ab6092d644fc3]. dbsqlfuzz e41762333a4d6e90a49e628f488d0873b2dba4c5
FossilOrigin-Name: d6803ed8dc4b1eb4d4dc100728acb4a4aa1479732f0fcb94eb23b7f7702ef65c
2021-06-13 19:14:14 +00:00
drh
7a7cefa0b8
Improved defense against OOM errors in sqliteInitOne().
...
dbsqlfuzz 429db39cd5777c46479641e8637c48c62890042d
FossilOrigin-Name: b6c57e0e2a9658417a0a5548e73007faa59c837b9ad87293bc216feef980717a
2021-06-13 17:55:58 +00:00
larrybr
bd0d62c35b
Correct link in .ar help.
...
FossilOrigin-Name: de9d0f9548106f5a59c57dbf947fc63c0411b1e975033a4c4097cefbbe86ee5f
2021-06-13 08:23:28 +00:00
drh
a2078e025b
The sqlite3WithPush() routine might destroy its second argument if there was
...
a prior OOM. Do not use the second argument of sqlite3WithPush() if this
happens.
FossilOrigin-Name: baa3f96250763b42391fbb4dea283a4b6140fdbf775d85081a9efd6e6258f7b4
2021-06-12 18:12:59 +00:00
drh
24ce9446a8
This is an alternative approach to the use-after-free problem fixed
...
by [193b14a58e378ab3], saved here for historical reference.
FossilOrigin-Name: 6796b7a2485eca279db9d777595a886bc0d1dd7ec9551e1797e0032ef5493559
2021-06-12 17:45:32 +00:00
drh
35e6cd09f2
Reapply two recent ALTER TABLE error checks that turned out to be necessary
...
after all. dbsqlfuzz fc5a9deefda00dda914748985155a6d4c44174e5.
FossilOrigin-Name: 230fedd923c87741d20caf55f29e8464cc6df344536f9b89331e0a0059a926f7
2021-06-11 13:18:56 +00:00
drh
cf145047b0
Avoid bugs in some implementations of dlopen() by avoiding calls to
...
dlopen() with a filename argument that exceeds FILENAME_MAX bytes.
[forum:/forumpost/08a0d6d9bf|Forum post 08a0d6d9bf].
FossilOrigin-Name: 01f3877c7172d52225705d2461addc6129fe9cdb04e6f643518fc74bb4b526e4
2021-06-11 12:41:14 +00:00
dan
d03d3a9b74
Fix a crash in new ALTER TABLE code that could follow an OOM.
...
FossilOrigin-Name: 6f1f2a0a9cd75ca43b81cc325296b843ccefe6f8040da8f2e873f49928423f10
2021-06-11 12:14:58 +00:00
dan
6065686d9c
Remove an unreachable branch added by the previous commit.
...
FossilOrigin-Name: 852ee0e91ceae090157c4ab2805530f5d7985a490ce77f54d7b148f56e466f79
2021-06-11 12:02:00 +00:00
dan
26d61e5adf
Fix problems with ALTER TABLE and schemas that contain views with some recursive CTEs, or CTEs that reference other CTEs.
...
FossilOrigin-Name: 8b1f9a51e962cd9a5593a1ecf4da6c86e34c4f9ff96ffcea0fb421880c8836cb
2021-06-11 11:14:24 +00:00