drh
83569e2e9e
Simplify some of the corrupt shadow-table detection logic in rtree.
...
FossilOrigin-Name: 0c4f37aa475bd4bd17c20c02ab2d9f63d0a6a08b0e2bbfa559f7b972ece6f4fc
2021-09-15 13:09:55 +00:00
larrybr
b01f1389f2
Squelch needless narrowing warning.
...
FossilOrigin-Name: 5540e6abc1a2a8540113ec9bfebe1fb78d6a044f45396dd1926b65ff17ff236b
2021-09-15 11:15:03 +00:00
dan
5f835b7847
Ensure rtreedoc.test is not run for builds without the rtree extension.
...
FossilOrigin-Name: 42dff223470e9c096b8486ef232ac41b70d0875d8ae07630bfaaea1515ffa8d0
2021-09-15 10:49:31 +00:00
dan
f159323c42
Add test cases to rtreedoc.test.
...
FossilOrigin-Name: afe0ec4d589d87a07c0daf3fc4de884b82a8bceed593ba4e44caa1cf033a6715
2021-09-14 20:07:58 +00:00
drh
c0bd26a23a
Update requirements marks to reflect recent documentation changes.
...
FossilOrigin-Name: 08cab8921e670a0d1758b505fe8c7455f6194cec69d1b7b77de91688be1028a6
2021-09-14 18:57:30 +00:00
dan
a2fef2f031
Add test cases to rtreedoc.test.
...
FossilOrigin-Name: b62de1269f17fcc944ff404a20c4f705ffe99c44d6c54f42c29e69753aac8092
2021-09-14 14:16:36 +00:00
dan
6962d78c4d
Minor updates to rtreedoc.test.
...
FossilOrigin-Name: b22c75e41ded29afd026b32b73b87f6427340a9ac1d46147db8edac20eb7beb5
2021-09-14 11:27:20 +00:00
larrybr
d000785d40
Shell to .read any named character source file/device (again.)
...
FossilOrigin-Name: c6fe4f8d639db25f0a339f4071f0ae34b90dcfec8dcc2c571f969e2614a38e05
2021-09-13 23:11:46 +00:00
dan
db45212a35
Add test cases to rtreedoc.test.
...
FossilOrigin-Name: 4ee99d315487a3aa09911191a74c6a12693784c5359243eb1396d8868566e80a
2021-09-13 18:32:02 +00:00
drh
82456a661d
Add assert() statements to refute
...
[forum:/forumpost/9f4e7f58fbb66ddd|forum post 9f4e7f58fbb66ddd].
FossilOrigin-Name: 83a83475c5064ea62016a03e9173ecd2a1fec7f6296f1ee99896fa0a38b4196a
2021-09-13 18:16:15 +00:00
dan
30918bfb0b
Add new test file rtreedoc.test.
...
FossilOrigin-Name: 8c4b1482eeb31856bce20eda1ce74959e19da11962f74d406a608747a92fe429
2021-09-13 16:36:20 +00:00
drh
57dd7e6ad8
Fix an incorrect comment and possible integer overflow in pager
...
resulting from check-in [23ca23894af352ea]. Problem reported by
[forum:/forumpost/e2ea1a3f61|forum post e2ea1a3f61]. Also change
the datatype of Pager.pageSize to i64 even though page size never
exceeds 65536, in order to help prevent future problems of this kind.
FossilOrigin-Name: f4a552ed9f4ab35520b634954c39748cc7bda535f426280b79da1b99f70599ac
2021-09-13 13:53:13 +00:00
larrybr
31aa366293
Make replace.tcl useful with TCL 8.4
...
FossilOrigin-Name: 2dd61dd97b0326b59b0bc3c83b4d4b9acf811c5acae4d1003e7525ba7a26daf5
2021-09-10 22:00:43 +00:00
larrybr
3a9793e40f
Fix (luckily harmless) typo in memdb.c per https://sqlite.org/forum/forumpost/15af8872d5999df1
...
FossilOrigin-Name: d577030cdad165474b082afbe64782e2eb3290331b0e3045b1e85ee6fe011504
2021-09-10 18:35:59 +00:00
larrybr
ae509121d0
When showHeader set at CLI invocation, do not auto-set it later.
...
FossilOrigin-Name: 733b7d4f95a4e2f0df323974f323c40c2486b188d442e74306a4b580fd8a8bd8
2021-09-10 01:45:20 +00:00
drh
7f58117921
Back out changes [00286ca5d998d802] and [6844ede29e1dac93] (replacing the
...
associated branches with NEVER()) and add a single new test to
btreeOverwriteCell() that detects when an overflow pages is also mapped
into a b-tree page and raises and immediate SQLITE_CORRUPT error before
making any changes.
dbsqlfuzz 81791bd980fe6935ff2c7334ec8bef11c1c12b82 and others.
FossilOrigin-Name: 32210fa4ac4f06e1705ef808731c7be040a23f9a8630986440100c5d4e76dc07
2021-09-10 01:02:42 +00:00
drh
3acb3b7845
Remove a NEVER() in btree that is sometimes reachable.
...
dbsqlfuzz b9140023005430654c8fe544cf0a082ef8d561c1.
FossilOrigin-Name: 6844ede29e1dac93a392dfb1e7e676bb9d0a2e7bbec0a4a5804ffc2025a99b66
2021-09-09 19:19:02 +00:00
drh
4c5b7b922c
Avoid masking off an OOM fault in rtreecheck().
...
FossilOrigin-Name: 3ebfe7128a20b270de65ebf4620f62e34ea6cc46b472cc52aed96af504eb9637
2021-09-09 18:06:07 +00:00
drh
30ad4a6932
Improved database corruption detection in the editPage() subroutine
...
of the btree rebalancer.
dbsqlfuzz f035b1b5a100a5f0cffb95c958b6c67d7c5eaf1f.
FossilOrigin-Name: 00286ca5d998d80214d5e8d501a3b305f432cda1c0ef67ca530e1219565909b7
2021-09-09 14:03:55 +00:00
larrybr
31bffb44fa
Speedup CLI's gulping of many huge block SQL comments.
...
FossilOrigin-Name: 729620c5c0c642243be2fdda98f18d04efaf78ce365092e655cf60c9fee0874f
2021-09-08 21:49:03 +00:00
drh
94b70d8343
Fix PRAGMA integrity_check so that it does not try to enforce types on
...
ANY columns in a STRICT table.
FossilOrigin-Name: 57384fda8db43964871be5e48ae1c72c67533046b523f161d60a41fdc8e96b9e
2021-09-08 19:25:21 +00:00
larrybr
2c09a8ad6f
For sqldiff, sqlite_schema comparisons must use compound (synthesized) PK.
...
FossilOrigin-Name: 5bdd8466129b8e477c8349847f19f2a5adea3f650cca6dbafa3b835e5a538d09
2021-09-07 20:58:49 +00:00
drh
59bccb2637
New test cases added to fuzzdata8.db. No code changes.
...
FossilOrigin-Name: 51e5aadafe1a4ba6a0be7fc1732d1ec940cbc5e23723b76267c2abf887d713ac
2021-09-07 19:23:32 +00:00
larrybr
a933ec4c25
Make sqldiff able to compare sqlite_schema tables (for detailed schema differences.)
...
FossilOrigin-Name: 7ff92da9f183bc24a0d93996df771df7a712df1122ad897cb9143cde7d57ef7d
2021-09-07 19:04:42 +00:00
dan
eb84c6ef35
Fix a memory leak in fts5 that could occur when writing to an fts5 table that is being scanned by an fts5vocab cursor.
...
FossilOrigin-Name: 1183552de10b64a776874a23be8962c0693e5e0cd1a191ea8fa5d6a02b691e4a
2021-09-07 16:05:48 +00:00
drh
eb61630b40
Fix a potential NULL pointer deference in the LIKE optimization. The
...
problem was introduced by the addition of generated columns
in check-in [b855acf1831943b3] (SQLite version 3.31.0, 2020-01-22).
Reported by Wang Ke in
[forum/forumpost/699b44b3ee|forum post 699b44b3ee].
FossilOrigin-Name: b9417d400f4585004f434837022709f818044d5844fe208fe01595a6b226ef7d
2021-09-07 15:41:25 +00:00
dan
fb8ca7de0c
Fix a use-after-free error that could occur if an fts5 table is written while scanning it using an fts5vocab cursor.
...
FossilOrigin-Name: e751c2ec786b5c1a1c9640fdc3fde036879a2c32db2bd67fe7c72604780f67b8
2021-09-06 16:15:23 +00:00
drh
905b82d5f5
Fix an issue in the "shrink.test" test script reported by
...
[forum:/forumpost/90a74bd61861f58f|forum post 90a74bd618].
FossilOrigin-Name: 6c3734edb2ecabd85a715c853ef58da39381af26d3dd32e53c068b4fcf6fb98f
2021-09-06 15:59:32 +00:00
drh
e534c7b97f
Restore the use of system isnan() that was removed by
...
check-in [ea748edecb261f2b]. See
[forum:/forumpost/d7c530ac587f59e6|forum thread d7c530ac587f59e6].
FossilOrigin-Name: b3cfe23bec0b95ca673802526704200e2396df715fdded72aa71addd7f47e0e1
2021-09-06 11:44:19 +00:00
drh
e7e9539d99
Fix an assertion fault in pcache introduced by [4bc93658aa563f2f] and
...
detected by OSSFuzz. Test case in TH3.
FossilOrigin-Name: 2262a49467fa56c386080dac3e99a66e16c1700e138dba74db66e7b93ae76bf5
2021-09-03 18:11:12 +00:00
dan
748d8b9cdd
Have the planner ensure that if one scan uses a subset of the WHERE clause of another, that scan is estimated to cost less and return fewer rows.
...
FossilOrigin-Name: c7b34930e27597e7f634ad76be55fc436dcb84ea48d5b41b5d7f3596285dd672
2021-08-31 15:53:58 +00:00
dan
beed24d57e
Do not disable a rowid=? term used to drive an IPK index if it is a transitive constraint.
...
FossilOrigin-Name: 46e28cbcf6044b36aa4ddcda09adb49a46c6c6a8d41d558467ede3091304aa8c
2021-08-30 17:02:48 +00:00
drh
6d77a2948e
Patch lemon to fix "error" token handling, according ot
...
[forum:/forumpost/e680f42f53090061|forum post e680f42f53090061].
FossilOrigin-Name: 106b5e5355a3836a9756333e6dcbb13f0878a5352dab00973b8f0900879bd724
2021-08-27 11:26:37 +00:00
drh
b97e2ad10a
Add the --safe to the CLI. Also the --nonce option and the .nonce command.
...
FossilOrigin-Name: c76870cb1a8e2e1389ad864c51b9f596dff21df8bb58f438f0a2cacfa63b22a4
2021-08-26 18:31:39 +00:00
drh
5ced0a914e
Correctly preserve the collating sequence for a column when changing
...
its datatype. Fix for the problem reported by
[forum:/forumpost/e5c76b738e|forum post e5c76b738e]. Test cases
in TH3.
FossilOrigin-Name: c7f0813cabf9d8ab367bead5ba8cf20132b8bb9274d8e47b76ad66a10517dd2a
2021-08-24 17:07:44 +00:00
drh
0ccda5294f
Fix a typo in a comment. No changes to code.
...
FossilOrigin-Name: d953646a63bf96a8e6e57fefaa60ae1487e5e4eb776fb38cd9c4ce002e74d016
2021-08-23 15:56:01 +00:00
drh
b9fd0101bd
Back out the change that allows typeless columns in strict tables. Replace
...
that capability with an ANY type for strict tables that will accept any
datatype with BLOB affinity.
FossilOrigin-Name: d8fd1a2bfd51848ea612142d23475b268b3f5269e558f2e09713d1ac18b18274
2021-08-23 10:28:02 +00:00
drh
2a0eefd665
Allow typeless columns in STRICT tables that are able to accept any
...
data type.
FossilOrigin-Name: 1e2dcc2d4ee88c0aed40d1472b1c7d43fd43822891729ad6a2c55d5b912e7ad7
2021-08-21 20:54:19 +00:00
drh
ce68b6bfeb
Defer deleting subqueries in the compound-SELECT code generator until the
...
end of code generation, in order to avoid deleting expressions out from under
the aggregation function sanity checking assert()s that occur near the
end of SELECT code generation. This fixes the assertion fault described by
[forum:/forumpost/cfcb4b461d|forum post cfcb4b461d].
FossilOrigin-Name: 600f1991e5c0a5d89cd8776a157b6fd72c7489791085876925e8dd7ab146fe1f
2021-08-21 16:42:58 +00:00
drh
8eaf6c620e
Improvement to error handling in Lemon. No impact on SQLite.
...
[forum:/forumpost/2f468f43cbc48d7f|Forum post 2f468f43cbc48d7f]
FossilOrigin-Name: 18cc2f85744a18b6810d30baebe07a7a1bd332348e13b1a50d779edc616fb0c1
2021-08-20 19:51:22 +00:00
drh
9135c8206e
Support for STRICT tables. A table with the STRICT option only allows a few
...
core datatypes on columns and enforces those types rigidly. Also, PRIMARY KEY
columns must be NOT NULL.
FossilOrigin-Name: f9c1d3441b87ee296542faa724410d16a348143cba24fe74292eefc48e038a55
2021-08-20 15:44:48 +00:00
drh
faf9c77b4b
Improved error messages for the SQLITE_CONSTRAINT_DATATYPE error.
...
FossilOrigin-Name: 39abca01479c0f4f747b7b21fa05181896b00ed7559f0ab74aa575c23097ac21
2021-08-20 08:05:42 +00:00
drh
7b4b74acc7
Do not allow the xfer-optimization to move the content of an ordinary
...
table into a strict table.
FossilOrigin-Name: 1ed1b594d3c03ced68eb2b1285dfd8b9641cda20db1b1b7ae1afee217a3a9fe2
2021-08-20 01:12:39 +00:00
drh
71c770fbda
Improved comments. Fewer opcodes for integrity_check on strict tables.
...
FossilOrigin-Name: 4ee57fb588b41ab76649c605f57c7bcf5b7b638435af458d69f69a8ccbb121e8
2021-08-19 16:29:33 +00:00
drh
9e1209d111
Enhance PRAGMA integrity_check so that it verifies the datatype of
...
all columns in STRICT tables.
FossilOrigin-Name: 97c9248b3b81facce569bfa3fb405d44a1d1041e87132e8f649458c95620ccb2
2021-08-19 02:58:15 +00:00
drh
ab16578b72
STRICT tables require all fields of the PRIMARY KEY to be NOT NULL.
...
FossilOrigin-Name: 5efdf9acad9d54783f5134b7e9338f44336862d87dc324d315b8d55e44df1923
2021-08-19 00:24:43 +00:00
drh
3b7a0ccd5c
Merge the WITHOUT ROWID, NOT NULL ON CONFLICT bug fix into the strict-tables
...
branch.
FossilOrigin-Name: 7ee01ee47da247a80bcf16f88eb187b8c0928024536435ed20797a1a90495511
2021-08-18 23:00:43 +00:00
drh
fd46ec6476
Fix ON CONFLICT clause processing for NOT NULL constraints of PRIMARY KEY
...
columns on WITHOUT ROWID tables.
Ticket [f2be158c57aaa8c6]
FossilOrigin-Name: 13abba0941a724eb62455650976b03678e4455b6b3090c84a2ab2f4a7656b4d8
2021-08-18 22:26:51 +00:00
drh
72532f52bc
Trying to insert an incorrect datatype into a STRICT table raises an
...
SQLITE_CONSTRAINT_DATATYPE error. Seems to work, though lots more testing
is needed.
FossilOrigin-Name: a19305e5cfedf5c472200d6e05c1396443e348f052a40a0979f860f2ff06851d
2021-08-18 19:22:27 +00:00
drh
44183f83d0
What would it be like if you could add the keyword "STRICT" after a CREATE
...
TABLE statement to cause the table to (1) allow only a few well-defined
datatypes, (2) rigidly enforce those types, (3) require NOT NULL on PK
columns, (4) always enforce foreign key constraint, and so forth? This
branch seeks to explore that question.
FossilOrigin-Name: 78732b9f98936693ae29c85a692c35a84c7d065aec79903af34b08d18f10a5e6
2021-08-18 13:13:58 +00:00