Commit Graph

23207 Commits

Author SHA1 Message Date
larrybr
b3e4423137 Accomplish fileio standalone for Win32 with less intervention.
FossilOrigin-Name: af5dcc9c2a3a45d10b985f6b7ea18d39c75502ed10fa6496aad787dbe8c8c3fb
2021-09-20 21:42:39 +00:00
larrybr
3d99743423 Allow fileio extension to be a stand-alone DLL for Win32
FossilOrigin-Name: d1cc3105b2baceb9f426fd6bc8d8317de3af09a0f02517715bd292c68e282fa1
2021-09-20 20:15:28 +00:00
dan
5488e0827a Further tests for legacy rtree geom callbacks.
FossilOrigin-Name: 99d6bb22e8735681443bfe67287aa15ce2c57d0d63e304abf8aa01fde50dd021
2021-09-18 16:15:54 +00:00
larrybr
d96bcc75e8 Shell's .read pipe now works for Windows too.
FossilOrigin-Name: 929bcc4098549692c573779d65c4c28027b0a2f48ebbf5b3f038deee24374b67
2021-09-17 21:12:47 +00:00
dan
01ed72f2c5 Add tests for legacy geometry callbacks to rtreedoc2.test.
FossilOrigin-Name: 6ad00e52eda5bc4cb8e6fffbd7538bcd4c6b22f84b837a746eba6bf8c91eb55a
2021-09-17 20:43:27 +00:00
drh
3780f9a4aa Make the affinity() function available even if compiled without
SQLITE_DEBUG.  Surround the implementation of all test-only SQL functions
with #ifndef SQLITE_UNTESTABLE.

FossilOrigin-Name: b7e00ef8059f6fb5658c6ad6f337cfdf065a5f1b1130452122282f3a69e98a93
2021-09-17 13:07:15 +00:00
drh
89b1715415 The dbsqlfuzz fuzzer found a refutation for a recent ALWAYS() macro.
FossilOrigin-Name: ebfc18aaa6506ccac80f297a1792e726972bb39c0b5c8706faadeb8df94a45e9
2021-09-16 22:23:36 +00:00
drh
8e4616c280 Minor changes to rtree.c so that we can get full branch coverage even when
it is compiled without geopoly.

FossilOrigin-Name: f05ae9b5864459493154037d2c902d203c4a43007b5d61bd4beb1eed56e06d13
2021-09-16 20:16:39 +00:00
dan
72fb42d570 Add tests to rtreedoc.test.
FossilOrigin-Name: b18c6ec46079520e0db8b42586ce9370a4038d0b4f719cfb98488037883e2537
2021-09-16 19:50:54 +00:00
drh
051c9ba1be Add a single new ALWAYS() to rtree.c, with justification.
FossilOrigin-Name: 778e4499cdf2083d5431738099dedf0aade9271f661e09ca3278e0109bb1e720
2021-09-16 17:02:59 +00:00
drh
495f78d851 Add a tag comment in rtree.c. No changes to code.
FossilOrigin-Name: 213410fa9cceb4ce34bf590ba65648ebeb94cc8d0c29a8881222208097162a95
2021-09-16 16:41:59 +00:00
dan
bea28c73a3 Add a reference counter to a structure used internally by the Tcl interface so that it does not segfault if the database connection is closed from any of the various callback scripts that may be invoked.
FossilOrigin-Name: e54a33ce56432b23947583d34cf12fc64a55bbc49eb77c7f33cff5926df51070
2021-09-16 14:17:14 +00:00
drh
eb56e29053 Mark an unreachable branch in rtree.
FossilOrigin-Name: e6c4afd5b365b8dea8c0742352a09029da0f9715dd2407d4ccf53f1e0a4ce625
2021-09-16 14:07:09 +00:00
drh
86b262ecfa Back out a couple of ALWAYS() macros from [4fab9089868bbb05]. Test case
added to TH3.

FossilOrigin-Name: d26963a530ccbe36a174823d2f0bd7e06c6fca4f38ecdd04cd700c4000cc3719
2021-09-16 13:52:28 +00:00
drh
e73e957c1e For ALTER TABLE RENAME COLUMN, do not try to filter virtual tables out of
calls to sqlite_rename_column().  Let the function filter them itself.
The WHERE clause can mistakenly let virtual tables through if the
sqlite_schema table is corrupt.  The sqlite_rename_column() function must
deal with them.  We might as well let it deal with them always.

FossilOrigin-Name: 7c82b43b7cdb825f431d3a778f8b34e32666ccb3b067f1f2533d3b3dcca7bdc9
2021-09-16 13:20:29 +00:00
drh
11eb9c6a28 Under SQLITE_DEBUG with PRAGMA vdbe_trace=ON, show an output line if the
VDBE aborts for any reason.

FossilOrigin-Name: 7e3d6810039ca4563aa68dfa3671f570792a10f75c8eea68aa7dfd02d17702ca
2021-09-16 12:33:53 +00:00
drh
162f153579 Simplify the routine that attempts to estimate the size of an rtree index
by looking at the sqlite_stat1 entry for the %_rowid table.

FossilOrigin-Name: 06c329c17c2c2de8bc1ca7f3b0b929055675761a8be7a7e8b4a9fc5cca0d1679
2021-09-16 07:32:24 +00:00
drh
36784e0fb1 Mark various unreachable branches in rtree.c with ALWAYS() or NEVER().
FossilOrigin-Name: 4fab9089868bbb05a192da09bc201f0a84c5b9bef39dcb063afc1d7658299fdd
2021-09-16 05:39:07 +00:00
drh
c464ec6710 New ALWAYS() and assert() to mark unreachable branches in rtree.c.
FossilOrigin-Name: f7ad73c49507c9436adc7fe1b865f801eefcc7ea6b3ba35e83e63029beb03016
2021-09-16 05:24:40 +00:00
drh
5f9c7ba9d8 In rtree.c, remove an incorrect ALWAYS(). Add other ALWAYS() and NEVER().
FossilOrigin-Name: cbaac8878aac0623beb5af3bc79a5b1c0179213206fd658b8c4fcc3531889480
2021-09-15 19:53:22 +00:00
drh
750f2331c4 Add more ALWAYS() macros on unreachable branches in rtree.c
FossilOrigin-Name: fbba89dac9591c56da81bd0808910fbc64640f3ccfd95845ecab4d3aea46ca61
2021-09-15 19:13:24 +00:00
drh
8038cb99b0 Fix the xBestIndex method on rtree so that it correctly recognizes that
rowid=? works the same as id=?.

FossilOrigin-Name: c74c07cc86443057d34284ae31eb68470741592b0e61072fd5e120e82919169b
2021-09-15 16:20:15 +00:00
drh
04bd2c837b Add ALWAYS() macros on some unreachable branches in rtree.
FossilOrigin-Name: 9123f680ae3100f4c781ac4f5b8afac49bb5d4231b5931ad112b1b615f22f613
2021-09-15 15:56:00 +00:00
dan
f02c324bc1 Further updates to rtreedoc.test.
FossilOrigin-Name: e66727837ddd5d1344c252323d52600b6138f5a2471f63d09b5a28ea2c22e595
2021-09-15 15:53:01 +00:00
larrybr
998e910346 Fix non-build for a test configuration
FossilOrigin-Name: c9a4ab059050a83d811149ff196ff16ea9e4c301627482800982b87cd30ddbbc
2021-09-15 14:48:02 +00:00
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