drh
2a6a72a81c
Ensure that the db->init.azInit array is initialized at all times.
...
dbsqlfuzz 0ad6d441f9bf3dfc32626a9900bc1700495b16f9
FossilOrigin-Name: c7560c1329965ab57cd71393c044b110561b83641d08677bc51044df9e377882
2021-09-24 02:14:35 +00:00
drh
6caccc1660
Enhance the TCL-based test harness so that it is possible to list multiple
...
test modules on the "testfixture" command-line and have them all run.
For example: "<tt>./testfixture test/shell*.test</tt>"
FossilOrigin-Name: 45caf9b85fc75abe80e3d2704fc634e4b103647c912c3fbffb1847d8cb581b62
2021-09-22 10:57:30 +00:00
larrybr
866c44704f
Speed and (slightly) simplify shell's input line early processing.
...
FossilOrigin-Name: a1c7f7f8e1b46440234be96e813e4c2c28150413dd95dcab5d13b9c80a202edf
2021-09-21 19:19:28 +00:00
drh
2e50f67073
Add the "PRAGMA table_list" command with its corresponding eponymous
...
table-valued function: "pragma_table_list".
FossilOrigin-Name: 2c0e7ae541e9ecb86aa58fa7e7057def8aac1b1af1af1aa80b8bf2d260f9a2f9
2021-09-21 17:26:23 +00:00
larrybr
6b7e47fa58
Adjust shell tests for *Nix and Windows test platform anomaly
...
FossilOrigin-Name: 577544c5a2f193e00e5ca55b7feae96568198019573b9b0b37e2bf4300d6d524
2021-09-19 18:31:55 +00:00
larrybr
7e00984a47
Sync w/trunk, further streamline shell's resumable prescan.
...
FossilOrigin-Name: 9e00f9f7c03c192a3fb6b22851db0626515c59daac5ce6520229c42c838bf5b7
2021-09-18 21:35:22 +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
c0bd26a23a
Update requirements marks to reflect recent documentation changes.
...
FossilOrigin-Name: 08cab8921e670a0d1758b505fe8c7455f6194cec69d1b7b77de91688be1028a6
2021-09-14 18:57:30 +00:00
larrybr
8d463ce135
CLI prescanner made to match SQLite's rules for delimited identifiers. Tests begun.
...
FossilOrigin-Name: 15b105c520968855ad960d8929f80af9e9bedc155237af9af1956f7b546947f2
2021-09-11 02:42:04 +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
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
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
drh
59bccb2637
New test cases added to fuzzdata8.db. No code changes.
...
FossilOrigin-Name: 51e5aadafe1a4ba6a0be7fc1732d1ec940cbc5e23723b76267c2abf887d713ac
2021-09-07 19:23:32 +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
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
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
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
faf9c77b4b
Improved error messages for the SQLITE_CONSTRAINT_DATATYPE error.
...
FossilOrigin-Name: 39abca01479c0f4f747b7b21fa05181896b00ed7559f0ab74aa575c23097ac21
2021-08-20 08:05:42 +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
dan
0546027cd7
By default, do not use memory mapping to access the temporary files used for external sorts. The old behaviour (to use memory mapping by default) may be restored by building with SQLITE_ENABLE_SORTER_MMAP defined.
...
FossilOrigin-Name: 306694dfb462f9d1f128461e7a8f15a0bb9b21fbc696caa1832f4b20749490d1
2021-08-12 14:22:30 +00:00
drh
df67ec08ff
Do not apply the push-down optimization to CTE subqueries that will be
...
reused in other contexts in where the same optimization is unlikely to
be valid. Fix for the bug reported by
[forum:/forumpost/d496c3d29bc93736|forum post d496c3d29bc93736].
FossilOrigin-Name: a7ce29a6ef2e0362bbc9b23719d936dce07209b2651153c774682f599bbd888e
2021-08-11 13:48:56 +00:00
drh
c2df4d6adb
Recognize certain standard datatypes ("INT", "INTEGER", "REAL", "TEXT", and
...
"BLOB") and if a column has one of those datatypes, store the type part of
the bit-field information in the Column structure to save space.
FossilOrigin-Name: d2da62a9df63036b02dadca3798de9e623c2680b3ef0c37d2b18bb88693afd7f
2021-07-30 23:30:30 +00:00
drh
e48f261ebf
If a generated column uses the optional keywords GENERATE ALWAYS, try to avoid
...
putting those keywords in the typename of the column.
[forum:/forumpost/ff3ffe09251c105b|Forum post ff3ffe09251c105b]
FossilOrigin-Name: 3c954863f45271a3518acf51fd685a641878811fb5cfcbdbad85154aeccdc902
2021-07-30 20:09:08 +00:00
larrybr
1ae057d873
Remove sqldiff --visible-controls option, make it always happen. Add test cases for controls made visible
...
FossilOrigin-Name: ff74c0cc4cefa5271b12ecfff3f2fd4749852d9d1d01f4ae64a07a26decc001b
2021-07-26 19:49:01 +00:00
drh
55b8b73e74
Fix ALTER TABLE DROP COLUMN so that it generates valid bytecode even when
...
operating on a corrupt database and using PRAGMA writable_schema=ON.
dbsqlfuzz 5f09e7bcc78b4954d06bf9f2400d7715f48d1fef
FossilOrigin-Name: b65f4f763979ee9e0b943c787609ea22d6f7e01d41dfc1e084ec50a085a3550c
2021-07-22 18:22:51 +00:00
drh
348e002ec9
One of the optimizations of check-in [de9c86c9e4cdb34f] does not work for
...
terms originating in the ON/USING clause, as demonstrated by
[forum:/forumpost/6cf3bb457c3f4685|forum post 6cf3bb457c3f4685]. This
check-in disables that optimization for ON/USING terms. Also improve the
TreeView display for the resulting "true"/"false" nodes to show that they
originate from the ON/USING clause. Add a testcase() to the other optimization
to show that it can still be used for ON/USING terms.
FossilOrigin-Name: 1f6796044008e6f3a61bcf390c0c7eb31947e971f0edada74e7a3a211f8ae76a
2021-07-22 16:07:01 +00:00
drh
74e5a5a703
Run a "PRAGMA quick_check", if necessary, on the modified table after
...
an ALTER TABLE ADD COLUMN to verify that added NOT NULL or CHECK constraints
are satisfied by existing rows. Abort the ADD COLUMN if not.
[forum:/forumpost/c04814903d6ec4f7|Forum post c04814903d6ec4f7].
FossilOrigin-Name: e3794997c34f03db2a4ac0ca5b76727d0e031778d92b08eaaf9631689ec3e56d
2021-07-20 16:07:15 +00:00
dan
d59f983501
Avoid a malfunction that could occur if the same correlated column reference appears in both the GROUP BY and the HAVING clause of a sub-select. dbsqlfuzz a779227f721a834df95f4f42d0c31550a1f8b8a2.
...
FossilOrigin-Name: 1e35cc6d5c2f563c6bb163bb150d7bc6ede4c993efa828af1face3261bf65a2c
2021-07-20 14:57:49 +00:00
drh
0f91a5352b
Fix issues in the new ADD COLUMN constraint checking. Add preliminary
...
test cases.
FossilOrigin-Name: 48434ad3fa9504c063d812d119bc8f622548fd02b3d478ff247b11474c4ce5db
2021-07-20 08:23:54 +00:00
drh
53fa02507b
It does not work to deserialized into TEMP, so do not allow it. The
...
sqlite3_deserialize() routine now returns SQLITE_ERROR if you try.
FossilOrigin-Name: 18068cc60698d4944a9d682cdf34b14b4d4b32f043f8d584dbf41c2bb5ac6220
2021-07-20 02:02:24 +00:00
mistachkin
f5b70d06ea
Fix compilation of 'threadtest3' for some older versions of MSVC.
...
FossilOrigin-Name: b5ede6a68891820bd5b6d051b1b641bc1cd49104cad2466db184134d14f58f5b
2021-07-20 00:18:22 +00:00
drh
de3246176b
More precision in comparing integers and floating point values while
...
processing the integer primary key for OP_SeekGE and similar.
[forum:/forumpost/2bdb86a068|Forum post 2bdb86a068].
FossilOrigin-Name: f9c6426de3b413ff8fcf04a00931ca5f123f996c572b35181af114afa8d811d7
2021-07-19 20:52:31 +00:00
dan
bb2d2a50f9
Updates so that "threadtest3[.exe]" can be built for windows with MSVC.
...
FossilOrigin-Name: 4ce585fb07274284e3add6adcb66ed06e4b109584704d1ec7152bf43ca8d5d85
2021-07-19 16:49:13 +00:00
drh
e46ec734c7
Modify the generate_series() table-valued functions so that its first
...
argument (the START value) is required. Throw an error if that argument
is not supplied. In this was the series.c loadable extension can be used
as a demonstration of how to code an xBestIndex function to require certain
parameters. Compile with -DZERO_ARGUMENT_GENERATE_SERIES to obtain the
legacy behavior.
FossilOrigin-Name: 459d85a2898d6a53f43b4ad48d2f39edd1bbe37a4f97426a5d666c39c52576a4
2021-07-16 17:04:17 +00:00
dan
20235e56f7
Fix a use-after-free error in ioerr.test caused by an error in test code.
...
FossilOrigin-Name: 1594056aab068b9fae82f6b885828c7127d9bedcc37c4340486e32791bc87c7a
2021-07-14 21:18:31 +00:00
dan
8eed584786
Fix an assert() that might fail if sqlite3_create_function_v2() is invoked with NULL xStep and xFinal callbacks and a non-NULL xDestroy.
...
FossilOrigin-Name: ab1550a608684b6b9104b555a975482cfabca5053b7d7dcc60d63a0e3a8d707d
2021-07-09 14:59:12 +00:00
dan
bd24e8faa3
Preserve and return to the user any error message returned by a failed xConnect() call on an eponymous virtual table that prevents a query from being compiled.
...
FossilOrigin-Name: bbbbeb59a6a14b94dcbaf218cbcfbd39feba4a1df5b37c0e1a955391393eeec4
2021-07-08 18:29:25 +00:00
drh
9d41caf361
Fix a harmless compiler warning in the "fuzzcheck" test program.
...
FossilOrigin-Name: 8c432642572c8c4b7251f413def0725b3b8e9e7fe10230aa0aabe86b58e5902d
2021-07-07 19:44:32 +00:00
drh
4f16ff9d06
Follow-up to [68db1ff9c44fa9c3]: The number of registers needed by
...
PRAGMA foreign_key_check was increased too late for an assert() deep
down inside of sqlite3ExprCode(). So move the size increase a little
earlier.
[forum:/forumpost/79c9e4797d|Forum post 79c9e4797d].
FossilOrigin-Name: 7072404ad0267b8ee774b2804ea59ea28e29316521d76d76a701595e51d1be97
2021-07-07 16:48:24 +00:00
dan
74777f994d
Improve the error message in cases where there is a row-value on the LHS of an IN() operator, the RHS is a list (not a sub-select) and at least one element of the list is not a row-value with the correct number of elements.
...
FossilOrigin-Name: 6b22f4e71dbc14c887ebbda67095b5faaa8079cac87cd4ab5a2ae90c71cd9633
2021-07-07 13:53:55 +00:00
dan
9289f5103d
Handle "<vector> IN (<vector>, <vector> ...)" in the same way as "<vector> IN (VALUES(<vector>, <vector>, ...)".
...
FossilOrigin-Name: 981d230ece98ce89502dab02aa44f73699a9d0e4fce3e9e9dfd47444a5a9990f
2021-07-06 20:44:32 +00:00
dan
5daf69e5f4
Allow sub-queries in the FROM clause of an UPDATE...FROM statement to access the object being updated without using an alias, as is required in the parent query.
...
FossilOrigin-Name: 740cb43025449b7d7b47a97ad00885e54b7701cbcb14f4a50c7523022e3936d5
2021-07-05 11:27:13 +00:00
drh
e46292a920
Improved rebustness in sqlite3ExprListDup() when it contains a vector assignment
...
from an UPDATE where the initial term is omitted. This can happen during a
UNION ALL query flattening while processing a virtual table update in which
the first term of the vector is repeated.
[forum:/forumpost/16ca0e9f32|Forum post 16ca0e9f32].
FossilOrigin-Name: 2547cfe38f8fb35109b3fc5bdfada387fe4b2b8a304156b704ab7f03f1f71198
2021-07-05 02:40:29 +00:00
drh
105c4b5ced
Fix an incorrect comment on testcase misc1-27.0. No changes to code.
...
FossilOrigin-Name: 49829ae3229b7c7c7adeaa970a84aebd5157bc93b38fd6d80d86cc03f5fdde6f
2021-07-05 00:07:39 +00:00
drh
5c46a7e555
In the PRAGMA foreign_key_check, ensure that sufficient registers are
...
allocated for the virtual machine, even if one or more foreign keys reuses
the same column multiple times and has more columns than the table it is part
of. [forum:/forumpost/a6b0c05277|Forum post a6b0c05277].
FossilOrigin-Name: 68db1ff9c44fa9c37690ce55ad304d4263ba6fac490063d9e08470de6c17cfe6
2021-07-03 02:55:47 +00:00
drh
dd51365408
Put ALWAYS() on a branch that is always true due to [d4097364c511709b].
...
Fix a testcase precondition associated with the same check-in.
FossilOrigin-Name: 55e2fbebb0a2c9991feef46f31e79b82a24de272aae836bf4d3c06ee06ef1a70
2021-07-02 12:25:30 +00:00
drh
4d466698a2
Fix a harmless assertion fault discovered by
...
[https://oss-fuzz.com/testcase-detail/5517690440646656 |OSSFuzz]. The
assertion fault is harmless because the assert() checks a condition that
that is harmless if false and the assert() is disabled in production
builds.
FossilOrigin-Name: 79443aabe1db8cc2ff9537fde0dac0e858eae3f3848ee9cc1b8fba47b824bf08
2021-07-02 12:08:12 +00:00
dan
b9248ef5c7
Allow unqualified "rowid" references to be used in join queries, provided that only one of the source objects has a rowid.
...
FossilOrigin-Name: d4097364c511709b1874881a0c036640777d1f724165416adf6f53a41f8c6e40
2021-07-01 18:19:17 +00:00
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
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
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
drh
4d2c20331a
Load recent dbsqlfuzz cases into test/fuzzdata8.db.
...
FossilOrigin-Name: a766bba0eead47e9ff24b6afd152a7fbd331261e04dd76feb9510585a08c5786
2021-06-20 22:52:51 +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
drh
cbe83495ee
Adjustments to requirement markings in comments. No changes to code.
...
FossilOrigin-Name: be00e45b723adf64bc78927dc12de3116fd04912a52e5c105a52f235c57698f5
2021-06-16 12:26:01 +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
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
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
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
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
drh
18f9be897d
Remove two assert()s in FTS5 that checks for database corruption right before
...
actual code does the same check.
dbsqlfuzz 9680db8f5338cb9b6060eb3a02d984555d4472e3.
FossilOrigin-Name: f3f82967b2e9fd4168d86300138ac4bbcd6ffd7a3ff5ecf20acdc29e5356ac3b
2021-06-08 23:46:59 +00:00
dan
822810b95a
Avoid a buffer overread in fts3 that could occur when handling corrupt data structures.
...
FossilOrigin-Name: 45f459d2fa4be97d9bbb970efbc0b5d40efaf93f52ed111fd0fcdc572c24327b
2021-06-08 12:15:56 +00:00
dan
ec73546103
Fix a buffer overrun in fts3 that could occur when handling corrupt records and '^' queries.
...
FossilOrigin-Name: 9d0b6b0f42a47a3892ebc765250756fb8b844e8399d992a8b65f55af3800ea06
2021-06-07 15:28:33 +00:00
drh
09c69fc1b3
Add recent dbsqlfuzz test cases to test/fuzzdata8.db.
...
FossilOrigin-Name: 162022003c2b4a393296939e2616bd3c7bbfd65b198ba6c9894e4234de2d3122
2021-06-07 14:21:03 +00:00
drh
946b65793c
Improvements to the OP_SeekScan optimization. Added the
...
SQLITE_TESTCTRL_TUNE test-control.
FossilOrigin-Name: 9a2ab6092d644fc3effc4ab4aca33efb2b4dd4213b2154d518a3e87eec4d3983
2021-06-04 17:47:08 +00:00
drh
9718bca77f
Fix more cases in the regexp extension where the 0x00 terminator at the end
...
of the input string is being pattern matched.
[forum/forumpost/9104f0d9e7|Forum post 9104f0d9e7].
FossilOrigin-Name: 569e00d4acd426667990d675ca5da48a1859ac84af2412464ecd29c7c5da828c
2021-06-04 15:56:43 +00:00
drh
2540a7482a
Merge recent trunk enchancements into the seekscan-improvements branch.
...
FossilOrigin-Name: d9e85fe80cdd3d798a583a5f99148235d0c3f39adfabbc661615893c387e6e45
2021-06-04 12:29:22 +00:00
dan
19e4eefbca
Fix a case where combining row-value UPDATE FROM syntax with window functions over aggregates can cause an error.
...
FossilOrigin-Name: 4a587c3492faa99490fd67ca1de9fceafcdc12d220f42817791923be258b73f1
2021-06-03 18:56:42 +00:00
drh
a6df0e693f
Fix the truncate optimization so that PRAGMA count_changes and changes()
...
return correct values even for a WITHOUT ROWID table.
[forum:/forumpost/07dedbf9a1|Forum post 07dedbf9a1].
FossilOrigin-Name: 820ae3b117c2d8c117c0c5a4e440a7d06886772516c7fc0a84606388f91be195
2021-06-03 18:51:51 +00:00
drh
de30a3d2e1
Fix a bug in the regexp extension in which the "." wildcard would match
...
the 0x00 terminator at the end of the comparison string.
FossilOrigin-Name: fa23108b299fc70e80540c449500e50ac6344a152f4f6b9c1b1f568bbda8f6e1
2021-06-03 13:44:19 +00:00
drh
75f7317722
Fix the case-insensitive version of the regexp() function so that it does not
...
use the prefix optimization incorrectly.
[forum:/forumpost/983b43ef8e|Forum post 983b43ef8e].
FossilOrigin-Name: 1a8e43cc1b7969c40140dd7fd481d5ffd9de80e214eb494567c286d93a2b06e5
2021-06-03 12:31:08 +00:00
drh
9966439879
Fix an ALWAYS which can be false.
...
FossilOrigin-Name: a87f8ecd6db11ea40a15314b875fc78289c19ab2dec6f738b4bf37f4aafa7bbd
2021-06-02 18:50:39 +00:00
drh
eda790d28b
Never use WHERE_IN_SEEKSCAN for the 2nd or subsequent IN operator.
...
FossilOrigin-Name: d0b98619082038ed451912bcdf56568835a8577989a25cacf25591f2366d4f52
2021-06-02 17:14:50 +00:00
dan
b56a09079e
Fix a problem with running ALTER TABLE against schemas that contain compound SELECT statements with ORDER BY clauses containing one or more references to the second or subsequent component SELECT statements.
...
FossilOrigin-Name: 587a3044468a40707c714d013cb766d8a4d9eb13bb20871846a0e8c34bea8cf4
2021-06-01 15:37:14 +00:00
drh
d65b7e36ec
Do not confuse the ">" operator with IS NOT NULL when checking to see if
...
a partial index is usable.
[forum:/forumpost/d813704d7c|Forum post d813704d7c].
FossilOrigin-Name: 8cc23931d61b7d78521acce93fc2603649c5813c7a0869cb2c1bde2c8c4e51b4
2021-05-29 23:07:59 +00:00
dan
c3b48848b3
Add new test file whereM.test. Containing tests for the change on this branch.
...
FossilOrigin-Name: c4c76b824c41afb5b4d7b397c4d3142698aa303ea3a368c0cc7af4884e3a10bd
2021-05-26 19:37:27 +00:00
dan
151446e793
Update an assert() in wherecode.c that might fail following an unrelated SQL error.
...
FossilOrigin-Name: 3e2c36a8272ab3c1777638c0ed8222e7ff04657fe1c40f74a63b99a5a90258cc
2021-05-26 14:32:33 +00:00
dan
4df68e0ae5
Update an allocation routine in the sessions module to allow it to allocate the maximum size permitted by sqlite3_realloc64().
...
FossilOrigin-Name: 0b45e821911e4a852edd6d9e9cfe5f9de33337edf76fb12b79adaf11a4b83e8a
2021-05-25 15:21:54 +00:00
dan
c00727ab58
Fix a problem in the in-memory journal code that could occasionally lead to a segfault when a sub-transaction that modified zero pages was committed.
...
FossilOrigin-Name: 17960165f5840cab45b7a8bb02779ebfb321c68f33ec6da9ab14063ccd134fa4
2021-05-24 14:35:19 +00:00
drh
0fcf6f01e7
Minor comment improvements in fuzzcheck.c.
...
FossilOrigin-Name: 7aca8d52c16c2192d9c1ff03a976c482a60365cef8d2474b540ff4c84e8737b4
2021-05-24 12:28:13 +00:00
drh
b6b06bb339
New dbsqlfuzz cases added to test/fuzzdata8.db.
...
FossilOrigin-Name: 5bb5c9ec049488f95e47bbd9f1db9038ffabad3cfafa613acdaa790ab4034eee
2021-05-24 12:13:10 +00:00
drh
0542812726
Additional defenses (above and beyond [b986600520696b0c]) to prevent an
...
invalid subquery from causing problems downstream. If an error is found
while analyzing a subquery expression, change the expression to TK_ERROR
so inhibit further processing on that expression.
dbsqlfuzz cf624b8c0484c66e0f552bf6475e3e3f2c22b24e.
FossilOrigin-Name: 0be6b6c9f7c562e764792a4a5eb53ed11b230174b19361f7cd7778c743314bbd
2021-05-24 00:17:04 +00:00
drh
7cc73b399e
Do not push a WITH clause onto the processing stack if prior errors have
...
occurred. dbsqlfuzz 6b7a144674e215f06ddfeb9042c873d9ee956ac0.
FossilOrigin-Name: c2066dde53b9872dbb991e27419dd031791c942fe23826556f52efbd66c51662
2021-05-23 17:47:04 +00:00
drh
5e1a7ded4d
Do not invoke sqlite3ExprAffinity() after a syntax error that might have
...
left the tree in an inconsistent state. See also [e8a1515b44380cc5] and
[forum:/forumpost/7e484e225c|forum post 7e484e225c].
FossilOrigin-Name: b986600520696b0c91c4ccc6aff1b698391b4bcaf8a3ea436be1967883faa2fe
2021-05-22 11:23:20 +00:00
drh
93c8139c1a
If there are errors in a nested CTE, be sure to abandon processing. Do not
...
continue since the parse tree may have been left in a goofy state which could
cause use-after-free and segfaults.
See [forum:/forumpost/aa4a7a3980|forum post aa4a7a3980] for an example.
FossilOrigin-Name: 94225d693932eb0b5d7799d40513afbd31ed40e1e156675eb92ad7216f1ff20f
2021-05-21 21:49:07 +00:00
drh
ec2f689b21
Fix a faulty assert() statement in sqlite3ExprListDup(). This is a continuation
...
of the fix at [59812e7ef705226c].
FossilOrigin-Name: 240f7494bfa3e0806ae2f971e78039c62a419de647cb9e807309f90e1d2a536d
2021-05-20 23:25:28 +00:00
drh
a76b7f5296
Enhance one test case to use various alternative definitions of DUAL.
...
FossilOrigin-Name: 179dcb6ba771f0e94e06b5e3c5534d8005d27b2c9b4601be20fd68abfbc5dfd0
2021-05-20 18:11:45 +00:00
dan
90bc36fb30
Ensure that objects within view definitions are not incorrectly resolved to CTEs that are part of the statement using the view.
...
FossilOrigin-Name: f7dcc4b5197c6413be31384b390bb98a737d3f9edb7964433448c3b90b35a436
2021-05-20 17:15:06 +00:00
drh
cd1499f47b
Replace [0f0959c6f95046e8] with a new and better solution that also fixes the
...
CTE name resolution problem described in
[forum:/forumpost/8590e3f6dc|forum post 8590e3f6dc].
Test cases for both problems added.
FossilOrigin-Name: 5614279daff5007d6e047c5c1b3cc82ba80a5c91c529525b0fe68b79ee82dd2c
2021-05-20 00:44:04 +00:00
dan
3d691fd9ff
Allow aggregate sub-selects within ORDER BY and PARTITION BY clauses of window frame definitions.
...
FossilOrigin-Name: 3daab94977af5e8a95690acc555540311403d890a3261a9757c633fcaaf428a9
2021-05-19 14:49:51 +00:00
drh
9088186bfb
Improved column name and column type determination for the RETURNING clause.
...
FossilOrigin-Name: 699c33990a9438f28673ecf34f1e521d1af0b01c6ee30a608c0c91d2d593590e
2021-05-19 12:17:03 +00:00
larrybr
99bd552503
Cure some TCL test failures and narrow an object scope.
...
FossilOrigin-Name: 1155696c700862de1a8b1318bc41cd5cd01dec1af2c7720d8ef1e5c3321c425d
2021-05-19 02:33:42 +00:00
drh
93ffb50fcd
In the MULTI-INDEX OR query plan, code for sub-expressions can sometimes be
...
generated twice. But for some subqueries, generating code off of the same
tree twice causes problems. So now MULTI-INDEX OR makes a copy of the
sub-expressions it uses to avoid code-generating them more than once.
dbsqlfuzz 9ebd2140e7206ff724e665f172faea28af801635.
FossilOrigin-Name: 4a55f72542c8bcc80253aa77043314cecb29d73cb4f51aa80f7811e86cc8ef68
2021-05-18 19:10:10 +00:00
dan
be12083bc7
Fix problems with refering to CTEs from within sub-selects in PARTITION BY or ORDER BY clauses of window frame definitions. Also a problem with renaming a column when the schema contains a trigger containing a correlated sub-select within a window frames PARTITION BY or ORDER BY clause.
...
FossilOrigin-Name: 4c6cd54a8db78e5535912e76856bed4f797261aaca4248c69d2e2452194de297
2021-05-17 16:20:41 +00:00
drh
ba39ca4058
When deleting an SQL function that does not exist, return without doing
...
anything at all rather than creating a tombstone function. In this way,
function deletes that happen inside virtual-table destructors that are run
when a database connection is closing do not create new tombstones in the
function table after the function table has already been purged.
[forum:/forumpost/726219164b|forum post 726219164b].
FossilOrigin-Name: 391c73132c80df944fb49a17d8fe78203c54ac48f968ee9dd9dd8c769c0b4b10
2021-05-17 13:11:24 +00:00
drh
6a9595a76b
Avoid adding superfluous virtual WHERE clause terms that might arise due
...
to the constant propagation optimization.
FossilOrigin-Name: cf63abbe559d04f993f99a37d41ba4a97c0261094f1d4cc05cfa23b1e11731f5
2021-05-14 15:37:00 +00:00
drh
756748ea86
The content columns of the index-btree that implements a WITHOUT ROWID
...
table are not ordered and so the query planner should not assume they
are ordered. Fix for the issue identified by
[forum:/forumpost/6c8960f545|forum post 6c8960f545].
FossilOrigin-Name: c21bc5a2353e660f2acf5ed916921a4ee416910d0b3f2deb512a05c54138d1c0
2021-05-13 13:43:40 +00:00
drh
85ffcae177
Add the new threadtest5 test program for stressing multiple database
...
connections in the same process hammering on a single database.
Primarily designed to test memdb, but works on any database.
FossilOrigin-Name: 8db1c06958b8e1691440d4fd392648b74a1940b721852dabd315005efad520fc
2021-05-12 14:17:20 +00:00
drh
8d889afc0d
Enable the sqlite3_serialize() and sqlite3_deserialize() interfaces by
...
default. Omit the SQLITE_ENABLE_DESERIALIZE option and replace it with
the SQLITE_OMIT_DESERIALIZE option.
FossilOrigin-Name: 6df3b03e00b1143be8fed3a39a58ce81063020275aa1ac13d87c84f1ceda6e27
2021-05-08 17:18:23 +00:00
drh
4752bbd872
Detect misuse of aggregate functions in the ORDER BY clause of a query
...
even if the query also contains window functions.
FossilOrigin-Name: 0d11d777c8d368f0b6e9faf3afccf7da1b041d303a68782e43aebd713aaecf51
2021-05-07 15:46:36 +00:00
drh
67656ac78a
When applying the optimization that disables WHERE clause terms that drive
...
indexes, make sure not to do so if the term being disabled is a transitive
constraint. Fix for the problem identified by
[forum:forumpost/eb8613976a|forum post eb8613976a].
FossilOrigin-Name: f1f9b5de3c59489b94963685660b3ddc45eece5535b02fec399b6ece0e38563d
2021-05-04 23:21:35 +00:00
drh
433a3e935d
Back out the EXISTS-to-IN optimization. It slows things down rather than
...
speeds them up depending on the query. And (see
[forum:/forumpost/8692d94725|forum post 8692d94725]) it sometimes results in
an incorrect answer. We may come back and revisit this optimization later,
but for now it seems best just to disable it.
FossilOrigin-Name: 16252d73fa73569fd7506676f6ffbbcd43addfb105384fb74449d30ca720904a
2021-05-04 12:07:16 +00:00
drh
736d11ed21
Back out the NEVER() inserted by [c7309ed3c7588c7e] because it is reachable
...
after all. dbsqlfuzz bc17a306a09329bba0ecc61547077f6178bcf321
FossilOrigin-Name: 20a4f3f12cdd8823d53d91025fa41e284c9f629b1d049eb486ff8dc4a1736e1f
2021-05-01 12:09:36 +00:00
drh
5960724789
Fix the operation of the "-" argument to --load-dbsql in the fuzzcheck program.
...
FossilOrigin-Name: 1f18b3cbee7e1342fdd66e45ef744fea3db2ba4513943c0582ff8ef98974865e
2021-04-29 18:03:42 +00:00
drh
81f5ef05a9
Fix the IN-early-out optimization so that it works even for the corner case
...
where the NULL bypass fires before the affinity of the LHS operator has been
set. Fix for the problem described in
[forum:/forumpost/6a3ec138e9|forum post 6a3ec138e9].
FossilOrigin-Name: eb40248ce606b792a02e4e0b7dd826a82891c5f4c9793f3ca5d332e593109525
2021-04-29 15:49:34 +00:00
drh
5e26d07d62
Update test/fuzzdata8.db with recent dbsqlfuzz finds.
...
FossilOrigin-Name: bce2ea393a872b5b70ef3b9cedce3d406725dcc56d8800ee4f7ec29562cc3f9b
2021-04-29 10:48:50 +00:00
drh
3765c03243
Further improvements to the handling of RETURNING clauses on changes
...
to TEMP tables with triggers.
dbsqlfuzz 683913e98f54fe4f14e8dd11a48011f73bdca58d
FossilOrigin-Name: ff3538ae37a02f4f36a15cddd1245171e724aac9c84b2e576980fd3806302775
2021-04-27 17:18:10 +00:00
drh
a476768340
RETURNING bug fix: Correctly deal with RETURNING statements on changes to
...
TEMP tables that also have triggers.
dbsqlfuzz 78b9400770ef8cc7d9427dfba26f4fcf46ea7dc2
FossilOrigin-Name: d0b15eccbfe1e50c3daf7b2fd4769a52bba35d553b07e462ca3f5f22df6742fd
2021-04-27 13:04:18 +00:00
drh
d8bc250b91
New dbsqlfuzz cases added to test/fuzzdata8.db.
...
FossilOrigin-Name: 88d20500c516fe89ad1cd42f7366ca190c3790f911f11ab332b86b675f5f69ba
2021-04-26 22:30:49 +00:00
drh
c7f5077e88
Fix the [/info/df1d6482f9e92daf|UNION ALL flattener optimization] so that it
...
works better with recursive CTEs.
dbsqlfuzz 88ed5c66789fced139d148aed823cba7c0926dd7
FossilOrigin-Name: f80d7bb2c305c1dd4658767660b33259032c048a91f18c654a6bda7332c54a0c
2021-04-26 21:23:01 +00:00
larrybr
ada2323d95
refix altertab.test
...
FossilOrigin-Name: db032156932fb0dcae5ffb7cbdfb711079daa595713fcb254f09f8ef90c81d95
2021-04-26 20:18:08 +00:00
drh
8ed8ddf759
When doing the optimization that attempts to avoid sorting on a
...
GROUP BY, do not assume that the values in an index on an expression are
non-NULL. Bug discovered by Wang Ke's fuzzer and reported at
[forum:/forumpost/74330094d8|forum post 74330094d8].
FossilOrigin-Name: 7178dc3a32c3a4a33e437fd5026f6f72e4809ceb7d2cd12a25a74b80d5c95d33
2021-04-26 14:32:48 +00:00
dan
bb0eec438d
Do not initialize eponymous virtual tables when parsing the schema. This can happen if the db is corrupt.
...
FossilOrigin-Name: cb8c41aa20bb351c4c712ed7a3617187ceeb0905ede1e6f561bc1d89f31c95ea
2021-04-26 14:09:48 +00:00
larrybr
3ff6a5edd9
Skip test when no JSON.
...
FossilOrigin-Name: 6fcb2438f88a70ed67e19103bfa263a6c98b06962207f153559c9516d8c7b5d5
2021-04-25 23:13:04 +00:00
drh
113a33c539
Make window range queries more robust against corrupt database files.
...
dbsqlfuzz f22df3a7b2aab0937a415484514fc2f68a293c99.
FossilOrigin-Name: 506333742103c1f440db5da819a36f3b518f7b49e94a7b74419b02bbcadc5a78
2021-04-24 23:40:05 +00:00
drh
971ae9f66a
Fix testcase altertab-25.1 due to check-in [c7909e8e0d0577c6] disallowing
...
ALTER TABLE on eponymous virtual tables.
FossilOrigin-Name: 32255e39cbde65492d88177464cee9e10cb20cf3105208416be131e2c89b63e1
2021-04-24 12:20:10 +00:00
drh
1521270010
Fix harmless compiler warnings in fuzzcheck.
...
FossilOrigin-Name: e7b4ffecc610c494ebd506977402ec48cc799780f96c6293c0ccf27697160aa1
2021-04-23 13:57:53 +00:00
drh
ba6619d7be
Enhance the --load-dbsql and related options of fuzzcheck so that if the
...
argument is a single - then filenames are read from standard input.
FossilOrigin-Name: e1548802b6de7037baf388d27a7f3658abafe07b6f48d5ec97e5f644303592d8
2021-04-23 12:58:16 +00:00
drh
292ed6decf
Give a better final output line for the --spinner option on fuzzcheck.
...
FossilOrigin-Name: 93729614e21ee674b83b0d2babb71bb758f1a2ec55bf9bda057fb7739f2e14e0
2021-04-23 12:16:16 +00:00
drh
d84f10ed13
New dbsqlfuzz cases added to test/fuzzdata8.db.
...
FossilOrigin-Name: 8da88508932e475c8c6af1553268ff02e3e013b78ccc94b14532ec928fc62537
2021-04-23 11:50:23 +00:00
dan
f3d5a68461
Fix an assert() in fts5_index.c that may fail if the database records are corrupt.
...
FossilOrigin-Name: dfadb96edfef1d49e48a659264b9eb8d7f98d95d159d95c92c30dd4ba6c6e739
2021-04-23 11:37:01 +00:00
drh
3d8c92d041
Raise an error on an attempt to rename an eponymous virtual table.
...
FossilOrigin-Name: c7909e8e0d0577c6109f13c0b14fb565239aae8af8963d659f363e124f3437fc
2021-04-22 18:02:48 +00:00
drh
68b63c0195
Fix the date/time translation logic in the zipfile extension so that it
...
works with boundary cases. See
[forum:/forumpost/d82289d69f|forum post d82289d69f] for the trouble report.
FossilOrigin-Name: c8de5f061359c174e143e5e81ade8aa9b7d71ba57287459cf0f4f2c94459c345
2021-04-22 14:43:16 +00:00
drh
7437c25b63
Add recent dbsqlfuzz test cases to test/fuzzdata8.db.
...
FossilOrigin-Name: 6fe50dcc239d2d1fc2a38aa705f4c75cbe26b3e48d098537306d96d6a4005659
2021-04-21 12:03:36 +00:00
dan
fe599b05f2
Fix a problem allowing SQL variables to be used expressions within the second and subsequent ON CONFLICT clauses of an UPSERT within a trigger.
...
FossilOrigin-Name: 2a28910a17dc5b3ce43062fdf879f9622f6ec2db19ed780fa7fe5cae781be7b7
2021-04-21 11:32:22 +00:00
dan
5b482a9832
Update an assert() in btree.c that may fail with a corrupt database.
...
FossilOrigin-Name: d74bf88c5a027cf080a2892a3538fe5104952b5b3759a6eba1b1a98a75ddf5f4
2021-04-20 13:31:51 +00:00
dan
0a746cc528
Ensure that all records are updated by setting the OPFLAG_SAVEPOSITION flag when updating records as part of ALTER TABLE DROP COLUMN.
...
FossilOrigin-Name: 354a4db5cb769c6aed386f43ee26d7e42342e92f781eef100c09751dc5b51751
2021-04-18 05:30:39 +00:00
dan
3c6fbd6dd9
Remove a couple of NEVER() macros from the code for walking window lists.
...
FossilOrigin-Name: 4ec9ef4bcd12bd9ba5e1a2424f75479070d12c25f1272548c6cf3f89be826b8c
2021-04-17 20:13:53 +00:00
larrybr
68d261d073
Bring in permutations mod.
...
FossilOrigin-Name: 7a1316f32c857b5ec9e50c5d341f977f998dbf404f4758e3fe317fd8ef25f41e
2021-04-17 20:04:40 +00:00
dan
55f36787ea
Do not run external_reader.test as part of permutation "journaltest", as it requires wal mode.
...
FossilOrigin-Name: 9f5f16cf093cd8b8c7649f664eaf2ad8128fd50e182720dbddf05a6d9227c037
2021-04-17 19:59:14 +00:00
larrybr
f5576936f1
Allow more time for perf tests when instrumented. Condition another on feature it needs.
...
FossilOrigin-Name: f0dd9cf2d7045d3634294bcf2722d3d7b0a6c4c3ef713b0f7f54fbe31432027f
2021-04-17 18:43:29 +00:00
drh
48a6aede46
Add new dbsqlfuzz cases to test/fuzzdata8.db.
...
FossilOrigin-Name: d18793e589a4ee7706e994a1f3d24ba7df190467d92fa6ac040258f4debc149d
2021-04-17 18:39:39 +00:00
dan
44918c74cd
Fix cases where code in expr.c was failing to handle OOM failures that occurred while processing sub-select expressions.
...
FossilOrigin-Name: 62efe2eee34fdb147cc456290576d8fc3801487867c78aadd4485f85468d9ffc
2021-04-17 14:42:37 +00:00
drh
7b0d34fe32
Ensure that variables are not used in the WINDOW clause of a query inside
...
of a trigger. dbsqlfuzz d9cf66100064952b66951845dfab41de1c124611
FossilOrigin-Name: 1a341378ab24a5091e6cf03b9e957d11b2bfe5c711835e8c583785f8fa0125d3
2021-04-17 13:46:23 +00:00
larrybr
453954b0de
Make a test conditioned on feature used.
...
FossilOrigin-Name: 31afda7ac3081d05fc9b6d080abeba1296327d0c480bbb4bc5f65c3168cd34ac
2021-04-16 21:29:07 +00:00
drh
188ba3a979
Add new dbsqlfuzz-generated cases to test/fuzzdata8.db.
...
FossilOrigin-Name: 1ac0a056a07895cc4ae62d01cbba5525402be3af3b8f97fd1dfaba2236ef912b
2021-04-16 19:25:47 +00:00
dan
11a6e9d9f0
Fix an assert() in fts3 that might fail when handing corrupt records.
...
FossilOrigin-Name: d0e2d6742f314f71562e404980aad20de6b17e0b04c08582c18bbc4fd0360751
2021-04-16 11:25:37 +00:00
dan
9988db8302
Fix a bad interaction between constant propagation and transitive term handling causing patterns like "WHERE unlikely(t1.x=t1.y) AND t1.y=?" to return non-matching rows.
...
FossilOrigin-Name: 2363a14ca723c0343fbe350f6c19787a7a47c2289fd9af136c97a451b53b5226
2021-04-15 19:09:19 +00:00
dan
37d4ec86bf
Add extra test case for OOM handling in where.c.
...
FossilOrigin-Name: 7163de3dea0445bf25dba47a54c50f35bb5c7edc7bdae9630b51c1ca970ec6cf
2021-04-15 13:26:29 +00:00
dan
8505d73dc0
Fix a potential crash when using json_group_array() as a window function.
...
FossilOrigin-Name: 3c266690c753d093c2cb74138a46ed69276d85cd119d687a6858c84211e84eaf
2021-04-14 12:11:39 +00:00
dan
d487e37367
Fix a segfault that could occur if the ORDER BY clause of a compound SELECT contains a sub-select that uses one or more window functions.
...
FossilOrigin-Name: 5ba15ebb34c3af85ef6c54bbb3acb57176d629cda83774881b2a6467e138e904
2021-04-12 16:59:28 +00:00
dan
cd0b245934
Avoid an assert() failure when a compound scalar sub-select is, due to a "WHERE (sub-select) AND (... OR ...)" clause, coded twice by the code generator.
...
FossilOrigin-Name: a4e3f13329332f91a250bc18459fd4100990a1ac0516f8a0a6b21ff117db9795
2021-04-12 12:02:49 +00:00
dan
677e62aacd
Fix a problem with handling expressions like "(col IS NULL AND <expr1>) OR col == NULL" in WHERE clauses.
...
FossilOrigin-Name: 40852ca8e215e51f63652a67817361b835b6fbbff7f66af50089af91007505f1
2021-04-10 14:49:45 +00:00
dan
bfd6f1bcd5
Fix a use-after-free error that could occur when processing "SELECT aggregate(DISTINCT <expr>)..." queries.
...
FossilOrigin-Name: 0e4789860b81c31d3a6d1f9f8340042ce1d08a82bf6119c783fcab85180b1b63
2021-04-08 20:29:12 +00:00
drh
4ad9673d00
Do not allow the use of rowid for views and subqueries unless compiled
...
with -DSQLITE_ALLOW_ROWID_IN_VIEW.
FossilOrigin-Name: a2ddb89b206c13876d34c5f9e3db41cda72d6eb3fea31ffa8cc6daa1e1580e16
2021-04-07 18:17:53 +00:00
drh
6e5020e8da
Also prohibit the use of rowid from a subquery. Add the
...
SQLITE_ALLOW_ROWID_IN_VIEW compile-time option to restore legacy behavior
in case somebody actually needs it.
FossilOrigin-Name: 14b1d56ef84b0e62b7f9c4e5f7f985ca10e770c8db59f54004ad892c2a2dcbfb
2021-04-07 15:45:01 +00:00
dan
755ed41f5a
Fix a possible crash that could occur when executing a drop column operation on a corrupt database schema.
...
FossilOrigin-Name: c337849416c588142a5066db3feb1716b7a9d02536bdb73cc9da7d162c0d5494
2021-04-07 12:02:30 +00:00
drh
204b634222
Do not apply the optimization that omits DISTINCT if all result terms are
...
part of a UNIQUE index if the index is also a partial index.
Fix for the bug reported by
[forum:/forumpost/66954e9ece|forum post 66954e9ece].
FossilOrigin-Name: c2f940b02883e165172a4ca21c7095ffbef84ddc5367853dfeca93fda20d6056
2021-04-06 23:29:41 +00:00
dan
cc26301ec3
Modify the drop column code to handle WITHOUT ROWID tables for which a single column appears more than once in the primary key.
...
FossilOrigin-Name: e0d2507021c5a04016c442f954b542c0920678737ae7c710eb8ac50d6337db1c
2021-04-06 21:20:39 +00:00
drh
a6c54def42
Raise an error if a query tries to access the "rowid" of a view, as views
...
do not have rowids.
FossilOrigin-Name: 7a73c6166bb1d9f2e2de280fa4e973db152caaf6cc76b8e6a92cfe9560ddc224
2021-04-06 19:13:44 +00:00
dan
112501fec2
Update an assert statement that could fail when using "PRAGMA writable_schema = 1" to access a database with a corrupt schema.
...
FossilOrigin-Name: 55cad6f628a4313c6652b36474c3397f097ac5c2503ae94605c030a54dc40916
2021-04-06 18:02:17 +00:00
drh
4ffaffe657
New test cases added to fuzzdata8.db.
...
FossilOrigin-Name: 039ad662dd899048da04238c05b8cf384323f6e8c1087b96428ea9e20726c8c0
2021-04-06 16:55:30 +00:00
dan
d4b646997a
Avoid a use-after-free that may occur when accessing a corrupt database schema with "PRAGMA writable_schema = 1" set.
...
FossilOrigin-Name: a1d823f6879ce1acfd251de35ffdfdf5ce7d8e0552205c2c4a1fee179e3a6972
2021-04-06 16:16:15 +00:00
dan
1408bf176e
Fix incorrect RETURNING test cases in wherelimit.test
...
FossilOrigin-Name: 20d21ff9be558c5f7773efa4efba7d36752f56c9a0caf1fd9c601aab5562dcef
2021-04-06 13:57:23 +00:00
dan
2a1aeaa36e
Handle "RETURNING rowid" clauses attached to INSERTs on views without causing an assert() to fail. Fixes dbsqlfuzz crash 0081f863d7b2002045ac2361879fc80dfebb98f1.
...
FossilOrigin-Name: 9c5b7386d013a7f22a93c69722c4648e2ab60eef180f48b5470bfea6fa74b3da
2021-04-06 13:53:10 +00:00
drh
9ce612a66f
Add a missing CORRUPT_DB to an assert in the OP_ResultRow opcode.
...
FossilOrigin-Name: 82f92d79e1901911b0ce57d0aa30d462847748159443c7db8af16e6b37e8212c
2021-04-05 22:30:56 +00:00
dan
6b6ec407ab
Do not allow floating point rounding errors to cause a window function xInverse() function to be invoked before the corresponding xStep() call.
...
FossilOrigin-Name: 7a19fed4f222bc6c20e13a1367c8235916d21ba5e6f5a31cd26842efe748e744
2021-04-05 19:05:18 +00:00
drh
e3814ee026
Fix an assert() that can be false when doing an incremental vacuum on a
...
corrupt database file. dbsqlfuzz cced0668cfd4da4eb2382cb9dd26c17c64aaff76.
FossilOrigin-Name: 15b801016fa204b8e4b7c89e236adb73dd57687959d825664de5097370b24030
2021-04-05 17:50:38 +00:00
dan
240e36c0e3
Avoid coding unindexed WHERE constraints if an equivalent transitive term has already been coded by an outer loop.
...
FossilOrigin-Name: 644bb77f8bb2c3499db7c280440c92fd2649a98ce714ae0d5d690eabfdc04326
2021-04-05 16:20:59 +00:00
drh
d5e7fff2ca
Do not invoke the xDelete method when converting to PRAGMA journal_mode=OFF
...
if the underlying VFS does not support that method.
dbsqlfuzz 39d6af88ef5242f866c4f9b21ede330c5c1e36a8.
FossilOrigin-Name: d91450847a3a3a7217f8f5947adea9a4d12cf77607d40f9724d6ba093919b524
2021-04-05 13:41:42 +00:00
drh
319deefdb9
Fix an assert() in sqlite3BtreeLast() that needs an "|| CORRUPT_DB" term.
...
Dbsqlfuzz case b92b72e4de80b5140c30ab71372ca719b8feb618.
FossilOrigin-Name: ad718388a1f6e25ceba43a40160fac0d9d9d3f26888e98d7b9db478c0b1780be
2021-04-04 23:56:15 +00:00
drh
57f90189a5
Improved robustness to OOM conditions in the window function logic.
...
dbsqlfuzz 0c123f7d80b29beaafc8411c12129e46f7ffdac3.
FossilOrigin-Name: 35ff7cbf547d41109b7cd4217a5439b3b4a1a4c310309c572c88f596fbc1b099
2021-04-03 23:30:33 +00:00
dan
f330d53ff3
Fix a crash in handling queries of the form "SELECT aggregate(DISTINCT tbl.col) FROM ... LEFT JOIN tbl ...". Fixes a problem introduced by [ef4ac0ddd297bbd3].
...
FossilOrigin-Name: 0dcf808ddf23da834da724d88b1715ed06565f1f1290713ff42a3fcf6ffb802e
2021-04-03 19:23:59 +00:00
drh
9af69ff547
Correctly capture the error when a RETURNING clause appears on an
...
attempt to UPDATE an eponymous virtual table.
dbsqlfuzz 486f791cbe2dc45839310073e71367a1d8ad22dd.
FossilOrigin-Name: 778a9a6e6f8d960fd55ac9be7eea20b1875a46192db85e63dddc61b632b30173
2021-04-02 20:43:26 +00:00
dan
aecc04d642
Add experimental SQLITE_FCNTL_EXTERNAL_READER file control.
...
FossilOrigin-Name: e16da5af822ef31d7e05992403cf9787fbb3d9abb0b5283aba55ea07e1830a72
2021-04-02 19:55:48 +00:00
drh
22af584e3e
When resolving names in the RETURNING clause, do not accept trigger names
...
even within subquires. See
[forum:/info/34c81d83c9177f46|forum post 34c81d83c9177f46] for context.
FossilOrigin-Name: fd4ea3f626b6e4957d56c2369be711895735cfc37cfde65650a6682ad5a3eb1a
2021-03-31 23:56:55 +00:00
drh
d75aeee535
When resolving column names in the RETURNING clause, do not ignore an
...
incorrect table name qualifier. Raise an error instead.
See [forum:forumpost/85aef8bc01|forum post 85aef8bc01] for context.
FossilOrigin-Name: 51d5c50b2fb373e4c7ddb7e26657c26ad39dc9c2fc629bba5c2522b4150d8fac
2021-03-31 17:42:24 +00:00
drh
b3ad4e6118
Defer deletion of expressions that are optimized out by the AND optimizer
...
in the sqlite3ExprAnd() routine until the corresponding Parse object is
deleted. This avoids a dangling pointer in AggInfo if sqlite3ExprAnd()
is invoked by the push-down optimization. The dangling pointer appears
to be harmless in release builds, only showing up in debug builds.
Problem found by dbsqlfuzz.
FossilOrigin-Name: c36b43589abd9f62a709bdb47b8748e0c1e8743487a3d83d1eb35eb06b65d763
2021-03-31 13:31:33 +00:00
dan
b03786ad6e
Ensure that negative numbers may not be used in frame offset clauses even if they are initially text value. e.g. (RANGE BETWEEN '-1' PRECEDING ...).
...
FossilOrigin-Name: 8b681b274dd01c3e0f76d5bbddcbb2450c6d9475b9cfa0db961a3ab5edf51db1
2021-03-31 11:31:19 +00:00
drh
0d23f678b1
Raise an error if a term of the form "TABLE.*" appears in the RETURNING clause,
...
as SQLite does not (yet) know how to handle that.
Ticket [132994c8b1063bfb].
FossilOrigin-Name: 3039bcaff95bb5d096c80b5eefdaeda6abd1d1337e829f32fd28a968f663f481
2021-03-30 01:52:21 +00:00
dan
28a314e74d
Do not do the EXISTS-to-IN transformation if the sub-select has LIMIT clause.
...
FossilOrigin-Name: d07e246f9b6d4d7aef63a6debcb7ab2832bff6f80a245f50bcebb3f8de1bacc7
2021-03-29 20:28:27 +00:00
drh
9be1339faf
Comment improvements to on the distinct-agg optimization. Show a line in
...
the EQP output when using an ephemeral table to implement DISTINCT on an
aggregate.
FossilOrigin-Name: 037ca79e6032ca962b4f6182187bc12a7d91170d73630c8cd6fb191d2c183ee4
2021-03-24 19:44:01 +00:00
drh
6db1c9da67
Improvements to distinct aggregates such that they can sometimes avoid
...
using an ephermeral table to test for duplicates if the column that is
distinct is part of an index.
FossilOrigin-Name: ef4ac0ddd297bbd38351410c5a387e1628561b3f1bec9e4c2c9d76fbe29f955a
2021-03-24 17:28:11 +00:00
dan
1d14ffe63d
Fix a problem with renaming a column when there is a quoted string immediately following the column name somewhere in the schema.
...
FossilOrigin-Name: 4719fae6262aa3563f3df6aca0170c6d847bb18ab7b0e6e7609a0e7b6f0c6b1b
2021-03-23 22:15:34 +00:00
drh
0227d9304d
Test result adjustments in test/misc7.test due to the EQP format change.
...
FossilOrigin-Name: d3ade8c7fe58e05af9d44a79478776b050a680c1338188f2d4b222b937e682ea
2021-03-23 19:39:27 +00:00
drh
ed42b98056
When doing schema updates, try to convert (incorrect) double-quoted strings
...
into (SQL-standard) single-quoted strings.
FossilOrigin-Name: 0770470488e140fa21cb5097c26d58e21da85544af8b69faced1670bbc6d6089
2021-03-23 16:34:13 +00:00
drh
46bee2aa12
Tweaks to test/scanstatus.test to account for the new EQP format.
...
FossilOrigin-Name: 2eb28afd01f43143a9c0cd6cea68f3095f993952d54ee06b781514a7754490cd
2021-03-23 15:39:02 +00:00
drh
06c7cc7694
Changes to test/analyzeG.test to conform to the new EXPLAIN QUERY PLAN syntax.
...
FossilOrigin-Name: d8afde1bf1d41a349a161a293533a9fdf23ff23b8f1bcc323e79e806c5c526f1
2021-03-23 15:07:17 +00:00
drh
695c83ac0e
Fix a test case in bigmmap.test so that it works with the new
...
EXPLAIN QUERY PLAN output format.
FossilOrigin-Name: 9ac064fe2aee4aa1423e7c8043dfec52ecf2af3e8361ebb7d9c104cca82b4d23
2021-03-23 14:33:35 +00:00
drh
2f2091b10e
Use the canonical name, not the AS name, when showing the MATERIALIZE or
...
CO-ROUTINE lines for a CTE.
FossilOrigin-Name: 1b83e232c490fe6e9f999d30399faebfac6094bf940dc21dc459ed2c97657cb2
2021-03-20 15:46:01 +00:00
drh
8210233c7b
Revise tests cases to align with the new EXPLAIN QUERY PLAN output.
...
FossilOrigin-Name: 50fbd532602d2c316813046ed6be8be2991c281eb5f295c4c28520a0de73862c
2021-03-20 15:11:29 +00:00
drh
340fd0bc23
Dbsqlfuzz found a new way to make that branch in codeVectorCompare
...
reachable.
FossilOrigin-Name: 959272c27555e39f180d46257afe45d41da1f5df38ea269196c06741ff6a278e
2021-03-19 16:29:40 +00:00
dan
93eb906488
Fix a crash that could occur when an INSERT has more than one ON CONFLICT clause, at least one of which contains an unresolvable symbol.
...
FossilOrigin-Name: 74208386508012326a0e88ec5b4a995d1b99607720bb05785a01c2d89ea03543
2021-03-19 14:26:24 +00:00
drh
d685dd6be6
Correlated CTEs should not generate a materialization subroutine. If they
...
need to be materialized, each use case must be materialized separately.
dbsqlfuzz 01b8355086998f0a452cb31208e80b9d29ca739a.
FossilOrigin-Name: d72d865d3e8503a545603038eb26044bee42e4e8725522be678059ce6517fc8d
2021-03-19 13:53:34 +00:00
drh
f09a1794d8
Disable a test case requiring generate_series when virtual tables are not
...
available.
FossilOrigin-Name: ee86e2f4c5999a090a5d2fe8251107cf55e621a6b988f315eb82f462cc1e377d
2021-03-18 18:27:37 +00:00
dan
ca237a8b7b
Fix a problem causing spurious "<cte>: circular reference" errors to be reported when there is actually a different error in the SQL statement.
...
FossilOrigin-Name: 9981223618782bf867dfc8988d0c634a42f569228880c5c5e00aa4ae762cfff2
2021-03-18 18:25:43 +00:00
drh
8d81aac13f
Fix the OP_OpenDup opcode so that it is able to duplicate a cursor that
...
was itself opened by OP_OpenDup. Add additional verification of
ephemeral tables. Fix for ticket [bb8a9fd4a9b7fce5].
FossilOrigin-Name: bcbe5308f3a3b94f965b0f5627cb29cce2e09343b86d757e2de889f7773576e7
2021-03-18 16:47:24 +00:00
drh
76f7b16f1e
Remove unnecessary code from sqlite3BtreeClose() and add test cases.
...
FossilOrigin-Name: edbfdcaefae1e9a42c046c058341bf5b0f533c0b0cbd39543fcaa2a83d67561d
2021-03-18 16:36:31 +00:00
drh
8df014979e
Fix the dbsqlfuzz-derived authorizer in fuzzcheck to avoid creating junk
...
files when running rogue tests.
FossilOrigin-Name: eca21a620630b0c8d21a91ad6a8760a6c87270ab2a45cafa18bd31b305c53dba
2021-03-18 14:36:19 +00:00
drh
a7d8d4a07a
Date/time functions with no arguments (ex: date() or time()) should be
...
non-deterministic. Fix for ticket [2c6c8689fb5f3d2f].
FossilOrigin-Name: 1734c332e7f609769fc30f82cf7af097c2964e08900ee3e297f6a25e6df60555
2021-03-16 18:41:20 +00:00
dan
1fffa73ea2
Add tests for sqlite_rename_quotefix(). Fix a memory leak in the same.
...
FossilOrigin-Name: 531550056c38589c99c9a97b6afdbf8f34ff8d2131d74e9d42af3506e8045064
2021-03-16 18:24:49 +00:00
dan
2ad080aa82
Have ALTER TABLE RENAME COLUMN and DROP COLUMN use sqlite_rename_quotefix() to convert any double-quoted strings in the database schema to their single-quoted equivalents.
...
FossilOrigin-Name: 6446c0961077396086251670102ea7bf17d54a6b0f0ca56c6af89028a1ff9039
2021-03-16 16:14:48 +00:00
drh
0f503f6696
Fix recent breakage of the appendvfs extension.
...
FossilOrigin-Name: 7dbbe5b34eea31ea54a5804035d4d0dfeb09c42cd9ab337e1e64c1296decbef3
2021-03-16 14:26:56 +00:00
dan
00bc66f2cc
Merge trunk changes into this branch.
...
FossilOrigin-Name: f15d51054afb1e3fec87938f2b04a5a0d0611b08248367850450de7c4166e3d1
2021-03-16 11:21:36 +00:00
dan
776a578c21
Fix a problem with ALTER TABLE RENAME COLUMN when used on a schema that features generated columns.
...
FossilOrigin-Name: 0e255b26872b50581d470952dd98e21dd82d081885006f58d49daa4b4576b35d
2021-03-16 11:11:07 +00:00
larrybr
b0f23784f6
Merge from trunk.
...
FossilOrigin-Name: eae8236f3b9bc326648d1c8fca61cb3c38f821d06fe915fd0978cffeb1f6152b
2021-03-16 06:50:39 +00:00
larrybr
5cad178b86
Fix appendvfs bug exposed with bigger files, and add tests for such conditions.
...
FossilOrigin-Name: 19b1f53a1c0a14440ae8ac71660a2595d37a4a5b201055c19366c7dca75d6660
2021-03-16 06:41:51 +00:00
dan
1e24072d05
Add internal SQL function sqlite_rename_quotefix(). For converting double-quoted strings to their single-quoted counterparts in DDL statements.
...
FossilOrigin-Name: d874b300463ce0bbb53b7e2f88c6a12893e4fd751fcc7f810077ba108f4061ef
2021-03-15 20:22:34 +00:00
drh
0e8075ab78
An additional test case
...
FossilOrigin-Name: 7e2d7ca15a84e5bd9f2b1360232607d15c2dbcc9d30b0f1a7cdbf2865e6b1af5
2021-03-14 20:17:06 +00:00
drh
44d441313a
An alternative approach for fixing ticket [1c24a659e6d7f3a1].
...
FossilOrigin-Name: a2adae907a28e169e64cfe69d97d7b68cb94e6ba07d2dfa995e3fbc6672fafdd
2021-03-14 19:55:40 +00:00
dan
9bfafa8917
Fix typos in comments and add test cases.
...
FossilOrigin-Name: 01312a3dbd92823af535dc618c68d95a2aa1cbee2501b0a9826eae3f09bec760
2021-03-13 17:21:24 +00:00
dan
051170c453
Merge latest trunk changes into this branch.
...
FossilOrigin-Name: 198bc510d64b5794559584ad5c9de41dc966dce4eb78be15b12adba43dfcb639
2021-03-12 18:33:55 +00:00
dan
5383db714e
Attempt to use an index for DISTINCT aggregate queries that have GROUP BY clauses.
...
FossilOrigin-Name: 3bca003cd2b2cb38d4a4e2e5f673ee0ac05bfe31247ec09e7bd379b77a31b44c
2021-03-12 18:24:31 +00:00
drh
0ca23aa437
Fix broken requirement marks.
...
FossilOrigin-Name: 98d67152849e062c6de45b0e526daffc3d6cb29d563d40664a8d7140119a30b2
2021-03-12 13:49:09 +00:00
dan
632f0ed265
Have the Tcl tests support environment variable SQLITE_TEST_PATTERN_LIST, so that if it is set it is interpreted as a list of patterns that are matched against tests file names. Only test files that match at least one pattern are run.
...
FossilOrigin-Name: b7c92e1d08f213865f026d8dbdc4e805fb5c119b7f206506ed06e83a878de657
2021-03-11 08:49:52 +00:00
drh
4d17e30624
Improvement to the ATTACH-abuse authorizer logic in fuzzcheck.
...
FossilOrigin-Name: 88132f698a7a9b7d41dd1dd393592cbda130d2bf1a9fd18c509503e1891b9655
2021-03-10 17:52:59 +00:00
dan
ba34b79f15
Do not run avfs.test when testing SQLITE_OMIT_VIRTUALTABLE builds.
...
FossilOrigin-Name: 2ab6957a2238a2ab713a50d21dbd9921c944e8141197275bbfe7dae303fee7d0
2021-03-10 17:43:18 +00:00
drh
099b385d17
Do not confuse the constant SQLITE_MAX_ATTACHED with the maximum number of
...
schemas. Add the new SQLITE_MAX_DB constant for the maximum number of
schemas. [forum:/forumpost/a006d86f72|Forum post a006d86f72].
FossilOrigin-Name: 7b65fb9f7bd616f834633afd64b3448bf9ca2b6e4cc6d6c01e75d1d877c88a79
2021-03-10 16:35:37 +00:00
dan
bc3c4e0830
Fix test file avfs.test so that it works with SQLITE_DEFAULT_AUTOVACUUM builds. Do not run avfs.test under test permutation "journaltest".
...
FossilOrigin-Name: 2c6078ebe797dd2cb6045b5f13e6d92a6b49393ecf96f9fd7222412f5a3eefd5
2021-03-10 15:10:20 +00:00
dan
a1c467f51f
Fix a problem preventing wapptest from setting SQLITE_ENABLE_LOCKING_STYLE for OSX tests. Also modify the "Sanitize" configuration in releasetest_data.tcl to subsume test item 6g.
...
FossilOrigin-Name: f762d7df2a41a88560a4251d744e0887f42812f8160af4f0129d22a71c0fa48b
2021-03-10 10:43:17 +00:00
larrybr
c5edbd1cf6
When shell has no .ar, fake its effect w.r.t. page_size and table creation/filling.
...
FossilOrigin-Name: 959f5c65ea14f4716df61e250e9d5a0d69d602a2a973ad22a364e640162c2983
2021-03-10 06:06:16 +00:00
drh
657a7a66c3
Update the authorizer in fuzzcheck to align with dbsqlfuzz.
...
FossilOrigin-Name: f86d8fae3b29de014d8bfcae38a15bdb15ddceabfcfff7829f3145cfd69dff2a
2021-03-09 13:12:58 +00:00
larrybr
ddf4972063
Add tests for too-tiny appended DBs, clarify align macro.
...
FossilOrigin-Name: eb40a8dea6afe6890ddda989de83f3d4ae03b112bf78bfc818dfbd57cc5b5b2a
2021-03-08 20:13:43 +00:00
dan
52a0753152
Add test cases for ALTER TABLE.
...
FossilOrigin-Name: 9c9ba36e859e330c50ed40ede4b93eeb0a5c3337240465d953a7be9115a81390
2021-03-08 17:22:01 +00:00
drh
e58b2b4a80
Fix a bad assert in RENAME COLUMN.
...
dbsqlfuzz 3f0a7245b69cd08617d7d7781ebaedb0fe765a93.
FossilOrigin-Name: f13e0d12f137cd6b4e83e92bd36652431d8416e6eed4797313e061f2e390d39b
2021-03-08 17:17:38 +00:00
drh
7ae0549961
Enable internal functions for fuzzcheck.
...
FossilOrigin-Name: 79281603b951b438303130820deb6b05baeca366c2cd93be7d8909d3232bcc96
2021-03-08 16:13:52 +00:00
larrybr
b47e4c2819
Added test/avfs.test (missing from branch merge for some reason.)
...
FossilOrigin-Name: 08fa67053c20d223c9b5334fe2e85adc95588b91046c100d7fe8e8e2535e485f
2021-03-08 14:32:26 +00:00
dan
7f8653a257
Ensure the correct collation sequence is used for comparisons when delimiting a RANGE window.
...
FossilOrigin-Name: 01eae68e85b31b7a9f08733459765bbd9bf9dad592bf64f10fc2fa32e02a89c2
2021-03-06 14:46:24 +00:00
dan
fa9011ec70
Fix a crash in fts3 that could occur when running a NEAR query on a corrupt database.
...
FossilOrigin-Name: 609d94996324f3d3c12bb8cc04a2527d1d86c35cdb2267b5b34053c961158986
2021-03-06 13:28:07 +00:00
drh
747cc9425d
Fix a possible NULL pointer dereference when applying a DROP COLUMN to a
...
corrupt database schema. dbsqlfuzz 419aa525df93db6e463772c686ac6da27b46da9e
FossilOrigin-Name: 349ccf58ae4bb770805066102fc8e9e478d4da1f7a6a728223bd74eabf7b7843
2021-03-06 13:02:12 +00:00
drh
70149ba47e
Modify the SQLITE_DBCONFIG_ENABLE_VIEW option so that it always permits
...
TEMP views, just as SQLITE_DBCONFIG_ENABLE_TRIGGER always permits TEMP
triggers.
FossilOrigin-Name: 83dab8b358b6832a221a58e74dd5e99b9cdea4eee65124bb6799881e867d989c
2021-03-05 18:33:01 +00:00
dan
0d08072b68
Fix another problem with RETURNING clauses in UPDATEs against tables with virtual columns.
...
FossilOrigin-Name: f0ef5c76ab1a6568b9148b928277bf589d4cb7033c0acf3e6323879b656d8bd1
2021-03-05 15:29:22 +00:00
drh
bc7819d176
Fix the processing of implied LIMIT clauses when flattening a compound
...
query.
FossilOrigin-Name: 90c6b9fcb0e15e2552fe5be53f8201f145bb535cc37b603d488eadf33438412b
2021-03-05 14:08:45 +00:00
dan
e8dd6a4e77
Fix a segfault that could occur following an OOM condition.
...
FossilOrigin-Name: 9adf6e2469d18bc3bfc0c804cfcaa692e23ab6b3e13465dcfc51c4b111b05cb4
2021-03-04 16:10:23 +00:00
drh
fad1ad0526
Fix a harmless assertion fault resulting from [6e6b3729e0549de0] that was
...
discovered by dbsqlfuzz. Enhance .selecttrace output to show omitted
ORDER BY clauses. New dbsqlfuzz test cases added.
FossilOrigin-Name: 27a0388ad616f80e8dcc986c247a5c23a8565dae9081b04ff85bac0d357e531b
2021-03-03 14:07:52 +00:00
dan
3083d5f5ea
Fix a problem with using ALTER TABLE commands on database schemas that contain expressions of the form "<expr> NOT NULL" or "<expr> IS NULL" that can be evaluated at prepare time.
...
FossilOrigin-Name: d2630ffafa077b8cfd75110b6b73da30f780edc920d2788769a4dc747f09d3f6
2021-03-03 11:00:31 +00:00
dan
eefef9ae80
Do not run test file windowpushd.test as part of the "no_optimization" permutation.
...
FossilOrigin-Name: 275a75aa82bf5d2366fd4020066d7b9fbb93a955ac9ec15dc7d5b8bfa29074e4
2021-03-02 13:36:37 +00:00
dan
a3944bc4fe
Add OOM test case associated with the fix in the previous commit.
...
FossilOrigin-Name: a631c38d22bc00d38b0f112a623fb24c0e03a962f661ffe0931dad32fd31ba31
2021-02-27 15:32:02 +00:00
dan
15de3ce9ab
Fix a segfault that could occur when optimizing a NOT NULL constraint against an IPK column of a sub-query.
...
FossilOrigin-Name: e4d1970ef17b2330f78c750d71d625c2997f79ed1445d0351ec32b482485a954
2021-02-26 21:39:34 +00:00
dan
8ddf686267
Attempt to optimize "x IS NULL" and "x IS NOT NULL" expressions when x is a column with a NOT NULL constraint.
...
FossilOrigin-Name: 5ecd842555009ce27ee6390325ac5c2504143474b12b730933f0833b3dad788a
2021-02-26 20:14:32 +00:00
dan
b3617e9d2d
Fix test case in altercorrupt.test so that it works with SQLITE_ENABLE_OVERSIZE_CELL_CHECK builds.
...
FossilOrigin-Name: 062b338ff2ea71633b4fb3c75c6a47b5fc4fe9c2a72daacd987d1eca0bda5217
2021-02-25 18:28:11 +00:00
dan
ce5de60ff9
Ensure that tests like "rbu.test" and "notify2.test" that are only run by specific configurations during release testing are run for both release and debug versions of the tests.
...
FossilOrigin-Name: 911df43f98297bf645688dc51e988106a0297cb60bb97dde699c2848404fcf72
2021-02-25 15:50:19 +00:00
dan
601ec240a9
Allow WHERE terms to be pushed down into sub-queries that contain window functions, provided that the WHERE term is made up of entirely of constants and copies of expressions found in the PARTITION BY clauses of all window functions in the sub-query.
...
FossilOrigin-Name: 20689468100aed264877111367b42837ca19e63e717fed2ebd4b20b908f13178
2021-02-23 15:53:22 +00:00
dan
34a224a13b
Further tests for the push-down optimization with window functions.
...
FossilOrigin-Name: 4b089f70117bfb440eaefd830c05576be0cc624d9d6018c869270dc68e44513e
2021-02-23 15:36:06 +00:00
dan
903fdd4834
Allow WHERE terms to be pushed down into sub-queries that contain window functions, provided that the WHERE term is made up of entirely of constants and copies of expressions found in the PARTITION BY clauses of all window functions in the sub-query.
...
FossilOrigin-Name: dac51f303bba1a0aac7768c688b0c134deb7641062cce2071d546f2d8f241dec
2021-02-22 20:56:13 +00:00
drh
dee1cb3006
Add a few simple test cases for MATERIALIZED and NOT MATERIALIZED.
...
FossilOrigin-Name: 64878124c160f790bc5861fd799ada03bd7db0c4426b8abc3b7ad1f7aa181168
2021-02-22 19:57:58 +00:00