dan
e2081dd859
Partially revert the test file changes in [4371a0c46e]. It is no longer required following [93ae382e97c23c90].
...
FossilOrigin-Name: 593a7e6e20a2f91fe3497edd7effad50ac876f7f03c9222e332dfeb43d26882e
2019-04-13 15:07:00 +00:00
drh
158931ab64
Test case changes so that they work with both Tcl8.6 and Tcl8.7.
...
FossilOrigin-Name: 7b771405a9adc3ec191156be4ebe7122f4c698d88d69ae2134c75acb8d8feebb
2019-04-12 16:25:42 +00:00
dan
37eca05112
Tweaks to wapptest.tcl: Ensure that the "Debug" checkbox is disabled unless the app is in "config" state, and have Debug variants run "test" instead of "fulltest".
...
FossilOrigin-Name: dd248c186a157b5ed60bbdae669b31237b8354c1a7e6ed64d377904043bd57ee
2019-04-12 13:40:54 +00:00
dan
150dfbd2c8
Fix minor problems in tcl test scripts.
...
FossilOrigin-Name: 56b664185e3e56ad22e0c16a5b946fc8204d4d33221b6b4269d6d650dfd9969c
2019-04-12 12:10:03 +00:00
dan
8ea00d744e
Merge trunk changes into this branch.
...
FossilOrigin-Name: d805fc0cf1c4ef07a7bc947f75828931e3788d0e64730caab3b42ae58009a194
2019-04-11 19:04:01 +00:00
dan
e639128cb0
Further tweaks to wapptest.tcl. Add the ability to run the extra (n)debug tests that releasetest.tcl runs.
...
FossilOrigin-Name: ec9c4f6d8da25dcc834812c2bb24bda1017833b1c572bdbbf87f0191e1310706
2019-04-11 19:03:15 +00:00
dan
93673620ec
Have wapptest.tcl display the name, OS and architecture of the host.
...
FossilOrigin-Name: c47e53b4d0f29628bd20ba3daf7e759c4bfed07710d982c095445c01376d57f5
2019-04-10 19:45:19 +00:00
dan
523fb53f72
Various fixes for the wapptest.tcl script.
...
FossilOrigin-Name: cbf423656047f0cb5200be6981a205e0ae206eef8263aa686f4a3621fb07fb57
2019-04-10 18:56:30 +00:00
dan
c7f3373ec7
Fix a problem caused by a small SQLITE_LIMIT_LENGTH value and a CREATE TABLE with a very large name.
...
FossilOrigin-Name: 9b5d408864920b302f2d21abcae1d90f1e0cd68b18262136554ba0e6219d6025
2019-04-09 20:50:44 +00:00
dan
a3020dcb21
Add test/wapptest.tcl, a wapp alternative to releasetest.tcl.
...
FossilOrigin-Name: a4af0c2fee05aaa2e95ae6a5c847ff2d363e24f325f4ffdcf51bc264b9bf5e2d
2019-04-09 19:53:32 +00:00
drh
7d683394f1
Fix a faulty assert() in the sqlite3VdbeMemExpandBlob() routine.
...
FossilOrigin-Name: df58774e994bd306b1a2e1f259e7e4408f01c5b1dc104673698168bbf8a63ce5
2019-04-07 18:04:57 +00:00
dan
6cf3009f6c
Add further tests so that veryquick.test covers all vdbe branches.
...
FossilOrigin-Name: cbc67de5a3937fa65811ed7c13e870699c895660dc2132cf9d3cf5d83364e344
2019-04-05 20:47:15 +00:00
dan
d1f9932e4b
Add further test cases to improve VDBE branch coverage.
...
FossilOrigin-Name: 51a95e52fc58d8be2c9c51576dff7258c705735b66d203948f80db017b4c10d2
2019-04-04 20:55:37 +00:00
drh
eacc8816dc
Minor fixes to requirements marks.
...
FossilOrigin-Name: 02ebc60b9bbc1736f4989eb56f8d31ca97fe90c930841d10986c618381ceb8b4
2019-04-04 18:20:25 +00:00
dan
b84b38fd89
Add test cases to improve coverage of VDBE branches. Still some to go.
...
FossilOrigin-Name: 4cef609d61de272cfdc2b39e1d49c7cd56ec834086bd63095116ff98f4d402bd
2019-04-04 17:58:34 +00:00
drh
eb80863cbf
Fix an incorrect comment on a test case for rowid renumbering in VACUUM.
...
FossilOrigin-Name: 0d293fb43f2eb64026ac1e0422f54d4839b101898cc9913fc7746760c08ed41f
2019-04-04 14:36:02 +00:00
drh
4e61e88348
Only preserve rowid values for VACUUM INTO. Keep the legacy behavior of
...
renumbering rowids for ordinary VACUUM.
FossilOrigin-Name: 13a0ea6466b051ea5281865ed5285b8b5a99ec4307f400c5f7b03692723f1cd1
2019-04-04 14:00:23 +00:00
dan
3f49c321e8
Fix a couple of problems with "RANGE BETWEEN <expr> PRECEDING AND <expr> PRECEDING" frames.
...
FossilOrigin-Name: 39225cc77579896214dceb93b7f224b4b3bc95b3505a2e19b41b0b18b184fbc4
2019-04-03 16:27:44 +00:00
drh
29ddbbbf36
Add the sqlite3_value_frombind() interface. Use that interface to
...
improve fts3_tokenizer().
FossilOrigin-Name: b3f2c3205a28dc21ea7080e5e1ba246ce9c9b90c1309262ca11d8e40943ed677
2019-04-02 00:28:54 +00:00
dan
afb3f3c72c
Add a test case to cover a missed VDBE branch generated by window.c.
...
FossilOrigin-Name: b36813d6467c82159bd3bb69d34ac28fc161a13052ca67d7cf9ad75e2aaea9d5
2019-04-01 18:43:09 +00:00
dan
1d07f1d8c7
If the library is built with SQLITE_VDBE_COVERAGE defined, have the Tcl tests generate a vdbe coverage report in file testdir/vdbe_coverage.txt.
...
FossilOrigin-Name: f0ed714637bf30443d0551d9b6fececa00fc9dfe9669fe720c4598ef71c61e2c
2019-04-01 17:24:20 +00:00
drh
8fe25c64f1
Early detection of too many columns in an index avoid a possible 16-bit
...
signed integer overflow.
FossilOrigin-Name: 8af0caeb6d1e55f66ad2f12af94845dccfe1d0420faf326f5917fc07f8aa6050
2019-03-31 21:09:33 +00:00
dan
0708054570
Add an extra IO-error test to windowfault.test.
...
FossilOrigin-Name: 5b8c44cd39c529e8adbc51f67088409e963515b988868856120a59e6c7160210
2019-03-30 17:07:23 +00:00
drh
7678fdc33d
Change the fts3_tokenizer() function to always return the pointer as a BLOB
...
as long as the first argument is a bound parameter, regardless of the
SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER setting.
FossilOrigin-Name: 27160df7b3a04ac59d06013ede1d2ee27a4ace86a525ecc333bf7f8b5c580afb
2019-03-29 17:26:44 +00:00
dan
3580843595
Fix a fairly obscure problem causing the planner to sometimes choose sub-optimal plans for a query with a single virtual table in the FROM clause, and at least one IN(...) constraint in the WHERE clause.
...
FossilOrigin-Name: f5752517f590b37bfc0267650f5800320e22a8ecaba34aa6893281ce8d268026
2019-03-29 13:17:50 +00:00
drh
5155b75be2
The two-argument version of fts3_tokenizer() works regardless of the
...
value of SQLITE_DBCONFIG_ENABLE_FT3_TOKENIZER as long as the second
argument is a bind parameter.
FossilOrigin-Name: ab76e3a90e56bd36a17ded9c7a77e88632ca12d3bd73f197df747a634c81e0cf
2019-03-29 11:39:41 +00:00
drh
57b1a3e303
Initial implementation of the sqlite3_value_frombind() interface.
...
FossilOrigin-Name: 98da62dfdacc6b3c490c387d1f8a74cc5daa978776967e264ad4800c380b0ddf
2019-03-29 11:13:37 +00:00
drh
f72a97925d
Add new test cases to test/fuzzdata8.db
...
FossilOrigin-Name: f908cd40b275a5753d5167ebb25871300381687adcb3a7fcb1f14b57a20ee3d0
2019-03-28 20:50:41 +00:00
dan
4ded26a53c
Prevent aliases of window functions expressions from being used as arguments to aggregate or other window functions.
...
FossilOrigin-Name: 1e16d3e8fc60d39ca3899759ff15d355fdd7d3e23b325d8d2b0f954e11ce8dce
2019-03-28 16:15:05 +00:00
dan
725b1cfc53
Fix a problem with window frames that use "BETWEEN <start> AND 0 PRECEDING".
...
FossilOrigin-Name: 7927b6b023502e990d23f30251b5b0918b547726b863bfb6747dcd7f1f71d19a
2019-03-26 16:47:17 +00:00
dan
b60c3b01cc
Add support for new window functions related features - GROUPS frames, RANGE frames with logical start and end points, the EXCLUDE clause and window chaining.
...
FossilOrigin-Name: c6da39115d3e2b0fd3a03c4bcae8ee8b05a6bbd6b11f8c54712fbff6387f610d
2019-03-26 13:08:34 +00:00
drh
58b42ad131
Earlier detection of corruption while added to the freelist.
...
FossilOrigin-Name: 8c80b004cae71aaf820a31dba80c100ed162ef5bae845fb4535ff4d3be407500
2019-03-25 19:50:19 +00:00
drh
1c960269dd
Fix a faulty assert() statement in balance_nonroot() - the assert() should use
...
get2byteNotZero() instead of get2byte() for the corner case where the
number cells is zero on a 65536-byte page.
FossilOrigin-Name: bcbe7d96df3c9515f679ccf671ca9ba89d081b53501495d4218eb5126196838b
2019-03-25 18:44:08 +00:00
dan
781b7ac3f6
Fix a problem with a window function in a correlated sub-query where at least one reference to the outer SELECT appears in a FROM clause sub-select.
...
FossilOrigin-Name: 9aca86f98388ff66b2bccb3fbfc486a3931398d2a8da139f905826ae2cdbb205
2019-03-22 13:56:49 +00:00
drh
fb5567123f
Add the --limit N option to dbfuzz2. Set the default callback limit to 250K.
...
FossilOrigin-Name: b99f8512c06b9d47e48b028781265512ce8b812ae4e6af0a7139a093cf9a8f74
2019-03-22 11:38:14 +00:00
dan
dcc427cf19
Add an extra test for database corruption to defragmentPage().
...
FossilOrigin-Name: 80e951fce3e5aaa224c8dba6449832d2efabcdc24e86eb6b7833f85cf08ecc00
2019-03-21 21:18:36 +00:00
dan
c7694a6d1d
Remove assert() statements based on the counter-factual proposition that 0 is not a valid cursor number.
...
FossilOrigin-Name: c7b336181aac6785a515f275c0f50ad4bf2dee20abde959b56d968a7fdce3e5b
2019-03-21 13:51:09 +00:00
dan
2381f6d7e5
Fix a potential dangling pointer deference in an ALTER TABLE run on a schema that contains constructs of the form "PRIMARY KEY(column COLLATE collation)".
...
FossilOrigin-Name: b9e2393cf201e3fc24519c5ae65d0a5953147d78884e53d44a7958747b4a7e13
2019-03-20 16:58:21 +00:00
mistachkin
065f3bf4f2
Fix various harmless compiler warnings seen with MSVC.
...
FossilOrigin-Name: 1c0fe5b5763fe5cbace9773dcdab742e126d0bd035ab13d61f9d134afa0afc0c
2019-03-20 05:45:03 +00:00
drh
d0f820a7e6
Enhance the VACUUM INTO command so that it works on read-only databases.
...
FossilOrigin-Name: 55be6d0a9fa8a64b9c9c5ed51a2b9144304f7f0870a13b92d5864ac4d54491b6
2019-03-19 20:42:42 +00:00
dan
78694ea307
Add further tests to window8.test.
...
FossilOrigin-Name: ec7e224f50271a69a28074270b01328ec0ee38751fcb93b2c598d8be2b77a95d
2019-03-19 19:39:42 +00:00
dan
6603342f12
Fix a problem with EXCLUDE clauses on window frames with no ORDER BY.
...
FossilOrigin-Name: e0255063799a2a8531f0eaa8790334509591a5ababc5b915035b46d2faa80363
2019-03-19 19:19:53 +00:00
dan
8eff0cc326
Add tests to ensure that the window functions implementation is not generating code for unnecessary sorts.
...
FossilOrigin-Name: e195948a6876efe01b5cf2ed67bc9015a781fda39dca668099cb7edc1d331818
2019-03-19 17:45:31 +00:00
dan
e5166e070a
Revert the OP_MustBeInt opcode implementation on this branch so that it again matches trunk. The extra functionality is no longer required.
...
FossilOrigin-Name: c02f77b1b4d025d4243f883d6f3a2b3abcaf4944e0209f641b62c576415343dc
2019-03-19 11:56:39 +00:00
dan
d430c2eb46
Update this branch with latest trunk changes.
...
FossilOrigin-Name: 98cc26598718e5557ee00aa77336024c91e483ec6de650e172ad1b44a6f0a77b
2019-03-19 11:17:28 +00:00
dan
ced89124d8
Ensure that all the new window-function keywords can still be used as SQL identifiers.
...
FossilOrigin-Name: a6d61dfd4780eccfce5f7a5ead6c04e3b78bc4a461551fd7dd602550e0d51084
2019-03-19 06:40:29 +00:00
dan
0525b6f47f
Add further tests for new window function functionality.
...
FossilOrigin-Name: 1fbddf01b1c3fff95b05e2f2f709754e2b514296060b4846518791e7161d9ddb
2019-03-18 21:19:40 +00:00
dan
108e6b2c87
Always evaluate window functions using the alternative path usually only used by EXCLUDE frames if the SQLITE_QueryFlattener test flag is set.
...
FossilOrigin-Name: 2879a691aca9304aea5acb46bab8e82bb2e08eb54201f3679d60bfc0e8383845
2019-03-18 18:55:35 +00:00
dan
bdabe742da
Fixes for RANGE windows and NULL values.
...
FossilOrigin-Name: 723c84be3ec5ae941b7abd2442cdb76ca3bd76a5ce2d830b0e648c6e1424885a
2019-03-18 16:51:24 +00:00
dan
1e7cb19be3
Fix problems with RANGE windows and string, blob and NULL values.
...
FossilOrigin-Name: cebe09e11cc91d9776f259dd9b87e9c760a460f53ba6fa36481dfe58f77ad417
2019-03-16 20:29:54 +00:00
dan
c782a81aa5
Implement the EXCLUDE clause for window frames.
...
FossilOrigin-Name: 9b43c3ee2e054b05715573f4f3893b84aabc5100832333c9a0f2a1628552a978
2019-03-15 20:46:19 +00:00
dan
25f5383cb8
Remove a debugging printf() left in test/sessionfuzz.c.
...
FossilOrigin-Name: 73c4abc90264355f3ea6e8c34e5aad6ed665b70fb136c4d416e2a98e46562bbd
2019-03-15 18:57:49 +00:00
dan
1f3b284b11
Ensure that ALTER TABLE commands open statement transactions. Fix for [596d059a].
...
FossilOrigin-Name: 0f2129f59f7df929106e2af876c2976dea6528c1dc1850d64cddb256f20e121a
2019-03-15 16:17:32 +00:00
dan
a0f6b83300
Add things to this branch that will be required to support the EXCLUDE clause.
...
FossilOrigin-Name: 7d66cd2013206ebad50c7cdb7dab9211fa8b47f5cb7067dcb314b3e0180875f8
2019-03-14 16:36:20 +00:00
dan
db7d895e9d
Merge latest trunk changes into this branch.
...
FossilOrigin-Name: 0b904517bd6c4c59082381577246d3d2351b4265fc9151438ee4c33cf16f2eb1
2019-03-13 17:31:20 +00:00
drh
b65e801e5f
New test cases added to test/fuzzdata8.db
...
FossilOrigin-Name: 049e9926202317f58c54b6351ff120fb69bf821f409909b1a1c5e335c0396707
2019-03-13 13:19:05 +00:00
dan
fcb02429ec
When deserializing a database (sqlite3_deserialize()), do not attempt to parse the schema before the data is loaded.
...
FossilOrigin-Name: 4e1b005e8b397a22161a6b89cbd3f17bda70a6e0a86d8abdc61856edf2a74da4
2019-03-13 11:40:30 +00:00
dan
bb40727857
Allow real values to be used in PRECEDING and FOLLOWING expressions for RANGE window frames.
...
FossilOrigin-Name: 25ff7091cb12c63b1864ce68a9151f8432af5804b5ae905a2175761ab4b9fdd8
2019-03-12 18:28:51 +00:00
dan
9e24439c2f
Fix a crash that could occur if the RHS of an IN expression is a correlated sub-query that refers to the outer query from within a window frame definition only.
...
FossilOrigin-Name: 0524aaaf45681437c2dca3d31ff26a65bee7bd2074730277c29136635ee0be0f
2019-03-12 09:49:10 +00:00
dan
71fddaf195
Fix problems with "RANGE ... ORDER BY <expr> DESC" window frames.
...
FossilOrigin-Name: e7bced731aa071c95bc398cdecd53c939841bf0c52fbcd06e47ba68f8c5cc35a
2019-03-11 11:12:34 +00:00
dan
72b9fdcf20
Add support for RANGE window frames. Some cases still do not work.
...
FossilOrigin-Name: ffc32b246d92d53c66094afe11950b53ffab6a1c230c602eebbfedafb2eb57f4
2019-03-09 20:49:17 +00:00
dan
f7b846e4ed
Merge latest trunk changes into this branch.
...
FossilOrigin-Name: 53ea550ce759ae4683bcf0ae3af655bfe04f85db70f74edee6bcab56d83bb041
2019-03-09 07:38:16 +00:00
dan
0d86a9bd54
Add simple tests for GROUPS window frames.
...
FossilOrigin-Name: 2872702dacadad11f4fd7c437b77ef82763e840c9c92eefe87eac2491c38f963
2019-03-08 20:57:05 +00:00
dan
6c75b39614
Finish consolidation of window frame code. Add untested support for GROUPS frames.
...
FossilOrigin-Name: 954bf369935083c188c3b14e77ed89fc5ec4323cc5b0c67e4a2e48fcc278df45
2019-03-08 20:02:52 +00:00
drh
bcf1f41a62
Add new test cases in test/fuzzdata8.db
...
FossilOrigin-Name: 97bdc090f30610cc5dd29101452d1647550387f9c6f742e50f1e07c3cf68a147
2019-03-08 14:07:15 +00:00
dan
66b8457c7c
Fix another segfault in fts3 that could occur with corrupt records.
...
FossilOrigin-Name: fcc24edde471c2214add2dbc3a27da8890a7148105c5ffa024faf72457964a5f
2019-03-08 13:27:27 +00:00
dan
b33487b0b6
Improvements to the way built-in window functions are handled.
...
FossilOrigin-Name: e8eee566dfca6f4c8af074731dfe91f7fbcd9ca72f0303235b52e4e2e80d5b71
2019-03-06 17:12:32 +00:00
drh
39c5c4ae06
Add the sqlite3_stmt_isexplain() interface.
...
FossilOrigin-Name: ee642d3e2775ba4c73627ac71d0abf7a0f7a4ab3151d88e0076e9992f4814983
2019-03-06 14:53:27 +00:00
drh
aff0fd483c
Add an "|| CORRUPT_DB" term to an assert() that might be false if the database
...
is corrupt. Also add a branch to have sqlite3PagerMovepage() return
SQLITE_CORRUPT in that case.
FossilOrigin-Name: b0d5cf40bba34e459caa7480bc84a1d75496c2ab52029f4bb0a31f2d9369a8ee
2019-03-06 14:08:41 +00:00
drh
7bf3133fef
New dbfuzz2 test cases added to test/fuzzdata7.db
...
FossilOrigin-Name: 25975e1fb2be0c011542c0a6b001385cec8113662df93dc618f725f2a4692bc2
2019-03-05 14:47:53 +00:00
dan
4e72e62f3b
Merge trunk changes into this branch.
...
FossilOrigin-Name: 9b4d561f68febdab6624d8c567fb4357bf67dda500664cf708d16a76f37b8ec1
2019-03-04 21:08:53 +00:00
dan
680f6e8e2e
Support some "ROWS BETWEEN N PRECEDING AND M FOLLOWING" window functions without caching entire partitions.
...
FossilOrigin-Name: e7a91f12282afb5d5d7d78397a11d18e0268ee0c931d85e21fce00d13929494e
2019-03-04 21:07:11 +00:00
drh
f10c535fa5
The fts3_tokenizer() function returns NULL if the
...
SQLITE_DBCONFIG_ENABLE_FTS_TOKENIZER setting is disabled, which is is
by default.
FossilOrigin-Name: f5732f4caf7a37a6445c61ae0d0ac14cc9deb897376e73aa36a1ead025b92c69
2019-03-01 21:33:29 +00:00
drh
c06ede105d
Add the new "bind_fallback" method to the "sqlite3" object in the TCL
...
interface.
FossilOrigin-Name: c7f70b6d96338dba201e005104e7f7148c1a8cd767ab05e35b44617c4c797bc5
2019-02-28 17:29:19 +00:00
drh
4ddf7f4211
New test case loaded into test/fuzzdata8.db.
...
FossilOrigin-Name: 00ae0c6c4815366bd2f36bc054b13bc7b568dd0a3caceddf0eba4db33f010ee4
2019-02-28 14:09:14 +00:00
dan
95fdb63b7f
Avoid an assert() failure and an undefined left-shift operation in the fts3 snippet() function that could occur if the database was corrupt.
...
FossilOrigin-Name: d5250db6322103326f0d5782ba049996d9ce8784f9e53a3112fb6f09f888f1c3
2019-02-28 13:41:35 +00:00
drh
45616c7f75
Add an "|| CORRUPT_DB" term to an assert() statement in the btree defragmenter.
...
FossilOrigin-Name: 6bfd8655f006e031c0d4c988356c4b9206efa6bfdb034fde8ffa3361521a4844
2019-02-28 13:21:36 +00:00
drh
8e0f794d17
Enable the LIKE optimization when the ESCAPE keyword is present and the
...
PRAGMA case_sensitive_like pragma is ON.
FossilOrigin-Name: 6ae4b8c525f446ddb0e0bdd5e4e01e06e2ab975e3effa42fce6a1102b3a39830
2019-02-27 23:05:14 +00:00
dan
89d249364e
Add the "-returntype" option to the "db function" Tcl method.
...
FossilOrigin-Name: 789a492b68c353e2b763d67d399722b7ab61bfe09b472466df2821f65cab1be9
2019-02-27 16:38:19 +00:00
dan
69e224f88a
Reformat the white-space in a few test cases so that the tests work with Tcl 8.6.9.
...
FossilOrigin-Name: 29d02bf2fa9ecacbcc3e862ca70382f5875da8c1dc7fd27366190045fcc42b15
2019-02-26 19:16:49 +00:00
drh
ddc28c23d5
Minor change to dbfuzz2 that allows it to be compiled against older versions
...
of SQLite.
FossilOrigin-Name: 6d39d6a68bf09e0b4f6706218373e74fc03148fd8bdba5031c3de2f750d87cf2
2019-02-26 18:21:08 +00:00
drh
bfa70de117
New test cases added to test/fuzzdata8.db.
...
FossilOrigin-Name: 61fdfc57b9539cb6da5fc24653da2c8fb7c041a7409df911df11b987ed479a3a
2019-02-26 17:52:44 +00:00
dan
f2e5c98613
Fix a couple of assert() statements in fts3 that can be false if the database is corrupt.
...
FossilOrigin-Name: 84162af521f29df8a186163fbdef9856e1aa8aba78e74d7df0ba2cc83bb86240
2019-02-23 20:48:41 +00:00
drh
bc0a55cf0b
Check-in [fa792714ae62fa980] is not a valid fix for ticket
...
[df46dfb631f75694], as the new test case in this check-in demonstrates.
The fix here causes test cases for the [df46dfb631f75694] bug to fail
again, so this check-in is on a branch. A new fix is needed for
[df46dfb631f75694].
FossilOrigin-Name: 0d456456da6e25b20d9d27ca95f1013082bca52ee74ee9bf91732a9fa843ea45
2019-02-22 21:33:56 +00:00
dan
f030b37682
Internally, remove all references to a Window object that belongs to an expression in an ORDER BY clause if that expression is converted to an alias of a result-set expression. Fix for [4feb3159c6].
...
FossilOrigin-Name: 579b66eaa0816561c6e47ea116b46f229188f0fc84c1173bfe0d21df2dff9a9a
2019-02-22 19:24:16 +00:00
drh
480c572f2d
In sqlite3NestedParse() be sure to detect all SQLITE_NOMEM and SQLITE_TOOBIG
...
errors and to distinguish between them.
FossilOrigin-Name: 73056b314bd63288c662752e9bd469b70264c38031c1c857460e64fdb1ed4e2e
2019-02-22 16:18:12 +00:00
drh
255a81f10a
Modify sqlite3_str_finish() and sqlite3VMPrintf() so that they always
...
return NULL on any OOM or SQLITE_LIMIT_LENGTH error.
FossilOrigin-Name: e7144ffd21294d7aebbfa6aa5a262797a6d16de11193f1bf6b75f5f27b04c940
2019-02-22 15:42:10 +00:00
drh
7e85e9033f
Disable unix-specific features of dbfuzz2 when compiling on windows.
...
FossilOrigin-Name: af84774d1eebcfe6a61b564b4edf280ad3c3a93f39b7f70b6fcc56f7bbdfb9eb
2019-02-20 19:06:16 +00:00
drh
042666e4fa
When an IN operator drives a query loop, mark it as "CODED" so that it
...
will not be used afterwards for a (pointless) membership test. This is
a better fix for ticket [df46dfb631f75694] than the previous fix that is
now on a branch as it preserves the full optimization of
check-in [e130319317e76119].
FossilOrigin-Name: fa792714ae62fa980f1767acc6d622a6727ceb677870243c88548423795dcb5b
2019-02-20 12:52:47 +00:00
drh
12fe9a0d25
Fix an assert() that might not be true if the database file is corrupt.
...
FossilOrigin-Name: f2d400db4dbfb05e2540178ed3662f97f8c57a95f8129886c7081c35e53adf0d
2019-02-19 16:42:54 +00:00
drh
b43ac0021f
Fix an assert() that might not be true if the %_segdir table of FTS3 contains
...
corrupt entries.
FossilOrigin-Name: a6509ca3dc2602c7d0376230ee63c1bb4c4066f007e77e9ac20d8eee966e5e13
2019-02-18 12:16:03 +00:00
dan
e7c9ca41b2
Add support for chaining of WINDOW definitions.
...
FossilOrigin-Name: c155125fd5dddb438c09d40f5137c47d88defb7a6ede4261f09d7bdaad250d37
2019-02-16 17:27:51 +00:00
drh
9c7e44cddd
Improved oversized cell detection when updating ptrmap pages in
...
balance_nonroot().
FossilOrigin-Name: aa61435a4c3800f023788081c1342ad6a05a41449a424fa6c039d5ca46072256
2019-02-14 15:27:12 +00:00
drh
62e009f3d8
New test cases in test/fuzzdata8.db.
...
FossilOrigin-Name: ab2356f580384e4b40d128fc04fd6bc4dfcf50109df77d05d59adcc20f339066
2019-02-12 01:28:24 +00:00
drh
3e7800a9db
Defer computing the number of bytes of free space on a btree page until that
...
value is actually needed.
FossilOrigin-Name: 177f5f40eabfcfd229ac7f291dfed9e9ee35762e86923a0f356915f389da177d
2019-02-12 01:04:49 +00:00
drh
6813350966
Fix test cases. Avoid unnecessary tests for MemPage.nFree less than zero.
...
FossilOrigin-Name: 480a5090befdc29eaeb6f0b22831c980d6ee92438d9b2e766de68b037ded38b8
2019-02-11 17:22:30 +00:00
dan
8cd2e4ae03
Build and test fixes for SQLITE_OMIT_WINDOWFUNC builds.
...
FossilOrigin-Name: 8824115a9776e876a3677f0cb479e311ee65584d43872b37766a146afec72d8f
2019-02-11 11:34:01 +00:00
dan
2fa619a3a8
Change a few assert() statements in fts3 that might fail if the database is corrupt.
...
FossilOrigin-Name: db74a56af73d92b7a9d43ceda7e4540915c580c68a0266b4ddefb9e0d5cbcbeb
2019-02-09 19:23:54 +00:00
drh
8851e10017
Do not do the optimization that attempts to pull expression values from
...
an index on that expression when processing a multi-index OR
(see check-in [a47efb7c8520a0111]) because the expression transformations
that are applied become invalid when the processing moves off of the current
index and on to the next index. Fix for ticket [4e8e4857d32d401f].
FossilOrigin-Name: 440a7cda000164d3b46109caf2e1dde80681ba9b0d94ba9be6847d2b917445cf
2019-02-08 04:15:19 +00:00
drh
1e30c7f369
Change VACUUM so that it preserves ROWID values.
...
FossilOrigin-Name: 49e5d11d463de078c2b8a963f5ed436210937e6dfddf06942132db9ec685bfd8
2019-02-07 19:07:11 +00:00
drh
af63892337
In the fuzzcheck test program, make sure the isspace() and related routines
...
are not given values outside the range of -1 to 255.
FossilOrigin-Name: f298328771d5aaba798d05f50c77ac239c7c72422ff35953463d6876a9659f74
2019-02-07 00:17:36 +00:00
dan
9c5f734339
Avoid attempting to delete a file while it is still open in walfault2.test.
...
FossilOrigin-Name: 9d54a63d6e3cd47b483cf0ee868a5e7f638bcb0e3cbdeaecc667f293b87a3e99
2019-02-06 19:42:02 +00:00
dan
6e08c4a5e6
Update test file dbfuzz001.test so that it works with SQLITE_ENABLE_OVERSIZE_CELL_CHECK builds.
...
FossilOrigin-Name: 4371a0c46ee7bfbc0a1507796bd9eefd3371adad81b8dda214d018854316727b
2019-02-06 18:08:42 +00:00
dan
531230d006
Add -DSQLITE_ENABLE_DESERIALIZE to the default testing configuration in test/releasetest.tcl.
...
FossilOrigin-Name: 433d6ef637a10ee017b5d8cadd125a162cfedc9895ae862b8dde6dddb7eda59b
2019-02-06 15:23:43 +00:00
dan
fbf6136c78
Do not attempt to test the shell ".trace" command in SQLITE_OMIT_TRACE builds.
...
FossilOrigin-Name: 3839e9098107604e1526c2b1e813c019607077dfe39d7eeb92f3466518dec3b1
2019-02-06 13:48:04 +00:00
drh
4acd754c79
If the query flattener detects an error, cause the SELECT code generator
...
to abort immediately.
FossilOrigin-Name: 3d3b142f1045080beb775a9cfe88ec143aa460750132e20059fd510291449850
2019-02-06 00:55:47 +00:00
dan
dee9be9b3b
Update the tester.tcl --malloctrace option so that it uses eu-addr2line instead of addr2line.
...
FossilOrigin-Name: 79c073878d56fc638b751b0e61295df182f7ee6f8ebd7319c1eeac1608abbac8
2019-02-05 16:53:26 +00:00
drh
d57936721b
The IS NOT NULL operator does not imply that the operand is never NULL.
...
Fix for ticket [5948e09b8c415bc45da5cf]
FossilOrigin-Name: d840e9bb023a1e84a7739d764a0f6cf608fc3183ff8c366fcdb486ebd932f0c1
2019-02-05 14:36:33 +00:00
dan
41e0717bcb
Update test file "resetdb.test" so that it works with the "prepare" permutation.
...
FossilOrigin-Name: 95d338124be2e0e18f17354b28f4320336202f1a4ec1177df753b2800e954bfb
2019-02-05 08:55:43 +00:00
drh
a790882d63
Add the -memtrace option to dbfuzz2.
...
FossilOrigin-Name: 67fecbc79d3e927a7e22f3589be3184114322635874e4b3170666e352d0bfe9d
2019-02-04 19:50:44 +00:00
drh
88862d49a6
Enhance dbfuzz2 so that with the -v option it shows the return code and
...
error message for any failing SQL statements.
FossilOrigin-Name: 3a127ef9f7feafe6ba8c75e4eb29e28aa61a30249082cc8767ada1ec0cc0b7f1
2019-02-04 19:45:26 +00:00
dan
4fc4ba771c
Do not run shmlock.test as part of the inmemory_journal permutation.
...
FossilOrigin-Name: d3fea69cbb071867a90ad56ca05123ebf8e44689a92577a525a883c176c791bd
2019-02-04 16:42:57 +00:00
drh
e2d2ad6ece
Update the test/fuzzdata8.db database with new interesting cases from
...
dbsqlfuzz.
FossilOrigin-Name: e467e4c8fa256ddd6c26c1f21bc26289a21f18b781737eaf706bc813ed8234fa
2019-02-04 16:36:24 +00:00
dan
41fc545147
Fix an assertion failure in fts3 triggered by a corrupt database.
...
FossilOrigin-Name: 560ebd4269fad07b8e988d070454017123593eb6762597d08e8c32d7b4fb92ac
2019-02-03 07:46:07 +00:00
drh
150edadf58
New testcase added to test/fuzzdata8.db.
...
FossilOrigin-Name: 2f5c1925b94d85489533549c58191feb1d803ad9d58b43f47fef42b72c531a38
2019-02-02 18:24:28 +00:00
drh
38a28a7434
New test cases added to test/fuzzdata8.db.
...
FossilOrigin-Name: e5924939c9c8f39367900360fa294cdb1220e9f68d183e32882e0926f775869d
2019-02-01 14:54:18 +00:00
drh
8bf4126c84
Change the error message slightly for when two or more indexes have the
...
same rootpage.
FossilOrigin-Name: 916c52dad414b224695d455a42af36f85dff216504c2aa67d1d2c5818cdca8d6
2019-01-30 19:50:07 +00:00
dan
da7a4c0f7a
When parsing the schema, check for duplicate index root page numbers before adding the index to the schema hash table.
...
FossilOrigin-Name: 6b360bc0b9ad18ccda9d58d43a8388d19999432bfdf294abcf5beb44ef990cb4
2019-01-30 19:12:13 +00:00
dan
56b99ebc32
Add test case for the previous commit.
...
FossilOrigin-Name: 197edb235b785c68fda7be788efbc61137d9452886599415a927b959ade93c65
2019-01-30 18:47:35 +00:00
drh
4551005332
Load all the latest dbsqlfuzz finds into test/fuzzdata8.db.
...
FossilOrigin-Name: e744d2dd93a78235e6c1d938b08232183b5ce7e355d1b7daf2199e585b03c106
2019-01-29 16:47:46 +00:00
drh
a046643820
More robust handling of corrupt database file in the rebalance operation of
...
the btree logic.
FossilOrigin-Name: 97704cb7d29fa7cc4ea9a6761a7844c1946d637ea2b22d287fc787ae0f63c407
2019-01-29 16:41:13 +00:00
drh
4a7e9a25b6
Set a low limit on the length of strings and blobs in the OSSFuzz module,
...
in an effort to avoid timeouts when the fuzzer does things like
"randomblob(1e12)".
FossilOrigin-Name: 119d1609fa415894fdd0aa19440ca1c658bd01910838a4cfadbe0e304b033bfd
2019-01-29 02:37:22 +00:00
dan
95d5a88058
Make indexes on CAST(...) expressions work.
...
FossilOrigin-Name: 3ef711d98fb239cf24472f124e7b36b0dde33355de5a2c9a3a978bbdd042a735
2019-01-28 18:08:59 +00:00
dan
c7def600bd
Fix a buffer overread in fts3 that could occur when accessing a corrupt database.
...
FossilOrigin-Name: a9faf9033910927c74553e66c474d84ed3386f263cef3eec299e25d8306f410d
2019-01-28 16:50:42 +00:00
dan
6c43dbad98
Do not assume that text parameters passed to fts4aux queries do not contain embedded nul characters.
...
FossilOrigin-Name: df04859a995571cd6faf1abe088725708f35e81195760274df9e2ec9bd47f69f
2019-01-28 13:27:25 +00:00
drh
9e35a61e59
Add a new test case to fuzzdata8.db.
...
FossilOrigin-Name: ce8e279a7d37594e865c2d9197a5efe5d647e11f074dbaf4a4ee31c74c71dbc9
2019-01-28 11:54:13 +00:00
drh
05d49d1442
New test cases form dbsqlfuzz
...
FossilOrigin-Name: 9cf8ebd141aa2eb661d457624c76433bd9e4abfdef04aa52e28bc169172c2c8f
2019-01-27 02:45:32 +00:00
drh
e5da9356e0
Update fuzzcheck so that with the --load-dbsql options it screens its
...
inputs to ensure that they are valid dbsqlfuzz cases. Add new dbsqlfuzz
finds to the test/fuzzdata8.db database.
FossilOrigin-Name: 004f7d9bbeee049c22a7e1c82c6cc0ea79a237967de3ff57686acea3060d5f45
2019-01-27 01:11:40 +00:00
dan
32bb700a95
Fix a broken assert() in fts3. Also some test script issues causing failures with builds that do not support fts3.
...
FossilOrigin-Name: d59567dda231e7ffec437d5e055676cf42d791196406cdc696cafa2583eb483b
2019-01-26 21:05:54 +00:00
drh
0814acd981
Do not accidently truncate zeroblob values when doing an arithmetic
...
operation. Fix for ticket [bb4bdb9f7f654b0bb9f34cfba].
FossilOrigin-Name: 13f6942eb0da2d92a0830f18640ce64208bd0cd6ff6d0c97e4a4c57ac3d65ba6
2019-01-25 20:09:04 +00:00
drh
ed457037c4
Fix harmless compiler warnings in fuzzcheck
...
FossilOrigin-Name: a82539665718c8183d9d0bb7bcb3adcb1a23294b8c30f364829a982dab89a332
2019-01-25 17:51:06 +00:00
dan
c2ea77e5b2
Fix a segfault that could follow an OOM when querying a table that has one or more columns with default values "true" or "false".
...
FossilOrigin-Name: 202f9919c222ee933924c63c15ad36ec4481457b1e4d9179af14c9f284117c0c
2019-01-25 17:26:59 +00:00
dan
c1f6618217
Add an assert_fts3_nc() macro to fts3 - for assert() conditions that are only true when it is guaranteed that the fts3 database is not corrupt.
...
FossilOrigin-Name: 3498908cd7f3d0e35b70796537124e3da0bd99d48750ba51bcb9eba87e28ed4d
2019-01-25 14:48:18 +00:00
drh
31ab7d8e5c
Extend fuzzcheck so that it can process dbsqlfuzz cases. Add a collection
...
of interesting dbsqlfuzz cases to the standard test suite.
FossilOrigin-Name: e2991a7ecf5dd241c4bab7c7cadc4901043fb0c3ea1fac70b684f6d8332677f1
2019-01-25 14:23:36 +00:00
dan
ba14c69b4f
Fix a couple of assert() statments in btree.c that could fail with corrupt databases.
...
FossilOrigin-Name: 5eb5e8289fa71e5e29e081d33d4a59c64b463bf6b06d7070c05c46d77d808ad4
2019-01-25 13:42:12 +00:00
drh
725a9c7f6c
In fuzzcheck, activate vdbe_debug for dbsqlfuzz cases when using the -vvvvv
...
verbosity level or above.
FossilOrigin-Name: 2e6f7c2aced49824a38b3494b796a8ec73aa7a90b51159f670596df15ed1c5ab
2019-01-25 13:03:38 +00:00
drh
df21659a40
Improved automatic detection of dbsqlfuzz cases in fuzzcheck.
...
FossilOrigin-Name: 1ef24e89c9630fd383ba32f5aefcf9c27907f27f5072f3537a1cfd75a093a8d7
2019-01-25 04:43:26 +00:00
drh
a47e709e89
Add the ability to process dbsqlfuzz cases in fuzzcheck and add an initial
...
set of interesting dbsqlfuzz cases.
FossilOrigin-Name: fb9074ff450a67feaa62ca61d19154de26d5c8a8d147409ee6d1fbd667b2914f
2019-01-25 04:00:14 +00:00
dan
813ed78054
Fix a buffer overread in fts3 that could occur in a prefix query on a corrupted database.
...
FossilOrigin-Name: d0d5689371577b2861d4a9464443d055f3256f3f51d89e0388233a4cbe2601ee
2019-01-24 17:41:12 +00:00
dan
f467744d5f
Fix a problem with running ALTER TABLE on a schema that contains expressions of the type "col IN ()" (empty set on RHS of IN operator).
...
FossilOrigin-Name: 2d9cd06715092c312c8c0ec392696a0e90ed090b074e2082e0b830f1399aa941
2019-01-24 16:27:10 +00:00
dan
b0c4c94996
Fix a potential problem with "INSERT INTO ... SELECT * FROM" (or VACUUM) statements on a corrupted database.
...
FossilOrigin-Name: db4b4c2c1e9f1adacfb1b2fedb717a4d8bb0a299c3b11835404a99fcd67bf24b
2019-01-24 15:16:17 +00:00
drh
55469bbafb
Use memmove() instead of memcpy() in a place where buffers might overlap
...
if the database file is badly corrupted, to prevent warnings
from ASAN and valgrind.
FossilOrigin-Name: 65ad6c55f1ba9bc2f75afffa3adaf19f145fad7ac9a00ccce6372e9a2cc4341b
2019-01-24 13:36:47 +00:00
dan
b4738ddb20
Fix an assert() in vdbemem.c that could fire if the database was corrupt.
...
FossilOrigin-Name: a70958cd7d5cf750c293537856918e5789013b70f6a827f724d83559b38629c8
2019-01-23 20:31:56 +00:00
dan
a5f9f42a0e
Fix a problem with renaming a table within a schema that contains a composite query that uses a column alias as an ORDER BY term.
...
FossilOrigin-Name: 2ca6b8f84ec07e313aa4e1c0894827401b418dcc4221e9c54c384f1c3893952a
2019-01-23 19:50:46 +00:00
dan
d99950310f
Fix problems with sub-selects in WINDOW definitions. Also rename-column operations when the column being renamed appears in a WINDOW definition that is part of a VIEW or TRIGGER.
...
FossilOrigin-Name: 0387cb3add992b2028efe4f2100188d8f9fdfdcb233329857aa4b46a293cfc97
2019-01-23 16:59:24 +00:00
dan
8e4fe01dda
Do not run shmlock.test as part of the journaltest permutation.
...
FossilOrigin-Name: 5b7d0c784e6467154d9549af0163d788b69d5e5a6478a735834cdea945e7dbb7
2019-01-22 20:18:29 +00:00
drh
178edcd774
Update dbfuzz2 to set a maximum database size of 100MiB by default, but
...
with the new --max-db-size N option to change that limit.
FossilOrigin-Name: 21d6bb78ef2979d011b917d2d6519d7cd0009fcad83ed23ab2e9a5e02d8e51ab
2019-01-22 16:11:31 +00:00
drh
6ca644818b
Enhancements to deserialize: (1) Add the SQLITE_FCNTL_SIZE_LIMIT file control
...
to set a maximum size for an in-memory database, defaulting to
SQLITE_MEMDB_DEFAULT_MAXSIZE or 1GiB. (2) Honor the SQLITE_DESERIALIZE_READONLY
flag. (3) Enhance the TCL interface to support -maxsize N and -readonly BOOLEAN.
(4) Add the --maxsize option to the ".open" command and on the command-line for
the CLI.
FossilOrigin-Name: 30f08d58882819a69e353bcc1b6b349664bbfbe00aa1c115ba44a9fd899fcc5b
2019-01-22 16:06:20 +00:00
drh
247c1b4a0b
Make sure cursors are opened on all indexes for an UPDATE OR REPLACE
...
regardless of whether or not the indexes are partial or contain columns
that might need to be updated.
FossilOrigin-Name: e148cdad35520e6684cfeba23b003f60b55f83a6bf621aff16be8aa5612cdcee
2019-01-22 13:45:48 +00:00
dan
2c7a73eaea
Fix another segfault caused by a corrupt fts3 database.
...
FossilOrigin-Name: ba3b8412726548a0716c1a2d67260c3b7e31956474f4cd4ce607cf2cebc667dd
2019-01-22 12:21:28 +00:00
dan
129371553c
Avoid deferencing a freed pointer following an OOM or SQLITE_CORRUPT error in
...
the fts3 xDestroy method.
FossilOrigin-Name: 505ed9a47825240979338a24044559613fbbd2a7850bdff70c7164da054ec63d
2019-01-21 17:57:31 +00:00
dan
ac30553f76
Remove a faulty assert() from fts3.
...
FossilOrigin-Name: 6c33a303ebbb0f5193ead535280ba63118e14fb4f9977ce80dc716a0b082ec99
2019-01-21 16:12:20 +00:00
drh
7c04c69204
Minor fix the fallocate.test module change from [7cd56cad5efead5]
...
FossilOrigin-Name: 94fb7a47003c3c1a52e833e98d27399cfec5382afde2b3990e8223c8bff7cfa0
2019-01-21 14:49:14 +00:00
drh
5976552a72
Add the --max-data and --max-as options to dbfuzz2. Also cause dbfuzz2 to
...
show its maximum RSS size upon exit in standalone mode with the -v option.
FossilOrigin-Name: 7ce93e824a954d1e0cf8d7343e59a2660175f42bd4dac02aed8ad77644e7eb2f
2019-01-21 13:47:55 +00:00
drh
8ed07d1274
Add the --max-stack option to dbfuzz2.
...
FossilOrigin-Name: c11ae4fed89484f0a0061002861b5d599bbda8e40a1f0c33fdbe8cb072134d5c
2019-01-20 00:03:59 +00:00
dan
b8852ae083
Remove a broken assert() triggered by a "PRAGMA max_page_count = N"
...
invocation, where N is larger than the number of pages in the database image,
but smaller than the number of pages in the database file.
FossilOrigin-Name: 7cd56cad5efead5097e9918c87313bb46e583fe62bae0df1be60e10117e2c3cb
2019-01-19 15:27:09 +00:00
dan
93b6c1666d
Fix a problem with using ALTER TABLE to rename a table or column when the
...
database schema contains a trigger or view that itself contains an expression
"<column> AND 0".
FossilOrigin-Name: 908ff7fffa302255a74e2334ca3a1779ed43acb0268fce5a83a56fd16794dc88
2019-01-19 14:07:37 +00:00
dan
a86b20820d
Fix an infinite loop caused by a corrupt database in fts3. Also an undefined
...
left-shift in fts5.
FossilOrigin-Name: 55c5d72af9510e2f27c33544d804a58d4282b0efb384ead38484129ce91b574f
2019-01-18 21:03:15 +00:00
dan
451297752c
Fix problems causing undefined left-shift operations in the fts3 snippet()
...
function.
FossilOrigin-Name: b90dbaed3092236e97f9796fa63989a3648060e16189e1267c430f4a7e799fac
2019-01-18 19:26:48 +00:00
dan
0e14e98706
Fix a fairly obscure problem allowing an "ALTER TABLE RENAME col TO ..." statement to modify the schema in such a way as to break a reference within a trigger program.
...
FossilOrigin-Name: 64bec9e6214c6932fab5a3fb8c569ae14cd2d603bd0f8b26104815c3bb9d396a
2019-01-18 16:06:18 +00:00
drh
29c992cb04
Revamp the SrcList allocator routines to be methods of Parse instead of
...
being methods of the "sqlite3" object, so that they can leave better error
messages when the SrcList object grows too large.
FossilOrigin-Name: df08d472b090b212fb77ce2aae0e1ffe79ae5db4b1accf55e6fdb18e8b0a7098
2019-01-17 15:40:41 +00:00
drh
0ad7aa8182
Limit the size of SrcList objects to 200 entries (compile-time configurable
...
using -DSQLITE_MAX_SRCLIST=n). The maximum number of tables in a join has
always been 64, so this is not a real constraint on capability. Limiting the
size of a SrcList prevents DOS attacks (discovered by OSSFuzz) using crazy
nexted CTE joins.
FossilOrigin-Name: 7cac614d5df55eb092b863163483b6782b942b21bd15fd787576fef5619fa849
2019-01-17 14:34:46 +00:00
drh
04fcef00ee
Fix a corner-case for the logic that cause an insert of a NULL into an
...
INTEGER PRIMARY KEY column to be converted into a valid integer key,
when the NULL results from a CASE expression that lacks an ELSE clause.
FossilOrigin-Name: 9a425051e7ba59e797636f5cf32b5f6efafdb21c8d5300e099b8008b829c1439
2019-01-17 04:40:04 +00:00
dan
8b20e4a3eb
Fix a problem with fix [b4b57413].
...
FossilOrigin-Name: ca7b7aaed010ec67bec5355a9ac1d7f229d6d5f2ba2d796b76f5e908b1267688
2019-01-16 20:48:13 +00:00
dan
e011ee2830
Fix a problem in the fts3 matchinfo() function with corrupt database handling.
...
FossilOrigin-Name: 24ed5fb6aea30b098d2faf3cf9d638933e518657217e903239ffaa1e25d34f66
2019-01-16 19:44:09 +00:00
drh
375afb8bda
Fix a problem in the code generator for sorting results with SRT_EphemTab
...
and a LIMIT clause.
FossilOrigin-Name: 49fcde2f1f981ac0c75728bed3444e7c1d3167311db282d3375c96ce090b2210
2019-01-16 19:26:31 +00:00
dan
5e970a8f40
Fix a problem with renaming a column that is used as part of an ORDER BY on a
...
compound SELECT within a database view or trigger.
FossilOrigin-Name: b4b5741366578b25ec6e4c415ab8239215e53b1c900be613575f40a826cfccc9
2019-01-16 14:58:37 +00:00
dan
fb8ac325d7
Avoid a dangling pointer comparison when renaming a table that has a trigger
...
that itself contains a window function with an (illegal) column reference in a
FOLLOWING expression.
FossilOrigin-Name: d45bee36f2c1091a2d32c16ca8921bf4e7c9e40c46d0a36fbcb179ecfafcfbf0
2019-01-16 12:05:22 +00:00
dan
4ccb41fc99
Fix a memory leak that could occur in fts3 when handling a corrupt database.
...
FossilOrigin-Name: 65cebb06a0afcbcb4157c3d518a62ed188b1e90d9e9b69d88fece484bcb6e380
2019-01-16 11:38:06 +00:00
dan
dfb5c963a0
Fix a problem with ALTER TABLE and vector assignments in UPDATE statements
...
within triggers.
FossilOrigin-Name: cc6cd7531fee39b4c2a9f522f1089c1d79254a9e25acae59468322031f94c25a
2019-01-15 20:51:35 +00:00
dan
a783931794
Fix a buffer overread in fts3 caused by a corrupt record.
...
FossilOrigin-Name: e54efd60c20bbfc5d70ddb9e1dd6ffb68cbbcfa57b4f07cb104767ef08c1a559
2019-01-15 16:14:31 +00:00
dan
9c039d9f2e
Add scalar function "prefix_length()" to ext/misc/prefixes.c.
...
FossilOrigin-Name: 0bf1550507d9d3c8a41f8a50db3a59bf808f0a4e24637dc0905d35579305eca7
2019-01-14 20:44:00 +00:00
dan
9274ad898f
Fix a problem causing some Tcl test cases to fail with errors like "expected: [<multiline-whitespace>], got: []".
...
FossilOrigin-Name: 11b8a4cba747ca214fe3506caa3b711c87be4d55412754e673cc0603afefb086
2019-01-14 19:13:30 +00:00
dan
94ec92a1f7
Fix a problem with querying a corrupt fts3 database.
...
FossilOrigin-Name: 65e50706a017751d72d0f9c7f575955194977decd0acf13aaca90c3cb925f20e
2019-01-14 15:09:00 +00:00
dan
68c1f9ce9a
Have fts3 ignore empty sets of parenthesis if built with
...
SQLITE_ENABLE_FTS3_PARENTHESIS.
FossilOrigin-Name: c93c6b45a317c40eb5c0abb6620d21f5821a601632c791e11e5ce62e039eccda
2019-01-14 11:56:13 +00:00
drh
b10a50e7f8
In dbfuzz2, avoid using a malloc in the LLVMFuzzerInitialize() initializer
...
routine, so that no memory leaks are reported. Also, show the version of
SQLite being used when the -v option is on.
FossilOrigin-Name: 824f93246988ffa213bbd41a7de08886999b1a8ae00fdf6b9767acb6e3ec6a1f
2019-01-13 20:23:34 +00:00
dan
b4439eef10
Fix a problem with corrupt database handling in the fts3 matchinfo() function.
...
FossilOrigin-Name: 703646b1b5c84d550fe0d74e399c0eeb729da1d263e4693320f69e6509678985
2019-01-12 14:58:35 +00:00
drh
a2dc7494ef
Indicate that the database may be corrupt in the fts3corrupt4.test test script.
...
FossilOrigin-Name: 473626d5579dd19023abccaf7c1822ac0c883a0b98904837ea096fa16e4f41c4
2019-01-12 00:07:48 +00:00
dan
90294961da
Fix a segfault in fts3 prompted by a corrupted database.
...
FossilOrigin-Name: 2d7b1d1d41ff69d5465fcb861420816ecb066c25a9015eefdab5fae15a2e1c9f
2019-01-11 21:34:25 +00:00
dan
e6370e9c29
Fix a problem handling a negative value in the "number-of-pages" database
...
header field. Also a problem with running "REINDEX tbl" against a virtual
table for which the SQL passed to sqlite3_declare_vtab() contains PRIMARY KEY
or UNIQUE constraints.
FossilOrigin-Name: 556dd8922f65af93084ee725c638b8dc696b611dd508c212a3b507d6ca474031
2019-01-11 17:41:23 +00:00
drh
2a58dbde30
Improved detection of cell corruption in sqlite3VdbeRecordCompareWithSkip().
...
FossilOrigin-Name: fa47f4c6589c431cf678560ac33dea6b695052012bea2096b2c92869ed51c688
2019-01-11 16:44:16 +00:00
drh
1972c8cf07
Add the --vdbe-debug command-line option to dbfuzz2.
...
FossilOrigin-Name: 599b4df43c64ce295517c804b6bb4c3ab77d77e0ba585dc0657274f55489a3b1
2019-01-11 14:38:47 +00:00
drh
26391eeefe
Add the "dbfuzz2" target to main.mk. Remove an unused local variable
...
from dbfuzz2.c.
FossilOrigin-Name: 05c7609cfd02f49114876267d7090f4e0ea2467f3aa7c65019c5986ec8f60a87
2019-01-11 14:22:33 +00:00
drh
e65b9c6a5e
Separate makefile targets for "dbfuzz2", "dbfuzz2-asan", and "dbfuzz2-msan".
...
FossilOrigin-Name: ea119641a7edcd0e1ec14371d93e35f860971888bd98cb0019253358a2ef123b
2019-01-11 13:03:06 +00:00
drh
69ab18d213
More aggressive early detection of orphaned and malformed autoindexes when
...
parsing the schema.
FossilOrigin-Name: 10f9e39d6ed2413fa9abc6c82da3ed48f32a42b6190b6219fca7faf850d05113
2019-01-10 14:33:15 +00:00
drh
5f913ecb62
Use the new SQLITE_IDXTYPE_IPK values (3) on Index.idxType to indicate the
...
fake INTEGER PRIMARY KEY index used during query planning.
FossilOrigin-Name: e22d2f905fe840bea51b536ebedc9b637190ea0a37f16559668d99a61e971411
2019-01-10 13:56:08 +00:00
drh
885eeb676b
Enhance the ALTER TABLE RENAME COLUMN feature so that it works on tables
...
that have redundant UNIQUE and/or PRIMARY KEY constraints.
Fix for ticket [bc8d94f0fbd633fd9a051e3]
FossilOrigin-Name: f09aa3248e2b4a32ff5b5d37084cb2a27445322cb06a3354cef723f4f0b2cd34
2019-01-09 02:02:24 +00:00
drh
b042d92128
Give a meaningful error on an attempt to use UPSERT on a virtual table,
...
rather than simply not working.
FossilOrigin-Name: fa98748f956cff95fcfda3a513cea4df27aa573ae795a6855c40bfeca661d0b2
2019-01-04 23:39:37 +00:00
drh
48cd0f28c5
Remove debugging pragmas accidently left in by a prior change.
...
FossilOrigin-Name: 26275fc7e89eb2542a65d01fd271cef016a4a1815bc3845c599cf2f4fbf7513d
2019-01-04 12:46:01 +00:00
drh
1baae57a72
Fix the csv01.test module so that it works on systems with \r\n line endings.
...
FossilOrigin-Name: 36eaf5a5e51b20699328aae67c2bfd325f81bea342e2b167fddd859a50a26e28
2019-01-03 16:03:48 +00:00
drh
94e02d9c2c
Fix the shmlock.test script so that it works with the Windows restriction
...
that UnlockFile must exactly correspond to a prior LockFile.
FossilOrigin-Name: df939c89fa90b7f9ccf961027ca4eca4f987c49eabf530b5719a83e5ab0d346d
2019-01-03 16:00:23 +00:00
dan
ca076bf26e
Add another test case to vacuum-into.test.
...
FossilOrigin-Name: 0465d2fc0d3f8beaa1b6b0bd7bd51d69a524f30d889c9402e7d02cc06164a310
2019-01-02 16:01:59 +00:00
dan
992e927281
Add test cases for commit [6c6fb1c6].
...
FossilOrigin-Name: 3961995cb56b43f1753c53fc869edf336f1c17ec994d67dc74e44e8e02493894
2019-01-02 15:27:27 +00:00
drh
ee751fab4c
Raise an error if the argument to VACUUM INTO is an identifier.
...
FossilOrigin-Name: 6c6fb1c6ea452c70b56fd4ac796affebee21512adba0455ae81c291b715f544f
2019-01-02 14:34:46 +00:00
dan
97c8cb3ed8
Ensure that when a new cursor is opened by OP_OpenDup, any existing cursor
...
with the same id opened by a previous OP_OpenDup is closed first.
FossilOrigin-Name: 5c188361a91407805c0feb4bf6d3214522ce3e55013efcf63a4613ecd416bcbc
2019-01-01 18:00:17 +00:00
drh
0de6efe59e
Merge enhancements and bug fixes from trunk.
...
FossilOrigin-Name: 9fb646f29c05bca5f677a2c7c4f45c36bfe0a0c6a88cb7968b4a0459bdd63bb2
2018-12-31 18:30:41 +00:00
drh
4afdfa195b
Fix the OP_OpenEphemeral opcode in the bytecode engine so that if it is called
...
a second or subsequent time, it merely clears the existing table rather than
creating a new one. Proposed fix for ticket [d0866b26f83e9c55e30de0821f5d].
FossilOrigin-Name: 4678cb1044f0b4dc813e48f3bd0f85240a66e2ecf8763280d66726cc031c93a7
2018-12-31 16:36:42 +00:00
drh
64919e9b00
Merge patches and enhancements from trunk.
...
FossilOrigin-Name: da53f3d3ff26cc32d3a5ac788b6785baa3d1688e50d9354025a3130dc7e71a38
2018-12-28 19:23:20 +00:00
dan
1d4b16405b
Fix a problem causing the sqlite_master entry corresponding to a virtual table
...
to be removed by a DROP TABLE even if the call to the vtabs xDestroy() method
failed.
FossilOrigin-Name: 0140f6dbfbea93eadcd7f727d84064a0c0d1f0806dbe3e5ef1017da603157e3b
2018-12-28 17:45:08 +00:00
drh
aa243aa7cd
Modify the btree02.test module so that it does not depend on whether TCL
...
interprets a value as a string or as an integer.
FossilOrigin-Name: d9e4f9574659c6285deba3dca68eca9989e615971cea3a901ffcda12fb4ee36f
2018-12-27 16:55:01 +00:00
drh
bdefaf08ee
Fix a problem in which nested CTEs with the same table name trick the
...
code generator into thinking they are the same CTE, which then tries to
use the manifest them both into the same transient table.
FossilOrigin-Name: 202dd033019dd27428e3cc5f6e164c95b37efe39e2753515112b201ddefca67b
2018-12-27 02:16:01 +00:00
dan
f6febee0e2
Update the coverage-wal permutation to cover branches enabled by
...
SQLITE_ENABLE_SNAPSHOT.
FossilOrigin-Name: 6821c61f1d71be2be7f867e59fd94582a1eaf45a4d1fb88be995807a77cc22ea
2018-12-26 18:34:56 +00:00
dan
89dec01e48
Add a few more test cases to walvfs.test.
...
FossilOrigin-Name: 14a64df36efe0dc36795311d58385f9c65dc465b214059e07c2ee6b95ea99c87
2018-12-26 17:49:57 +00:00
dan
d8f3b4c320
Fix a problem with corrupt fts3 database detection introduced by [95a9a39f].
...
FossilOrigin-Name: c80bb15b44e9b6a3c0c5a49d5e93e66376c3520ecefc1db7425c8a7e09d3eade
2018-12-26 14:15:09 +00:00
drh
8625221444
Fix a problem with the CSV extension when it uses the "header" option on
...
a real file.
FossilOrigin-Name: 7acaed08f946633fca3ab8434dd6349ea6f1bac4fd9ec21f476db013ee06de30
2018-12-26 12:50:47 +00:00
drh
bd462bcc10
Improvements to EXPLAIN QUERY PLAN formatting. The MULTI-INDEX OR now shows
...
a separate "INDEX" subtree for each index. SCALAR SUBQUERY entries provide
a subquery number that is related back to the .selecttrace output.
FossilOrigin-Name: 7153552bac51295c56a1c42ca79d57195851e232509f9e9610375692f48c7e86
2018-12-24 20:21:06 +00:00
dan
92107a38dc
Add a few more test cases to walfault2.test and walvfs.test.
...
FossilOrigin-Name: 3873941c4fb9aa2d0de1129722c5fcdf2be1ea261677d4841ed99f896c778459
2018-12-24 20:00:27 +00:00
dan
76e4990b25
Add test cases to test file walvfs.test.
...
FossilOrigin-Name: d697f6f3ca47350dad30feb529914fc5254fa662ece783408eea963d912918c1
2018-12-24 18:51:13 +00:00
dan
94e95ea46e
Copy some extra test infrastructure from the mutexfree-shmlock branch to trunk.
...
FossilOrigin-Name: 883337ffdb434b6856ceaada121c0be67e2fdec7b447675f45e85568ef28d7d9
2018-12-24 15:22:47 +00:00
drh
5198ff5767
Do not generate subroutines for non-static SELECT and EXISTS expressions.
...
Fix up some test cases to account for the minor changes in EXPLAIN QUERY PLAN
output.
FossilOrigin-Name: 06de44ec9e173992ca9afb89dd2b4e40d2a7e35512c7959603cdceb606f5dfbd
2018-12-24 12:09:47 +00:00
dan
8d69a58119
Improve the coverage of wal.c provided by the "coverage-wal" test permutation.
...
FossilOrigin-Name: 6231485114eb07b258cd0e6e163ca05f7e9cf5664e071808fcb1329b33e4c4f5
2018-12-22 20:32:28 +00:00
drh
3a07548b0d
Remove unnecessary whitespace from testcase result strings.
...
FossilOrigin-Name: ad70f03ceda74163903d247a975666b35fae722a27c48dd3efd31c1164b5627e
2018-12-22 15:46:23 +00:00
dan
583521fbb0
Fix cut-and-paste error in test file fts4umlaut.test.
...
FossilOrigin-Name: cad5da1bf5f65ad87d97b72e9a84081fde455ba4085e79943fdf6c0144b1ef83
2018-12-22 07:16:42 +00:00
drh
9bfb079409
Do not all REPLACE to sneak a NULL value into a NOT NULL column. Detect that
...
situation and ABORT instead. Fix for ticket [e6f1f2e34dceeb1ed61531c7e98].
FossilOrigin-Name: db8d1d12f5c1673404b2afb5426d5ea3afe3b69d01f8f2bc47ffdf70684fdf24
2018-12-22 01:13:25 +00:00
dan
1ea0443c2d
Add new sqlite3_prepare_v3() flag SQLITE_PREPARE_NO_VTAB, for preparing
...
statements that are not allowed to use any virtual tables. Use this to prevent
circular references in triggers on virtual table shadow tables from causing
resource leaks.
FossilOrigin-Name: 25666e3d03950caf753295cdb55df162e07dbcf6840b05875c6e0b127c469ecb
2018-12-21 19:29:11 +00:00
drh
afdc9e23fc
In FTS3, avoid calling memcpy() with a NULL source pointer, even if the
...
transfer amount is zero bytes.
FossilOrigin-Name: 1abb83d29a06308c96bea379311b390240347c5f81824749348d18ad75840c96
2018-12-21 18:51:27 +00:00
drh
8bcc686614
The fts4umlaut.test module requires FTS5, so do not try to run it without that
...
module.
FossilOrigin-Name: dee3ae900129d39d69aff3ec6187376be100803ee6170bbf39529f37b4253260
2018-12-21 18:50:43 +00:00
dan
e1e28ec35c
Remove an assert() that could fail on a corrupt db from fts3_write.c.
...
FossilOrigin-Name: 4cdcda408a4edcd2845584ddef64f0efdd2b4cc030afbc05fc2b8b555c69d3f6
2018-12-21 11:53:43 +00:00
drh
94f4f873b2
Do not set the Cursor.seekOp test variable in the OP_NotExists opcode.
...
This is a change to test logic only and does not affect deliverable builds.
FossilOrigin-Name: 98f343077887c4d3fc2ca3bbc7f20c80ec37b0e521d70af9c986ab80bb2c7903
2018-12-20 22:08:32 +00:00
dan
e46201e264
Fix a bug in the code that detects self-referencing rows as part of foreign
...
key processing. Fix for [50d2a6c2].
FossilOrigin-Name: 16fff05347f42fe9fa0f3150290b98b59a9bb921e49dc07ca397aa1de7a7e17d
2018-12-20 17:32:33 +00:00
dan
16dd3985f0
Fix a segfault caused by using the RAISE function incorrectly (library now
...
returns an error instead of crashing).
FossilOrigin-Name: ddf06db702761d663119d508afe21d7dfebe963d576bb42fc2f2024205ab86f8
2018-12-20 15:04:38 +00:00
dan
397a78d4a1
In defensive mode, do not allow shadow tables to be renamed using ALTER TABLE.
...
FossilOrigin-Name: 23e200da5cfbde0798e67cd9e016e4a1cd73b67981e1af841493fcd123d8f547
2018-12-18 20:31:14 +00:00
dan
fffaf23013
When saving the position of a cursor at the b-tree layer, allocate a few extra
...
bytes at the end of the buffer used to save the key. Otherwise, if the key is
corrupt, the code that restores the cursor position may overread the buffer by a
little.
FossilOrigin-Name: 160b1e31c0f27257c06c2987af9ec3a64abfacb2150325b72e8ccd3d217b5baa
2018-12-14 13:18:35 +00:00
dan
7525b87b6c
Posible fix for [d96eba87].
...
FossilOrigin-Name: 89a25abfcd069aebdf817890e5c27f46de3000fb858ae01029e4528f9d677567
2018-12-14 08:40:11 +00:00
drh
e45985b595
Fix a bug in the custom in-memory VFS used by fuzzcheck. This bug masks
...
other bugs that should have caused some existing fuzzdata7.db entries to
fail, and so this fix is initially on a branch until those other bugs can
be repaired.
FossilOrigin-Name: e0994e99955cf11f23dba029b5ed7f150f467887558848d5f03510e2fb5855f9
2018-12-14 02:29:56 +00:00
drh
6301c43f23
dbfuzz2 found a NEVER() that is sometimes true.
...
FossilOrigin-Name: 1201615cbbd3070158ea5fab3d2c8c95f41b25d6da096a44cb9257a7b7405efc
2018-12-13 21:52:18 +00:00
drh
8061ad8abd
Add extra tests for database corruption inside the defragmentPage() routine,
...
as dbfuzz2 has found ways for corruption to leak into that point. Add test
cases in fuzzdata7.db.
FossilOrigin-Name: 997b65117f8c12dba5fb85434fde9765cdb0d2a49cc3e31979abba3e21350086
2018-12-13 21:11:22 +00:00
drh
1641f11f4c
Fix a problem in sqlite3BtreeDelete() in which deleting an entry from a
...
corrupt database can leave a btree page with zero cells.
FossilOrigin-Name: 682053d1e603c21b8085c39db618a39b23ec8d2c4d822fd19634db0e03038ea2
2018-12-13 21:05:45 +00:00
drh
f7e74904cc
Add the "decode_hexdb" TCL command to testfixture. Add the dbfuzz001.test
...
module to demonstration how to use decode_hexdb to deserialize a dbtotxt
database description for use in a corruption test.
FossilOrigin-Name: 1f583c53f3b7318c69f6e235934d97ef9493278feeab0837217076d7d071c35b
2018-12-13 20:49:43 +00:00
drh
5881dfea2c
New database corruption test cases discovered by dbfuzz2. The new cases
...
have been added to test/fuzzdata7.db, but have not yet all been fixed,
so tests will not currently pass.
FossilOrigin-Name: b4210d320c6426d2838d4cc08709fdfd015c1c95fcad9a5f9e8fd390c23b9fad
2018-12-13 03:36:13 +00:00
drh
cb0e04f929
Fix another problem found by Matthew Denton's new fuzzer.
...
FossilOrigin-Name: 2b690dbdffe144bd69ca0aa291c230faf3d9d73f7a2985d50f016fe54003f9a9
2018-12-12 21:34:17 +00:00
drh
9042ff214b
Fix issues with the new normalizer.
...
FossilOrigin-Name: 057d7d40c56b7416a59a79cb627b2b3e5837eca2d6dbcb50127baaadf1941f51
2018-12-10 16:49:33 +00:00
drh
4d342827d6
Fix the shell1.test test for the new format of the .backup command.
...
FossilOrigin-Name: 9748d7995bc1dd632d66d2d326048d50e29c6f5e6993d5a6294d14421d2cb72f
2018-12-10 00:41:28 +00:00
drh
2134eb5721
Merge fixes from trunk.
...
FossilOrigin-Name: ab1e58fac9e3f9d7d90cefb39f8f145d211d38ec0cb393208c4531cc646056c1
2018-12-10 00:40:43 +00:00
drh
ce706c2cf3
New test case for ticket [1d958d90596593a77420e59].
...
FossilOrigin-Name: b7bf3c9832bde26b359f4d58ebcf7788c500586d311387d022192ed65a126252
2018-12-09 18:55:05 +00:00
drh
d4a4a36171
Do not use a partial index as a table scan in an IN operator.
...
Fix for ticket [1d958d90596593a77420e59].
FossilOrigin-Name: 15bc915dd7ae25bfdfbe357c3792db3639799e4d121c6b5b24297af2d6d7129e
2018-12-08 20:30:31 +00:00
drh
2f6239ed4e
Allow the INTO clause of VACUUM to be a text-valued expression.
...
FossilOrigin-Name: af172b53b46759f491f522356e14c5e2374d3f25ec70fbc1e100cadded8f9b22
2018-12-08 00:43:08 +00:00
drh
7464f578ed
Do not allow VACUUM INTO into a file that already exists.
...
FossilOrigin-Name: 92f70e0fa3c9de7fde046f11cc0a7c2800511bb5ace8e68c845133931607616e
2018-12-07 23:48:41 +00:00
drh
893bd3751b
Fix the sqlite3_normalized_sql() interface so that it renders
...
double-quoted string literals as "?".
FossilOrigin-Name: 0d8e150434bbd179696f1ffe71d1e06cb3d43e6468496c7e481fca8486387bad
2018-12-07 16:32:11 +00:00
drh
62a88294e8
Fix dbfuzz2.c so that it works with -DSQLITE_OMIT_INIT
...
FossilOrigin-Name: 9ad796a8822f1b7e1e99b73c2cc5be59dbfd85e9c27f3e795c29a2c002c611d1
2018-12-07 03:01:07 +00:00
drh
bb383df7c6
New test case that still hits an assertion fault, just to prove that the
...
previous checkin merely made the problem more obscure and did not completely
fix it.
FossilOrigin-Name: a9a3b532643b5f106509bb29c3e6bc9d41ec5b2da5a0cd4067898f376eb626a2
2018-12-06 19:56:20 +00:00
drh
11df7d2839
Simplify the query flattener so that it does not duplicate the WHERE clause
...
of subquery that is being incorporated into the outer query - copies it
directly. This is more efficient. And it also fixes the specific test case
show for ticket [f09fcd17810f65f71789525] but it does not resolve the more
general problem that sqlite3ExprDup() does not correctly duplicate expressions
that contain subqueries with window functions.
FossilOrigin-Name: f1b18d44ff855573542c1947a42d4025dff54cacc13dac14d044521762ea9736
2018-12-06 19:15:36 +00:00
drh
253a6af532
The sqlite3_normalized_sql() interface should not be transforming quoted
...
identifier names into wildcards. Fix this, and at the same time simplify
the code substantially.
FossilOrigin-Name: e8540377ec66fa5f9ae3c93bedb5c094057698199c37fc211f7ea95429e815e4
2018-12-05 23:45:46 +00:00
drh
d4a4dd6ebc
Fix an imbalanced lock problem in sqlite3Normalize() introduced by the
...
simplification in [94ea6379178e3ff6a].
FossilOrigin-Name: f69624373e33c4d370a9264a317ffdb0adbce967a950f243de2b41161a8c7ded
2018-12-05 21:55:39 +00:00
dan
ea41251eb0
Ensure that ALTER TABLE modifies table and column names embedded in WITH
...
clauses that are part of views and triggers.
FossilOrigin-Name: f44bc7a8b3fac82aa5598e9bdaf65ea4dd3c331cf90c1d5ba26ff1698e92c230
2018-12-05 13:49:04 +00:00
drh
707821ff72
Enhance the sqlite3_normalize_sql() interface so that it works even if the
...
prepared statement was not initially compiled using
SQLITE_PREPARE_NORMALIZED. Enhance the ".trace" command in the CLI so that
it is able to access the full scope of functionality provided by
sqlite3_trace_v2() and in particular so that it is able to show normalized
SQL output using the newly enhanced sqlite3_normalize_sql() interface.
FossilOrigin-Name: 7da617e97eb905cb009c47403786682b911e32a630f266e1c53ea72836fc88b5
2018-12-05 13:39:06 +00:00
dan
e89feee5c3
Add the "remove_diacritics=2" option to the unicode61 tokenizer in both FTS5
...
and FTS3/4.
FossilOrigin-Name: 06177f3f114b5d804b84c27ac843740282e2176fdf0f7a999feda0e1b624adec
2018-12-03 16:14:49 +00:00
drh
4a5cff73a7
Fix a parser bug in the use of parentheses around table-valued functions.
...
FossilOrigin-Name: 58a51123d1a6381cc67d3c64ba3468ec5a92c299ad6fd86de0b843d0ffafb846
2018-12-03 01:47:41 +00:00
dan
3a85a298c9
Update incrvacuum.test so that it works with builds that do not support mmap().
...
FossilOrigin-Name: 8eb62fd5fa9adb88de51aa812270dbdb32ee5cacd636d200e658c507a14a035b
2018-11-29 01:20:51 +00:00
dan
909f78cbd8
Update some test cases to account for SQLITE_OMIT_VIRTUAL_TABLE builds.
...
FossilOrigin-Name: b53a9a3dc6b0422a102b245451769b0cd8c0d67090fefabf7cb3a65137a73771
2018-11-28 11:49:46 +00:00
dan
1af016b7f4
Remove -DSQLITE_USER_AUTHENTICATION from the "Unlock-Notify" configuration.
...
Create a dedicated "User-Auth" configuration for testing this feature.
FossilOrigin-Name: 8c41024fbba8c70b671c63a5719c6757f0e6dc731ce52caa755edbb8e21d6944
2018-11-28 08:09:08 +00:00
dan
63e50b9ed6
Fix a failing assert() in sqlite3ResetAllSchemasOfConnection().
...
FossilOrigin-Name: 0ea049f342d11c676e148239e45d252164081362e921a4beb735d6899eb77344
2018-11-27 19:47:55 +00:00
drh
fcee090746
Improvements to two cases in pragma4.test.
...
FossilOrigin-Name: 3c893d9bcc34c391505b08cc35808dd3abddf3c5d952798334c296547bcae6a6
2018-11-27 17:02:38 +00:00
drh
60ce5d3135
Add a simple test case for Lemon. Always include assert.h in the
...
Lemon-generated parser.
FossilOrigin-Name: 9c9c46dcbe92aeabe3d5675bb69681b6dfd53798bc67e6a2ceba67ed3c4fb0af
2018-11-27 14:34:33 +00:00
drh
eea8eb6d04
Do not allow direct access to internal-use SQL functions such as
...
sqlite_rename_column() and sqlite3_rename_table() except when the
new SQLITE_TESTCTRL_INTERNAL_FUNCTIONS flag is set.
FossilOrigin-Name: 6e1330545e7b74fe5f1f20751a3425e2788441485fc07fcb7626e448c72027ce
2018-11-26 18:09:15 +00:00
drh
eafb9a0ae5
Make the winTruncate() method of the windows VFS be a no-op if there are
...
outstanding references to the memory-mapped pages. Otherwise, memory might
be deleted out from under those references when the file is remapped during
the truncate operation.
FossilOrigin-Name: ffce4aac18dacbf2a3112ae2ab56c7db20cb164f179683d90a66ef38f4a98f2b
2018-11-24 17:46:07 +00:00
dan
09236755ee
Fix a problem reading from temp databases in SQLITE_DIRECT_OVERFLOW_READ
...
builds.
FossilOrigin-Name: 81629ba91475938b6ad528e7b1dbef4ad22239782bb2e9c1bb59413aba11da87
2018-11-22 19:10:14 +00:00
drh
8055a3ead4
Improvements to the ossfuzz.c fuzz-testing module so that it works with
...
-DSQLITE_OMIT_PROGRESS_CALLBACK and with -DSQLITE_OMIT_INIT.
FossilOrigin-Name: d343f7d6b05865c282eb73a0e39dc396f2927982af45b3d045de03ef73715693
2018-11-21 14:27:34 +00:00
dan
3c425484a7
Fix problems in pragma.c causing some PRAGMA statements to test the wrong
...
schema-cookie before proceeding, or to try to open cursors on the wrong
database ("PRAGMA foreign_key_check" only).
FossilOrigin-Name: 6982f52f579d20b8a2965373731d41622bda7f09fbf82cc005bb378321829f4c
2018-11-20 18:09:59 +00:00
drh
2d588b8c08
Fix the regexp used to recognize libdl errors on OS-X.
...
FossilOrigin-Name: 1740025307531a52e4f0641e2e74dc14715130858f2e9236be13b66924f00220
2018-11-17 14:59:35 +00:00
dan
8e2d4ad30c
Fix a problem in test script e_fkey.test.
...
FossilOrigin-Name: acfd0a05a8957728c1f0eb936f4121ce26f291f20dd583bd57ce2bb271617d3f
2018-11-17 13:08:07 +00:00
drh
d905113e97
Fix a test case so that it works on windows.
...
FossilOrigin-Name: 2d92d25fae5d9757866a0d0b30427b50d635e9b05e12df9464f095419fd7ef3e
2018-11-16 20:50:53 +00:00
drh
32dcc847b5
Enhance the xBestIndex interface of virtual table so that if the xBestIndex
...
method returns SQLITE_CONSTRAINT then that particular combination of
constraints is considered unusable and does not participate further in
query planning.
FossilOrigin-Name: 684013cef6bfcfd920a4aec645df9f5d41ace8b34e75fca61759c1b4f82cc89e
2018-11-16 13:56:15 +00:00
dan
cbfaa076d7
Fix a problem with virtual table "fsdir" and some join queries.
...
FossilOrigin-Name: 7fffcee0fc3fe8d036f0d93ec17673992c3edcf2bb454dc90d80142435b37946
2018-11-16 08:36:15 +00:00
drh
6f147c54ef
Improvements to the CSV virtual table.
...
FossilOrigin-Name: 0406ecbbe75513e342040b71fdd342462222dbb3820486b5f745d7865805c00b
2018-11-16 01:42:26 +00:00
drh
b1b4a3dbca
New fuzztest cases.
...
FossilOrigin-Name: e8316ba47f566c8d2cb48d9d54308e8869743ef39d35b662a8764b0479aed9e0
2018-11-15 13:51:48 +00:00
drh
1ca9a8b9df
Merge fixes from trunk.
...
FossilOrigin-Name: bf88efcec40036e0805940ff6371643dbc518442457d2bc18c711753607ae36c
2018-11-10 03:47:40 +00:00
dan
b430701823
When a table is renamed using "ALTER TABLE RENAME TO", update any REFERENCES
...
clauses that refer to the table, unless "PRAGMA legacy_alter_table" is true
and "PRAGMA foreign_keys" is set to false (i.e. so that when "PRAGMA
legacy_alter_table" is set behaviour is still compatible with versions 3.24
and earlier).
FossilOrigin-Name: ae9638e9c0ad0c366f93c88a850f6b4cc86881e9f3f9f1e39574d9d83ddd8a6a
2018-11-09 20:04:05 +00:00
drh
0b57d312b7
Fix for ticket [787fa716be3a7f650cac]
...
FossilOrigin-Name: 531eca6104e41e4301fa2cf58bb8fec811da31e151a0f766c93aece5521d235b
2018-11-09 14:17:51 +00:00
drh
b7c2cf0aaf
More test-case adjustments for defensive mode.
...
FossilOrigin-Name: 911e8a17a3810cd7042e91a32aba80dc3d6be88320c208e48f7bcee8b22a0ff2
2018-11-07 14:41:08 +00:00
drh
6b758e1d96
Merge the permutations fix from trunk.
...
FossilOrigin-Name: b753d849fe0524e14ae9367a47e29be76332fafb77bfe13e266aeef1ef6742ce
2018-11-07 13:41:27 +00:00
dan
7d0fa14c03
Partially revert [3e1a2f661], as some test scripts require separate $presql
...
and $dbconfig variables.
FossilOrigin-Name: cbf85284beb60d068b446c52f000d694a810d4de9096ad2951523a4c88e7334c
2018-11-07 11:56:23 +00:00
drh
6ab91a7a7a
Add the SQLITE_DEFAULT_DEFENSIVE compile-time option. Fix up test cases
...
so that they work with DEFENSIVE enabled.
FossilOrigin-Name: 3212733cb6d1a59516d67a86df7c7b1d2456a1b2e5d7080c26b0e87b2609c65d
2018-11-07 02:17:01 +00:00
drh
0f0d3ddf71
Enable DEFENSIVE mode by default for tests. This requires lots of case of
...
turning DEFENSIVE off in order to dodgy things to the database for testing
purposes. No all of those cases are yet handled, so "make test" does not run
to completion.
FossilOrigin-Name: a1d6c6712c3304fd736077432c8c180692cf7d79be7f3a073510b6dab0eb951f
2018-11-06 19:26:04 +00:00
drh
aef15e74c8
Turn on defensive mode for running test scripts. Does not yet work.
...
FossilOrigin-Name: 1c1d24edbb732f2a2002a741c7a7afdd010b67e1b5e6d90ff36c6428897e7612
2018-11-06 15:57:59 +00:00
drh
2d13f6016b
Add the SQLITE_DBCONFIG_DEFENSIVE flag.
...
FossilOrigin-Name: 11d98414eac467affb0b3cf0c7e5cc3d43184fc2b6e7e898bb5277b51ea9e1fa
2018-11-05 19:37:30 +00:00
drh
9196c81406
Eponymous virtual tables appear to exist in all schemas. This is an alternative
...
and improved fix to the eponymous virtual table in trigger problem that
was previously addressed by checkin [1fa74930ab56171e].
FossilOrigin-Name: b8d35c4a7c99ce3753761e5b81269d52c3c910c603fa70b72549883ba68bc485
2018-11-05 16:38:10 +00:00
drh
383bb4fa62
Disable the IS NOT NULL optimization when the IS NOT NULL operator is part
...
of the ON clause of a LEFT JOIN. Fix for ticket [65eb38f6e46de8c75e188a17ec].
FossilOrigin-Name: af39661e60f562b9eb10343fd83e8fe21be4d7276111e7853c1179a24cab09ce
2018-11-05 07:53:17 +00:00
drh
0f1c2eb5f2
Correct the internal logic for SQLITE_DBCONFIG_DEFENSIVE.
...
FossilOrigin-Name: 76094345821246c887a31a234b339d03a78eddbb9fab33b06c3c20797c038349
2018-11-03 17:31:48 +00:00
dan
29d77dc450
Add extra defenses against strategically corrupt databases to fts3/4.
...
FossilOrigin-Name: d44318f59044162e229a444582692e9788f17b5c404b4eb702f4c2114b22fefe
2018-11-03 16:51:30 +00:00
drh
c6e519f335
Fix a assert() in the query planner that can arise when doing row-value
...
operations on a PRIMARY KEY that contains duplicate columns.
Ticket [1a84668dcfdebaf12415d].
FossilOrigin-Name: dcb8c73594ea6b12bad98dc883a585d3e6b925c2ead267dc40332b3d266db5e8
2018-11-03 13:11:24 +00:00
drh
147ad061f6
Enhance triggers so that they can use table-valued-functions that exist in
...
schemas outside of the schema in which the trigger is defined.
FossilOrigin-Name: 1fa74930ab56171e2e840d4a5b259abafb0ad1e0320fc3030066570a6dd10002
2018-11-02 17:38:39 +00:00
drh
a60c63013e
Add support for the SQLITE_PREPARE_NORMALIZED flag and the
...
sqlite3_normalized_sql() when compiling with SQLITE_ENABLE_NORMALIZE.
Also remove unnecessary whitespace from Makefiles.
FossilOrigin-Name: 790ea39a6585ea9f4dad9e132e1fb0447ac1558f728196580d2c3edee84823f7
2018-10-31 19:01:13 +00:00
drh
f8181eaa20
Tweaks to the test_intarray documentation and tests.
...
FossilOrigin-Name: 7107f0dacf4467430d1ca157cb848dde984e48e529e7d67a88b7594b0f8159c9
2018-10-31 18:24:29 +00:00
drh
c985c2822c
Add new fuzzer cases generated by dbfuzz2.
...
FossilOrigin-Name: 79fdad8b42869100845eed36224602452486d0166c18cec7d343040fdac7379e
2018-10-30 23:45:18 +00:00
drh
ad9bfa5e07
Improvements to the -fsanitize=fuzzer based database file fuzzer.
...
(Cherrypick from the rubust-against-damaged-db branch.)
FossilOrigin-Name: 3cc01a0eaf54e3d5adf206825cfcab15edf73bd5aea10dfc497efd78071a17d0
2018-10-30 15:20:35 +00:00
mistachkin
8bee11a41e
Add the sqlite3_normalized_sql() API.
...
FossilOrigin-Name: 592b66e8058dd03a056a036e2606247c9efdb06d15eebe9bcc455f7f55e30ae6
2018-10-29 17:53:23 +00:00
drh
d811d844cd
Improvements to the dbfuzz2.c test module.
...
FossilOrigin-Name: d60eff493b875366981c5a25000bb65cde9f6e628192914910790acc562c17b9
2018-10-27 21:06:44 +00:00
drh
65da285e6a
Initial code for a fuzzing tool on database file that works with the
...
-fsanitize=fuzzer option of clang.
FossilOrigin-Name: 90d12094d36957fbded71545add8a5dc206798fdacc17d4d161d715569a7f991
2018-10-27 00:47:33 +00:00
dan
f689400dc7
Prevent an == constraint specified using the table-valued-function argument
...
syntax from being used to optimize any scan not related to the virtual table
for which it was specified as an argument.
FossilOrigin-Name: 4d46685f282409f7154be288719cbea4b743d7ea5315a55a91462003497469f7
2018-10-26 15:36:53 +00:00
drh
8e5bfedd22
In the WHERE-constraint propagation optimization, if there are duplicate
...
constraint, make sure only one of them propagates. Proposed fix for
ticket [cf5ed20fc8621b165].
FossilOrigin-Name: 5d5b596f152bb2781011a05f75f9e200774d4f69d648ef68de577b4ace973e07
2018-10-25 14:15:37 +00:00
dan
0f5f54062c
Fix a problem with using window functions in compound (UNION, INTERSECT etc.)
...
queries.
FossilOrigin-Name: 059ff53a46c7f1e4bf3e7dc558312beef67826c2753e2ab7e4e7df498b37b617
2018-10-23 13:48:19 +00:00
drh
bafad06139
Test case modifications to support SEE.
...
FossilOrigin-Name: 02b6f8f2778c371130c512e980c3db07c7e76dcf7dd92a878b86e4b6a47ca307
2018-10-12 15:01:56 +00:00
drh
b6c4d59e89
In the unix VFS, fix the heap shm allocator (used for unix-excl)
...
so that it works even on systems where the page size is larger than 32KB.
FossilOrigin-Name: 7fbb083c5cf0948af3624b7538ffa086f77de27a3e84a7039ae7d6574f1a3a54
2018-10-11 02:39:11 +00:00
dan
07052d5535
Add test cases and assert() statements to ensure that the authorizer is being
...
called as expected from within ALTER TABLE.
FossilOrigin-Name: ff10d2c7de430c88167b1e6e4f5307eee5d69e22c8d24b2ef4fcb3aea25a92e1
2018-10-06 13:46:22 +00:00
drh
bfbf7d9daa
Test case for PRAGMA table_xinfo.
...
FossilOrigin-Name: 7694b9bc3003db6ba0b41c5029c8f7b84c07724e7a518e835e98b3c46e4ea227
2018-10-01 21:36:38 +00:00
dan
5351e884aa
Fix a problem with ALTER TABLE commands when the schema features an INSTEAD of
...
trigger that uses NEW.* or OLD.*.
FossilOrigin-Name: c52f457e56eb9d573eb67093731eb231aaf6fd6dbdc397e6f948b82736fbe3ab
2018-10-01 07:04:12 +00:00
drh
ca9a5faf70
Fix test cases so that they work with ICU.
...
FossilOrigin-Name: d04b2013b5436430ebbf7053d637fd89c1b15affcb42787dcf1cf5ffc3ae54e2
2018-09-28 23:53:24 +00:00
dan
6afa35c985
Disallow the use of window functions in the recursive part of a recursive CTE.
...
FossilOrigin-Name: 7fc2994434c7d9ed29c96a69c07e8eb4e97be776473c170c63f9a1bbaa09fa68
2018-09-27 12:14:15 +00:00
drh
98aa2abc45
Begin revamping the ".help" command in the command-line shell so that it
...
can accept an argument and will do a search for commands that match that
argument.
FossilOrigin-Name: 209afb8d06466536863b89a8acb9a1a18477a06331d8cce95fc6380e1666b6f5
2018-09-26 16:53:51 +00:00
dan
6705584a5b
Fix a problem in releasetest.tcl causing configuration "Fast-One" to fail.
...
FossilOrigin-Name: 42e04fefbc241dd33f12abd66344a87720ae4cda6d82f2882217b3cb71be8733
2018-09-25 13:51:31 +00:00
dan
2fae150402
Fix a problem with views that use window functions as part of complex expressions.
...
FossilOrigin-Name: 507d892c3a40a0bacbd47ed3c4fe2d8925a82716ae08da8401750a42782ba454
2018-09-24 14:51:59 +00:00
drh
f8937f9034
Fix a faulty assert() in the validation logic for the LEFT JOIN strength
...
reduction optimization. Problem found by OSSFuzz.
FossilOrigin-Name: 2fd62fccd13e326dbd7dd730112542c6faa56e466bf4f7b8e22ced543031280c
2018-09-23 02:01:42 +00:00
drh
2c3ba94969
Enhance WhereLoopBuilder.iPlanLimit to handle a case involving the OR
...
optimization discovered overnight by OSSFuzz.
FossilOrigin-Name: 7b59930a1d7b664b54d5a2bc9fa385925b5f4c8f34bf401c798307e3e2dae2c6
2018-09-22 15:05:32 +00:00
dan
34566c4434
By default, make all "ALTER TABLE RENAME" statements executed within a virtual
...
table xRename() method exhibit the legacy behaviour.
FossilOrigin-Name: 71947337e98b90debb13b390119bc2a6b39dd41535151b836071ee327a31e45d
2018-09-20 17:21:21 +00:00
dan
674b894269
Add a PRAGMA that restores the legacy ALTER TABLE RENAME TO behaviour.
...
FossilOrigin-Name: 5acad2e92c11c209bedc6ac8a709595e8070eed028ffc82af61499e5ceaa5e2b
2018-09-20 08:28:01 +00:00
dan
85c6892aa4
Fix a compilation issue in the "userauth" extension. Also fix a few test
...
script errors that occur with SQLITE_USER_AUTHENTICATION=1 builds.
FossilOrigin-Name: 221f3f572ed49d7af69a2e7c88741fa5206ea33ca59ee791eac7698bdd11ca4d
2018-09-19 17:09:09 +00:00
drh
c6727c8342
Fix the "sqlite3" command in the TCL interface so that it correctly returns
...
an error if invoked with no arguments.
FossilOrigin-Name: 2034fa8089676132b5e2f71bdebf1af9ca141da2e173920c6e84fb974ab0f022
2018-09-19 15:08:21 +00:00
dan
c4b1e5e758
Avoid incrementing the SQLITE_LOOKASIDE_MISS_SIZE stat before sqlite3_open()
...
returns. Fix test script problem in lookaside.test.
FossilOrigin-Name: e461cb281959d8517296e3e4e934eba8206770b1a592cd7655b6567268da1634
2018-09-18 17:50:34 +00:00
dan
253c6ee1bf
Enhance tester.tcl so that when "--malloctrace=1" is specified, the test
...
generates self-contained Tcl scripts that present GUIs instead of *.sql files
that require a separate program to interpret.
FossilOrigin-Name: de2e3cbd08c00d235106c040fa472ec267ef8f1ec13c34ed7d16deac8d50b6cc
2018-09-18 17:00:06 +00:00
dan
b1e1a0fd2d
Minor improvements to the permutations.test script. Most notably, a command
...
like "permutations.test alter%" now runs all test scripts with names that
match the LIKE pattern "alter%". Or, say, "permutations wal alter%" to run all
alter% tests in wal mode.
FossilOrigin-Name: 3e1a2f6614eacb65e1dffe64c6292c809fc5808be2d9d7d103cfc57d7b32fcd9
2018-09-18 16:06:42 +00:00
drh
d4cb09e3d2
Disable the ORDER BY LIMIT optimization in queries using window functions.
...
This fixes a problem that was introduced by check-in [206720129ed2fa8875a286]
which attempted to fix ticket [9936b2fa443fec03ff25f9]. This changes is
a fix for the follow-in tocket [510cde277783b5fb5de628].
FossilOrigin-Name: c6c9585f294710829ca24b64d70a36fd9f409261dd0661367c6c4198cdbc4c81
2018-09-17 15:19:13 +00:00
dan
0208337c16
Add extra test for the fix on this branch. Also fix a
...
pointer-compare-after-free problem that occurs in similar cases.
FossilOrigin-Name: 1856ea63b3186c2c8fa716ffe01c731397bdbbc3fbb56dc72ad0686cb7f152ca
2018-09-17 08:27:23 +00:00
drh
95f78d98b9
First proposed fix for the ALTER TABLE problem described by ticket
...
[b41031ea2b5372378cb3d2d]
FossilOrigin-Name: 05a9d129254e01a5f6b5e4033c105190eae386575a94b020ef3e0cbd30bbf056
2018-09-16 23:27:37 +00:00
drh
9b84f03556
Add the new "explain" virtual table in ext/misc. Use this virtual table
...
for additional test cases for the optimization that avoids updating indexes
on expressions when none of the columns changed by the UPDATE are in the
expression.
FossilOrigin-Name: 2404304cc15eaeee2744cf3c8f9cac0a544631c4f1060c5a17a78b43ca86edf0
2018-09-16 16:18:01 +00:00
drh
e9816d82a7
Optimization: when doing an UPDATE on a table with indexes on an expression,
...
do not update the expression indexes if they do not refer to any of the
columns of the table being updated.
FossilOrigin-Name: a71b101635ed28a4c99734dabb20bd65ef1018c1d63ac143b7321cdb0fafa5d7
2018-09-15 21:38:48 +00:00
dan
f86ff13206
Update releasetest.tcl to run "make test" as part of the "Fast-One"
...
configuration.
FossilOrigin-Name: d5ebfe1c75d336dac374d9cfa257e45e77ab51f9c2f24d1af615cbbe9dd83d9b
2018-09-13 17:11:51 +00:00
drh
396a103612
Fix a requirement mark on a test script. No changes to code.
...
FossilOrigin-Name: 628d5c0aa057c05c7cf84c330a51b8a44720c97250eadf0e5e8c750b7a2969c3
2018-09-13 13:17:14 +00:00
dan
e8ab40d219
Fix an invalid pointer comparison triggered by renaming a table column when
...
there are views with explicit column names in the schema.
FossilOrigin-Name: 572de7e4e33562c72cd90790b267ba389370f21ddcaebc4db609fd76ae9b7ada
2018-09-12 08:51:48 +00:00
drh
15c42942b3
Do not do the byte-by-byte modifications in the resetdb.test script if the
...
reserved-byte flag in the DB header is non-zero, because in that case the
bytes will be in the wrong place and the test won't work.
FossilOrigin-Name: 0af18674ca5b34e67e1685be3adcdd99a7b8650589c6a7cde7ad9ef1852a8777
2018-09-11 19:05:32 +00:00
dan
e3e79213b1
Fix a problem causing ENABLE_CURSOR_HINTS builds to segfault.
...
FossilOrigin-Name: e7033104fa8bd974a9a3d173200aa07a3aa3daade86e7eb65cad5d00b086969e
2018-09-11 13:38:35 +00:00
dan
30a7d7ddc5
Fix a test script issue in fts3ao.test.
...
FossilOrigin-Name: 74c381b573817d0212153278b5ee5d2238a27a727dcf7ee769365c47bb9fc40d
2018-09-10 19:34:06 +00:00
drh
b7a002f836
Fix the LIKE optimization so that it is disabled when the LHS of the
...
expression does not have TEXT affinity and the RHS is the pattern '/%'
or the RHS begins with the escape character. Fix for ticket
[c94369cae9b561b1f996d0054b].
FossilOrigin-Name: f191431d63aba187000b5cbaf3e072ff5f1b1eef6a2a407fb4d1629bda4e4e8f
2018-09-10 12:40:57 +00:00
dan
eb3fe0b9d4
Fix a problem with processing a "vtab.col IS NULL" expression within
...
the WHERE clause of a query when "vtab" is a virtual table on the rhs of a
LEFT JOIN.
FossilOrigin-Name: 83da4d4104ee1870a2a95bb5fa15ee6584c655d8b314b6b8ab97592dad4ee811
2018-09-10 12:17:16 +00:00
drh
6ee5a7b481
Fix multiple issues with the ORDER BY LIMIT optimization. This is the
...
proposed resolution to ticket [9936b2fa443fec03ff25].
FossilOrigin-Name: 206720129ed2fa8875a286266d05b99fb2caf8671e4b74b26a6286a2073fcd8b
2018-09-08 20:09:46 +00:00
dan
b2802128d6
Add extra test case to altertab.test.
...
FossilOrigin-Name: 64c3ee3c255e4630ccd5002116d66fd2af6b12dbdd4a3bee5ed413c3ef87d33a
2018-09-07 18:56:31 +00:00
dan
d5e6fef2a1
Fix a problem with renaming a non-temp table that has at least one temp
...
trigger and shares its name with a temp table.
FossilOrigin-Name: ceb60bd7e5f2a0a4247bff476fc6468227305467339ae0c24591be9d2b14bdde
2018-09-07 15:50:31 +00:00
dan
202a0274db
Minor fixes for problems revealed by releasetest.tcl.
...
FossilOrigin-Name: 1a8aedc3376b7ae32fa7b2c367eedd483e2629908836efd10ee5bd1fe0784675
2018-09-07 11:51:21 +00:00
drh
9fd88e8db7
Fix an uninitialized variable in the OP_ParseSchema opcode that comes up
...
only if the schema is corrupt.
FossilOrigin-Name: 725808d4c59176f71787452c7e500b563fd99cfc8ece47b1efe01d5e207efe0d
2018-09-07 11:08:31 +00:00
dan
803507f863
In all.test, do not attempt to run the RBU tests in non-RBU builds.
...
FossilOrigin-Name: 10c3e5a0314470ee1ffc37b68445a2cb2054530346d5f5ed3ffbd6df8003cad0
2018-09-06 20:33:11 +00:00
dan
c50f75df96
Fix a problem with ALTER TABLE when there are views or triggers in the schema
...
that contain "<expr> IS NULL" expressions.
FossilOrigin-Name: 91aab32e71fcb924e24c02d5f0901f7a474760fc993a7e7436e667512cf5d3c3
2018-09-06 18:56:36 +00:00
dan
1041a6a817
Fix a problem in ALTER TABLE with SQLITE_OMIT_VIRTUALTABLE builds.
...
FossilOrigin-Name: fa835145e63749e06e04bd50ff992afaeae05dcdd1df597d13911f944e62076b
2018-09-06 17:47:09 +00:00
dan
7ea1edb703
Fix test script problems causing SQLITE_OMIT_VIRTUALTABLE builds to fail.
...
FossilOrigin-Name: 37ad064e5f5704cf345d23b38b3f6d627fbcf20dbb78c8a91e96c9704760a1b8
2018-09-06 17:23:08 +00:00
dan
71998f03b5
Add new test file "alterauth.test".
...
FossilOrigin-Name: 00940265b18a3cf848602e1e0b3edbd935cb4309ef91a34b0d5746a258a47ae6
2018-09-06 16:24:23 +00:00
dan
1d85c6bf48
Ensure that the tbl_name column in the sqlite_temp_master table is updated
...
correctly as part of a RENAME TABLE operation.
FossilOrigin-Name: ffecfca511718e39e0003b380d5113755b8a11405a5bd80cc04503d9557f0842
2018-09-06 16:01:37 +00:00
dan
5921f2b9e7
Fix some test script errors. And an incorrect assert() in fts5.
...
FossilOrigin-Name: f804336f083d8d26314bb1ba34cec427675065a67cbe2bf00bb42e40752aeb33
2018-09-05 17:45:17 +00:00
dan
65372fa963
Improve the error messages emitted by RENAME TABLE.
...
FossilOrigin-Name: 6805b5900df5e6d3329cbad2660875ebe4069efe37b19575f527d153dc0882a1
2018-09-03 20:05:15 +00:00
dan
143df55d24
Add another test case to altertab.test.
...
FossilOrigin-Name: 828e8849faed85812c03215b00a2ba34cbb00dfa4d4afdcbd11300ba7fcf9743
2018-09-01 20:38:42 +00:00
dan
b87a9a8a5e
Fix a problem with renaming a column in a table that has a temp trigger that
...
references another attached database.
FossilOrigin-Name: 336b8a0923bf65b7a2c35811cb6dec0e262a0b31e534d2a6ab093d2afdb05c1f
2018-09-01 20:23:28 +00:00
drh
010f8ee2fb
Merge fixes from the alter-table-rename-column branch that occurred after
...
this branch separated from that one.
FossilOrigin-Name: 22e785aa2bbce4ae0852bc3d127d4b12222a192eb6e3ee874bf8e5c8582d05f3
2018-09-01 15:55:44 +00:00
drh
c840b428fc
Merge fixes and enhancements from trunk.
...
FossilOrigin-Name: 589186c083ff3af8d5a6d5ad34e1cefea57806ebf3831ea3bf5a48ef1e173140
2018-09-01 15:49:13 +00:00
dan
6ae2454a67
Update test script snapshot_fault.test to account for the new
...
sqlite3_snapshot_open() error code.
FossilOrigin-Name: c1aca7673ab04740bc8ad76af0a72a229c79a0cd51cf84d1c689a77424ff17c6
2018-09-01 06:13:07 +00:00
dan
8d4b7a3fa8
If a call to sqlite3_snapshot_open() fails because the requested snapshot no
...
longer exists, return SQLITE_ERROR_SNAPSHOT instead of SQLITE_BUSY_SNAPSHOT.
FossilOrigin-Name: e07923128bb164efbafde29d49175b61f2ef44b2dfac5ae4ed61937945dfcf4c
2018-08-31 19:00:16 +00:00
dan
141e119a17
Ensure b-tree mutexes are always held when sqlite3FindTable() is called. Do
...
not invoke the authorizer callback when parsing schema items as part of ALTER
TABLE commands. Fix test script issues.
FossilOrigin-Name: eac2aa7dce577f1998cc2078dd8ac384070f8acf1ceb565999a5cf719092024e
2018-08-31 18:23:53 +00:00
dan
9d324823a8
Test the schema after renaming a table. Ensure that temp database triggers and
...
views are updated when renaming a column.
FossilOrigin-Name: f3c27d916d4837f8fc3dd812bd004535f04c7a53bd2a0a2419613275f48bec76
2018-08-30 20:03:44 +00:00
dan
0ccda96867
Fix an ALTER TABLE problem with processing temp schema views and triggers.
...
FossilOrigin-Name: 72cfb1be29971d91a164f1d4f20cb054de68960a0bd547630bcd1160565971c5
2018-08-30 16:26:48 +00:00
dan
c9461ecc28
Extend RENAME TABLE to edit triggers and views. Still buggy.
...
FossilOrigin-Name: 01308bae3acf33f78b5bb90892085eab340df093aafc17e6ccf6a7d6cf324897
2018-08-29 21:00:16 +00:00
drh
8ab114c6a9
Disable the server1.test script on old PPC Macs due to problems in the
...
pthreads implementation on those archaic machines.
FossilOrigin-Name: 43efdd8c7e468405c9d4956a8caa66548059499289cbcc091628de7b055268cd
2018-08-28 21:12:02 +00:00
dan
f5778751f7
Fix a problem causing spurious SQLITE_CORRUPT errors when using the snapshot
...
API to read from old database snapshots.
FossilOrigin-Name: 535155be584ad8c1836e6b1c62de836d9872056d39608c995221c928cb5b365d
2018-08-28 11:23:52 +00:00
drh
050398bdf1
Fix a minor issue in the altercol.test script so that it runs on Windows.
...
FossilOrigin-Name: 62089c6daf9ea51be769c077c23d6fa881ba797255fa22d71baaac191a9c1ba7
2018-08-25 16:22:33 +00:00