drh
8e02a180b9
Fix a typo in an error message in the CLI.
...
FossilOrigin-Name: 808839808141493c1e5122f40b2cdff725be0cd1212e03d609345dbff7af03e4
2018-05-30 07:24:41 +00:00
drh
6a8b94e266
Fix the parser so that it builds with -DSQLITE_OMIT_CTE.
...
FossilOrigin-Name: 86ee267ee86f5264774a9f215b1158aeaa2d605e77c205731b5ee3945d7de4c2
2018-05-30 01:14:20 +00:00
drh
3e62ddbf13
Fix a harmless compiler warning.
...
FossilOrigin-Name: 8d02c7a6a09f7520ad180b0d943db475894cd39b0ccdb2ad2c44009d5f25c8a6
2018-05-30 00:59:09 +00:00
drh
a0368d9396
Demonstration code on a possible technique for optimizing the use of IN
...
operator on columns to the right of multicolumn indexes. If the OP_Noop
generated where were really a new opcode that checked to see if there existed
any entries in the index with a matching prefix, it might prevent unnecessary
iterations of the IN operator.
FossilOrigin-Name: 92f0fe155d5546fc7f4a443d0630613dabe149061966308e5420fad652278f16
2018-05-30 00:54:23 +00:00
dan
ea93e2804d
Increase the number of database handles opened by test script oserror.test to
...
provoke an "out of file-descriptors" error to 20000 (from 2000).
FossilOrigin-Name: 3b00f73456c65dfc1827fdada9afb49245f9addfa684d5ae35e69a07f39164bf
2018-05-29 19:12:58 +00:00
dan
867e6de4d7
Fix autoinc.test and resetdb.test so that they work with all permutations.
...
FossilOrigin-Name: 89f56d6b0a6847b042a1556cdf79c598c9bfdbdd5f9529d508ca7b4d26a6ed38
2018-05-29 16:37:12 +00:00
drh
59ee43a78e
Add a comment to justify a goto statement. No code changes.
...
FossilOrigin-Name: f141d806476aabe592a15d83b72c9409d2cd6bd7f9cced1ea2513c134191430a
2018-05-29 15:18:31 +00:00
dan
1d40cdbd4b
More minor changes to test scripts.
...
FossilOrigin-Name: ce9b756f09df4feb485bbf9695f8c6774906eb1b2fb45a340b74ffd21c9adfd8
2018-05-29 14:29:28 +00:00
dan
d3e17ffbb7
Fix some test script issues caused by recent EXPLAIN QUERY PLAN enhancements.
...
FossilOrigin-Name: f808e22831c33bfe3d0dd44e209f64d527c23ca7c72be7c694736535afee1317
2018-05-29 14:06:55 +00:00
dan
66e82b47d9
Do not run test file "resetdb.test" as part of permutation "inmemory_journal".
...
FossilOrigin-Name: 4921e5bae4c12c3413cc0b2e58766cf2ac117ad95f92fcd1c2457db6cfabb054
2018-05-29 13:25:14 +00:00
dan
d6f784ef92
Further window frame tests and fixes.
...
FossilOrigin-Name: e74c6e91859ec395c12ba2742542ff176a1d8364dcfb66b862240746bef54efc
2018-05-28 18:30:45 +00:00
dan
fecfb3189b
Do not require a statement journal in cases where REPLACE conflict handling is
...
used to insert a single row, so long as the REPLACE operation cannot fire any
triggers or foreign key actions.
FossilOrigin-Name: 469a62ca33081854e54f3af6d93ab5a350484b149c8c8c4ee8be0ae5418382d9
2018-05-28 18:29:46 +00:00
drh
50baf3d525
When compiling with SQLITE_DEBUG, add run-time checks to ensure that no statement aborts unless either there have been no writes or else there is a statement journal.
...
FossilOrigin-Name: ce99c7724460b9cf4ccaf7f6bc1a522b5c34d5ad0683d465f7926b10f31f7d05
2018-05-28 18:25:19 +00:00
drh
341141c339
Fix the build so that it works with -DSQLITE_TEST_REALLOC_STRESS
...
FossilOrigin-Name: 90ba2b2e5ce2619e68879eb325b43639159f27eb462b9fb6795534c91200a3d2
2018-05-28 17:43:28 +00:00
drh
4031bafafb
When compiling with SQLITE_DEBUG, add run-time checks to ensure that no
...
statement aborts unless either there have been no writes or else there is
a statement journal.
FossilOrigin-Name: 5a4542dbcf17a9f7fed600897555c271e1651fd50eb41d0b126725b486e1d14c
2018-05-28 17:31:20 +00:00
dan
79d4544d53
More fixes for different window frame types.
...
FossilOrigin-Name: 2c85668a0f86bcfd3de4c65847ac252e136ce97409a2249c5f4f58e3756e9a69
2018-05-26 21:17:29 +00:00
drh
9201184711
Store application-defined function names as lower-case to avoid the need
...
for case conversions before calling xFindFunction on virtual tables.
Avoid using lookaside to store the destructors for application defined
functions, as lookaside should be reserved for transient allocations.
FossilOrigin-Name: 777189ce88799f93f393fd14fd716111c85bcdcb23690fd561f78ea2bd2ce5da
2018-05-26 16:00:26 +00:00
drh
7fc86b96ba
Add a single sentence of documentation about the virtual table
...
scan flags. No changes to code.
FossilOrigin-Name: 27b4fa5dd0defc6ddaf5d8cde6a1e1162b70d99bfdc69c1d2290621a6d23ed91
2018-05-26 13:55:04 +00:00
dan
09590aaa1b
Fix "RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING" window frame
...
processing.
FossilOrigin-Name: b4e9c686697a5211a3bfa47e63f0684e3d4241d8c292cffe1a967bc39ad7cd8f
2018-05-25 20:30:17 +00:00
dan
83023a3357
Merge latest trunk changes into this branch.
...
FossilOrigin-Name: 6232519899efc568465d8fcc9fcd79d46a2ce4ec05109d26d5eb1ebd239cd596
2018-05-25 09:36:27 +00:00
dan
e105dd7622
Fixes for "ROWS BETWEEN <expr> FOLLOWING AND <expr> FOLLOWING" and "ROWS
...
BETWEEN <expr> FOLLOWING AND UNBOUNDED FOLLOWING"
FossilOrigin-Name: 5ac44872fd5c4f92851e7bf57d7207bb4d67de88ea2b5c746ff97f20bd6352e1
2018-05-25 09:29:11 +00:00
drh
338e311acb
When doing a one-pass UPDATE or DELETE on virtual tables, close the cursor
...
prior to running VUpdate. This allows one-pass to work on virtual tables
that do not allow concurrent reads and writes. Enhance rtree to take
advantage of this new capability.
FossilOrigin-Name: b816023ce07d01024d5769e16db924374a49bf909edd12dc1344a0a1ef693db5
2018-05-24 23:51:57 +00:00
drh
30fc7f8009
New test case for reading and writing the same rtree concurrently.
...
FossilOrigin-Name: 3ba08e53d54165f5541756ad13a4c2f0b18516cb612a256e056ed1ff76c1fa83
2018-05-24 22:42:27 +00:00
drh
c8c9cdd9dd
Do not allow RTree writes when a read cursor is active on the same virtual
...
table, as the writes might rebalance and disrupt the read cursors. Return
the new SQLITE_LOCKED_VTAB error code if this happens.
FossilOrigin-Name: d4ce66610851c825cb712f985216b63e015c753fdd5521f929c67ad18bfd7664
2018-05-24 22:31:01 +00:00
dan
31f5639fb7
Allow "<expr> PRECEDING" to be used to specify the end of a window frame.
...
FossilOrigin-Name: 7b709a989c188dbcf429989a0785294b36c8a7e89b5de8cefc25decf1f5b7f5a
2018-05-24 21:10:57 +00:00
dan
99652dda3c
Support other frame types that use "<expr> PRECEDING" or "<expr> FOLLOWING" as
...
start or end conditions.
FossilOrigin-Name: ec7b648c7f0ee266653561bbb9daa45b9be0d8a1a14f11dc93bce467c35154e6
2018-05-24 17:49:14 +00:00
drh
b9cd2c4536
In the OOM testing logic, add the sqlite3FirstFault() routine as a place to
...
set a breakpoint the first time any simulated OOM fault occurs for a single
test case.
FossilOrigin-Name: b4d80bd287ca7f3a6d182ba2435273266035b94fdf6a44047a64a4eff931c571
2018-05-24 17:38:00 +00:00
drh
bbd574bc37
Fix a typo in a comment used to generate VDBE opcode documentation. No
...
code changes.
FossilOrigin-Name: 36cdfbf2ce1811691c790fde3eaeed0238c03b4dc97dc3a20d1e0397520145d1
2018-05-24 17:25:35 +00:00
drh
cf8784cd8f
Addition cases for rtree preformance testing in speedtest1.c. Add the
...
--nodiff option to the speed-check.sh script.
FossilOrigin-Name: 95f2d62cf3cf8dbe0f12b652b47fe1f8e0f52bc269e269955fafdf802afc47c1
2018-05-24 16:18:35 +00:00
drh
7458a9f3f7
Updates to the sqlite3_vtab_nochange() documentation. No changes to code.
...
FossilOrigin-Name: 5bd99abc10b8153aadff5f815ae15fbe375f34f043c65def4be03014d2efdb50
2018-05-24 13:59:45 +00:00
dan
c3a20c19a8
Add support for "ROWS BETWEEN <expr> PRECEDING AND <expr> FOLLOWING" window
...
frames.
FossilOrigin-Name: 3a203660f1e4da3b8d2d605c494f4843f6e00752f28042b49e11d7d6550dd406
2018-05-23 20:55:37 +00:00
drh
4c57e326ef
Remove a branch that is no longer used due to the fix to the
...
sqlite_sequence schema problem, ticket
[d8dc2b3a58cd5dc2918a1d4acbba4676a23ada4c]
FossilOrigin-Name: 066742692a9e8735b814c6a145545f97a7fb10b29cead78e68e25324e79aabaa
2018-05-23 17:53:07 +00:00
drh
186ebd41cf
Verify that the sqlite_sequence table exists and is in approximately the
...
correct format prior to using it to process an autoincrement table.
Fix for ticket [d8dc2b3a58cd5dc2918a1d4a].
FossilOrigin-Name: e199e859ace4f8381c6380175206e7a276e3f2228fadbbca9341bca8d2fc445d
2018-05-23 16:50:21 +00:00
dan
72779425b5
Merge latest trunk changes into this branch.
...
FossilOrigin-Name: cdb68d2c64e453fdcd29437d5915c5c5ab6fbc7b5ffac52f4cb393f35b4a0124
2018-05-22 20:36:12 +00:00
dan
8471be3311
Add comments to window.c describing how other window frames will be implemented.
...
FossilOrigin-Name: 16168146b202915252f9375aef38e65ca20c5d4aa906e851d4d3a484db57562d
2018-05-22 20:35:37 +00:00
dan
f9eae18b56
Begin adding support for more esoteric window frames.
...
FossilOrigin-Name: bc4b81d60d40583de0f929730159011c1a7696802532ebd02220de3ace94a60d
2018-05-21 19:45:11 +00:00
dan
b6e9f7a4d1
Fix minor problems on this branch.
...
FossilOrigin-Name: 19c2e4b2f164521eab84cb0a0e12984be9431eaedd001dd3671e9ea1a6212353
2018-05-19 14:15:29 +00:00
drh
e8cf689df3
Add support for auxiliary columns to the rtree extension.
...
FossilOrigin-Name: c6071ac99cfa4b6272ac4d739fc61a85acb544f6c1c2ae67b31e92aadcc995bd
2018-05-18 17:58:33 +00:00
drh
16d261b3ef
Merge enhancements from trunk, especially the CLI fixes.
...
FossilOrigin-Name: a350040a3bb962823f92908fb31cade52baf13eab90ef608ca3a8349e4c28c9d
2018-05-18 17:17:36 +00:00
drh
9e80403bfc
In the CLI, detect and report errors on sqlite3_close(). Clear global
...
variables prior to exit to so that valgrind can better detect resource
leaks.
FossilOrigin-Name: e3b2e0a078b82ac6cd3c3312e8ac0983c1375e1052f1e324476d2f8d1b227c30
2018-05-18 17:11:50 +00:00
drh
a02fd67b99
Avoid unnecessary sqlite3_finalize() operations.
...
FossilOrigin-Name: 16f71032a3a2919cb226b25b5256a370adb5c55fa506d4774b7f83dc8868e793
2018-05-18 16:53:07 +00:00
drh
136c9903bf
Fix a prepare-statement leak.
...
FossilOrigin-Name: 95fd296ffc8130526a1453cbdca6ce47f22fc5b5c474aa31d66b627d0c7393a1
2018-05-18 16:46:09 +00:00
drh
252f39619a
Improved error messages. Limit the number of auxiliary columns to 100.
...
FossilOrigin-Name: 059d20abd57727e6d312f15b640359ef778786f577d9b50b17b57195db2d0aef
2018-05-18 15:21:43 +00:00
drh
bc30e2023b
Improvements to integer/float comparisons on architectures that lack a
...
"long double" type.
FossilOrigin-Name: 5139ea62a8a6c6dc6558c337de39bcbadd26f6515742263387be03c862c78cf0
2018-05-18 14:24:23 +00:00
drh
8d1751b6fa
Remove incorrect NEVER() macro added by the previous check-in.
...
FossilOrigin-Name: 3d6625111319c0356c57aaf7b7460fd882c3f00ca668dc43c0abe3403c7c2ba3
2018-05-18 14:19:35 +00:00
drh
6c319e1238
Improvements to the sqlite3IntFloatCompare() routine for systems that
...
lack the long double type.
FossilOrigin-Name: ea6a03a89dc23e860e53e79ec3fddf0ae7072a23b73aef3d2d181b426566b677
2018-05-18 13:39:00 +00:00
drh
be4ccb2838
In the CLI with the -A command, if the file does not previously exist and
...
its name looks like a ZIP archive name, then create it as a ZIP archive.
FossilOrigin-Name: 33dc8fad7f2b467f259eb78eb7342a760f01d54d95da7fe4cace10e558788a58
2018-05-17 20:04:24 +00:00
dan
e2f781b9d1
Evaluate multiple window functions in a single pass if they use the same
...
window definition. Add xValue callbacks for other built-in aggregate
functions.
FossilOrigin-Name: c9f0f140941660ff368e5bb5752d54feb1964b7a9eac986d4bfb8f24a1c20d86
2018-05-17 19:24:08 +00:00
dan
2e362f9775
Handle multiple window-functions in a single query.
...
FossilOrigin-Name: 35af0b750e70dcf0f343b115f4bbd0860a7e8064be204d4dfba1a43c22ff07b1
2018-05-17 14:26:27 +00:00
drh
d0f9cdcc63
Improved error and help messages for the ".archive" command and "-A" option
...
to the CLI. If a memory leak in --list processing.
FossilOrigin-Name: 02541ac6f919a8a8b18ef0525c4ee24fdbc5c1883171fb1a492434cd0f006f7c
2018-05-17 14:09:06 +00:00
drh
1f22f62582
Fix memory errors associated with argv in the CLI when it is
...
compiled on Windows.
FossilOrigin-Name: 4474d69b5c21b4e6f0d1376fbceca0f18c715ff673aea63053a02bfbe041d03b
2018-05-17 13:29:14 +00:00
dan
86fb6e1738
Start of experimental implementation of SQL window functions. Does not yet
...
work.
FossilOrigin-Name: 3781e520854808fe02ad3fe77dd11fc917448c58ff1fd79123289dd91937decd
2018-05-16 20:58:07 +00:00
drh
26fb126622
Fix an issue with rtreecheck() and auxiliary data columns.
...
FossilOrigin-Name: 46715136078a51ca7dd08b83214d6ad0e85728af8a26cd342077b8dd4ada1d60
2018-05-16 19:56:20 +00:00
drh
7578456c25
Do not allow auxiliary columns in the rtree to interfere with query planning.
...
Begin adding test cases.
FossilOrigin-Name: 9abe023e1afa7dc1a7eba7fbb3128401de129873d86b7c71c221decca26a821c
2018-05-16 19:07:07 +00:00
drh
1e76c22b4a
Fix the OOM issue mentioned in the previous check-in.
...
FossilOrigin-Name: c489d8e44eac4cd355096ab66bb40f13ef662f31e080c9f1f2ee379fe55b207a
2018-05-16 18:18:24 +00:00
drh
e297196524
Initial implementation of the ability to have auxiliary columns in an rtree
...
virtual table that store arbitrary content. It mostly works, but there are
some minor issues in OOM corner cases.
FossilOrigin-Name: 0c87fec970221f954e0a92f3ef0437b382255479fac5b403ee37b1bb5ab29719
2018-05-16 17:57:30 +00:00
drh
f80bba9d8d
Enhance the sqlite3_str_new() interface so that it always returns a valid
...
and non-NULL pointer even in an OOM condition.
FossilOrigin-Name: ed5b09680fd6659ebbe5ace3c1c56f3962bbd75cfdf65c7565651900cf87917a
2018-05-16 15:35:03 +00:00
drh
dd7460f0fd
Correct output for the fullkey column of json_each() when the total JSON
...
input is a simple value, not an array or object.
FossilOrigin-Name: b45b18850c59f22a163ee482f529f578a8798f96d0e26b5a061d336d480a1540
2018-05-16 12:19:11 +00:00
dan
a44005af4f
Fix a test case problem in wherelimit.test.
...
FossilOrigin-Name: 3012df8b2c0b19d27260f389147a96c501aee9a4aee3813834cc9e438dbacede
2018-05-15 09:09:00 +00:00
drh
492ad131bd
Make more aggressive use of automatic indexes when processing materalized
...
views and subqueries.
FossilOrigin-Name: 172f5bd27e47cbdaaab54fe4383a5ee505d285257af6153ed626d9493a4adab3
2018-05-14 22:46:11 +00:00
drh
a090ab90d6
Convert the schema creation logic in the rtree extension to use the
...
new sqlite3_str interface.
FossilOrigin-Name: fd8b8c4196d3f0f6cb129f43ebf473ada86eefdf16181fa70ceee21e1232b5e1
2018-05-14 15:26:05 +00:00
mistachkin
a3926f4bbf
Fix typo in the shell.c source file.
...
FossilOrigin-Name: 389dc0a901b0ce54c3c773d63e5b288f6dd28b96dffc4b77861db89b275b57d6
2018-05-14 12:23:04 +00:00
drh
fc97c1c8cb
Export the deduceDatabaseType() function the shell.c source file.
...
FossilOrigin-Name: d0f35739af3b226c8eef39676407293650cde551acef06fe8628fdd5b59bd66a
2018-05-14 00:41:12 +00:00
drh
69ed38a822
Add the --append option to the ".backup" command in the CLI.
...
FossilOrigin-Name: 0dfdbdee527b0c429703bc2696bf8d8e44a852aafe0aca742b9d7152eb1f932e
2018-05-14 00:23:08 +00:00
drh
1615c37e48
In the CLI, allow comment lines that begin with '#', but only in a context
...
where a dot-command is allowed. In other words, '#' at the beginning of a
line in the middle of an SQL statement is just part of the SQL.
FossilOrigin-Name: 4ee136d6d2e029dad8371faf659d3a0bc0ac6ae76940db81d333848545bc990f
2018-05-12 23:56:22 +00:00
drh
fc29a86eee
In the CLI, return non-zero if there are errors on the command-line.
...
FossilOrigin-Name: 13e7300a37e379eac564594d78d3f039fd25737493b3b627ef02fab57a6c98e1
2018-05-11 19:11:18 +00:00
drh
003edba0da
Fix a typo in the help message from the ".sha3sum" command in the CLI.
...
FossilOrigin-Name: dba87a201806f93a1736c1ee81d9c9cf9848e401a237dc2af3b4376402976c32
2018-05-11 15:10:43 +00:00
drh
f2072d136d
Make sure the open_db() routine in the CLI does not invoke access() with
...
a NULL filename.
FossilOrigin-Name: 20a8c61122f37a43c418ca4415b3d26e0f7a27a6faea9048aa9fbb1a56e9d629
2018-05-11 15:10:11 +00:00
dan
cb38809159
Add a test case to check that the fts5 unicode64 tokenizer is dealing with
...
codepoints greater than 65535 correctly.
FossilOrigin-Name: 9f7a6ae878cd17ff4de7c55e654406773e0ea2b9fe1c4e2a9fc2b0da84d059a4
2018-05-09 16:32:00 +00:00
drh
f0f9dbd384
Add 14 new interfaces to the loadable extension mechanism.
...
FossilOrigin-Name: 0e809cdcbd1bb1e269298814d6bb1dcdaea48c5b0bb20e0e1caa4dba27654873
2018-05-09 15:17:02 +00:00
drh
446135d724
Fix minor problems with the sqlite3_str interface.
...
FossilOrigin-Name: 43ea8a6836ccb9910314d35e07d881694200c97ef5969629f62e49f7a2a42f92
2018-05-09 14:29:40 +00:00
drh
0cdbe1aee0
Make the internal dynamic string interface available to extensions using
...
the new sqlite3_str object and its associated methods. This is mostly just
a renaming of internal objects and methods to use external names, through
there are a few small wrapper functions.
FossilOrigin-Name: 87f261f0cb800b06ad786f6df16f2c4dddd0d93dfdcc77b4a4eaa22920b56bf1
2018-05-09 13:46:26 +00:00
drh
721e8539c3
Fix a typo in a comment used for documentation. No code changes.
...
FossilOrigin-Name: b866693e6a50b5c41ca54b56bb20753efb94980ad3365c511cccf23ac43a1c23
2018-05-09 10:11:44 +00:00
drh
4c54045372
Correctly format the STAT1 and STAT4 content in the output from the
...
".fullschema" command in the CLI. Fix for ticket
[e63a34a0045832dc850367552].
FossilOrigin-Name: 0c3f128fd7d5738a8e9da706f5f30aa1985ef5efab70ddaad28ef6b641b04f4a
2018-05-08 23:17:36 +00:00
drh
f2cf412a0a
Fix a harmless compiler warning in fuzzcheck. Add new OSSFuzz test cases
...
to the test case library.
FossilOrigin-Name: d2619746cb233f4be127a77988548dd1d90eebddf0d0ac9107913b240553e5d0
2018-05-08 13:03:31 +00:00
drh
5ecf9039b0
Fuzz test cases for UPSERT.
...
FossilOrigin-Name: fd11fbd21893d520de5a2249f825ecb5839fa4943f5c207e9e9bf8b52f4e2695
2018-05-08 12:49:53 +00:00
drh
89ee229810
Activate the cell-overwrite optimization for index b-trees.
...
FossilOrigin-Name: a68697d10ef17d452c8279181186faad7bc54e3a35858a336552f717449065ea
2018-05-07 18:41:19 +00:00
drh
d720d394d0
Improved comments on the cell-overwrite optimization code.
...
FossilOrigin-Name: a4fe966da2fc479b18bf521ff596000410af3a611f7d8723d126795e595ccf22
2018-05-07 17:27:04 +00:00
drh
e3c05a5597
On an UPDATE, try to overwrite an existing btree cell with the modified
...
content, if the old and new cell are the same size. Use memcmp() first
to avoid dirtying pages that are unchanged.
FossilOrigin-Name: 5887d8beb502ad62689d31b850f46ab50831a1e9db36adf20d55ad45619d207e
2018-05-07 11:48:22 +00:00
drh
e2188f0b0f
Fix harmless compiler warnings associated with the new EXPLAIN QUERY PLAN logic.
...
FossilOrigin-Name: 374d8e264487b0437a8d995ced1bc026a92d495a2d0568f65f033e9ebe11d0e2
2018-05-07 11:37:34 +00:00
drh
30f7a25325
Fix harmless compiler warnings in the cell-overwrite logic.
...
FossilOrigin-Name: 3e11dc3183bc3e8ec49af244a8e8b3e07d12f7a2e59028b2bf64ce0ab589a91f
2018-05-07 11:29:59 +00:00
drh
60208c34bb
Backout change [05fee1a21ea398f1e4d6f1cf3] because it does not take into
...
account the LD_LIBRARY_PATH environment variable used by dl_open().
FossilOrigin-Name: b348d1193a7a3ed4d3e656b6cc95a41f87eae29222e0723850a5eb5ffabffd00
2018-05-07 02:50:38 +00:00
drh
c6f36fa33a
In an ORDER BY LIMIT, make sure the ORDER BY expression evaluator does not
...
try to reuse values from the result set if the result set has not yet
be computed. This fixes a bug in the recent deferred-row loading
optimization, check-in [c381f0ea57002a264fd958b28e].
OSSFuzz discovered the problem.
FossilOrigin-Name: 5d61e75f32de09c81dbe844443209f063cccb005d60b846900de5b023643fc3b
2018-05-05 16:50:35 +00:00
drh
6fcf83a503
Fix a slightly incorrect corruption detection branch in the btree logic.
...
FossilOrigin-Name: 9191ff670cb7f36e0b2dac4a22888679b639845687aef8edcc3c05e35ba71eda
2018-05-05 01:23:28 +00:00
drh
cb737dc29e
Merge enhancements from trunk.
...
FossilOrigin-Name: 9650f71b82ca1b3759e776bbd8a2e8ca61c51f80038e37c9c9a675a8c13b0b06
2018-05-04 19:18:27 +00:00
drh
e3d511c078
Fix requirements marks. No code changes.
...
FossilOrigin-Name: 7fdad122a21e4b01bd678198fd5131dc32febe3af366bd6368505398255f9822
2018-05-04 18:32:11 +00:00
drh
e632ae796a
For the amalgamation-tarball, enable FTS5 and JSON1 by default and
...
provide a new --enable-debug option that actives debugging facilities.
FossilOrigin-Name: 03edecaf9dcfc927aa60c2a17590a432b17de1647d480d277b4aafc8018c2d20
2018-05-04 04:49:55 +00:00
drh
5d72d9245d
Make a separate limb in the EXPLAIN QUERY PLAN output for the various lines
...
associated with the OR-optimization.
FossilOrigin-Name: 75ac7b4e4fd0811ca80c719badacff207e0bbd00ac64dde3b3d4ec676fad472d
2018-05-04 00:39:43 +00:00
drh
4388522561
In ORDER BY LIMIT queries, try to evaluate the ORDER BY terms first, and it
...
it becomes clear that the row will not come in under the LIMIT, then skip
evaluation of the other columns.
FossilOrigin-Name: c381f0ea57002a264fd958b28e4921cb9c9e73a10fb592f6bb64e6bc9bd16d39
2018-05-03 23:20:06 +00:00
drh
5e8b9853da
Fix a branch that has become unreachable due to recent enhancements.
...
FossilOrigin-Name: 81ab5e0d106fb9f2de80d17c8167d8542c6721b8d7ec69c43e1571c2dcadeddd
2018-05-03 22:52:56 +00:00
drh
34b27edc80
Improved security for VACUUM. This check-in combines the fixes
...
of [ab0d99d0b5ede] and [27754b74ddf646] in a way that is less likely to
to be broken by future changes.
FossilOrigin-Name: 260fc696538b195e8decabaab46771f664fb829b539efa86fb0b8170db01fa0a
2018-05-03 21:51:30 +00:00
drh
98b677f2cb
Overhaul of EXPLAIN QUERY PLAN. The output is now in the form of a tree.
...
More details of the query plan are shown, and what is shown is truer to what
actually happens.
FossilOrigin-Name: ff01bbdabc4b9db3db8b928979442c91b32d72082158e4f5fe62ae51a73649d2
2018-05-03 19:56:50 +00:00
drh
4d79983ca5
Optimizations to the new EQP framework.
...
FossilOrigin-Name: 956fef361a795bd081d8e23ce4075dc8aafcee63ab7275d13b657b529d185b30
2018-05-03 19:47:14 +00:00
drh
d5aa9262a6
Fix various error handling conditions on the cell overwrite optimization.
...
Fix a test case so that it works with the new optimization.
FossilOrigin-Name: f89b54f41405ed7e28132f66b8a0c690a087c2412c8f55790c2beabb0b521645
2018-05-03 16:56:06 +00:00
drh
da65fc6e32
The BtCursor.info fields are only valid if info.nSize!=0.
...
FossilOrigin-Name: 54c537eead5b08104cfaf0d5b1e2706e53d6f74be2ca02e06229024fd889fc94
2018-05-03 14:07:18 +00:00
drh
4f84e9c7e2
Add more corruption checking to the cell overwrite logic.
...
FossilOrigin-Name: 58d14afe1e1288d114ea213458b3121e0a95670887861928858b7f143c76f789
2018-05-03 13:56:23 +00:00
drh
9b03192e15
Bug fixes in the overwrite optimization.
...
FossilOrigin-Name: 0cb6cd2a6a596afaa1cca6c5f5abc2ea75d04f254c7debaf36ecd6a90b66aed6
2018-05-03 12:57:48 +00:00
drh
3de5d16cf7
The sqlite3BtreeInsert() routine tries to overwrite an existing cell with
...
modified content if the new content is the same size. Pages are only dirtied
if they change. This prototype works some, but still has issues.
FossilOrigin-Name: 489451b378819621537231c1c8a07704437e11c1f5384fd53b09f3977d2213a4
2018-05-03 03:59:02 +00:00
drh
fa16f5d9d6
Enhance EXPLAIN QUERY PLAN to report the generation of constant rows using
...
VALUES or just a SELECT without FROM.
FossilOrigin-Name: c75eee69fa8a9b56ee58a4cc539e80cc982f43390dc3a357344d58479dd89a41
2018-05-03 01:37:13 +00:00
drh
cdf88760da
More test case updates. Tests are all running now.
...
FossilOrigin-Name: dab5e5294813891469660cceb211ac1a1e526715bb57dcdbb1ab90321e6a4dad
2018-05-02 19:42:33 +00:00
drh
b3f0276b9e
Fix test cases so that they work with the new EXPLAIN QUERY PLAN output
...
format. Only some of the cases have been fixed. This is an incremental
check-in.
FossilOrigin-Name: 5f0e803e33aa557865d5fc830d9202d628de9a94c9757058ca48f1a560702cd3
2018-05-02 18:00:17 +00:00
drh
84a01debf9
Improved EQP output for recursive CTEs and multi-value VALUES clauses.
...
FossilOrigin-Name: f2f525548c65f89f55cbe91da8a21512dedc6f7b68b58b7906d653e800a2963a
2018-05-02 16:13:48 +00:00
drh
85a40ebc03
Prevent VACUUM from running any commands in sqlite_master.sql other than
...
CREATE statements. That is all that should be there anyhow. This fixes
a problem discovered by OSSFuzz. Test cases in TH3.
FossilOrigin-Name: ab0d99d0b5edece4c639baa47ce1ca2c02774cb2515e5b7f36d9bd312ccd3310
2018-05-02 15:00:26 +00:00
drh
03c3905f94
Fix a dangling-else problem that was causing recursive CTEs to malfunction.
...
Begin fixing test cases to work with the new EQP output.
FossilOrigin-Name: 82ca44b82fed6814c84440ba8bfaa019488ab956e84ac165180e2fcece6facb2
2018-05-02 14:24:34 +00:00
dan
fa5c69f5cb
Fix a problem in the xBestIndex method of the closure extension causing it to
...
allocate non-contiguous argvIndex values in some cases (an "xBestIndex
malfunction" error).
FossilOrigin-Name: 0c67150749cb3d067e14b2dcac9c3489e0f14bd18c0387f1d9bc93d21fc96fe5
2018-05-02 08:12:22 +00:00
mistachkin
07430a8caf
Add sqlite3_win32_set_directory8() and sqlite3_win32_set_directory16() functions.
...
FossilOrigin-Name: 22089ea2bbea93eb1da7f08344789a5455077169443e40025f053d2a117f1c08
2018-05-02 03:01:50 +00:00
drh
c631ded5e8
Improvements to the EQP display for compound select statements.
...
FossilOrigin-Name: 699a77e479010a331b0423f157a2fbfc373688e3d0d04ae5e64376c00cb3d488
2018-05-02 02:22:22 +00:00
drh
e2ca99c907
Begin reengineering the EXPLAIN QUERY PLAN function to provide more
...
intuitive output.
FossilOrigin-Name: 70b48a7972dfbb44af3ccd8ccd830e984bec88d80a78b3566a5de86a16e7fc14
2018-05-02 00:33:43 +00:00
drh
8c2e6c5fe0
The SQLITE_ALLOW_SQLITE_MASTER_INDEX compile-time option allows a CREATE INDEX
...
statement against the sqlite_master table. Once created, the index works, and
is usable by legacy instances of SQLite.
FossilOrigin-Name: 853f3163597b9946c0cbeb808ea6fd33a0cf48ae6b8f4459c4165db377f33a9e
2018-05-01 18:39:31 +00:00
drh
bbd4ae5a2f
Defer loading result column values into registers on an ORDER BY LIMIT until
...
we know that the LIMIT does not exclude the current row.
FossilOrigin-Name: ce4ef46058f4aaea6623a41255a2e4b69bb24f16a287391df48f6bacdb4c4989
2018-04-30 19:32:49 +00:00
drh
b57e3ec5d8
Test cases added for SQLITE_DBCONFIG_RESET_DATABASE.
...
FossilOrigin-Name: 08665a9e2e50a0a1e62529884cf65f8090debe89a306a3904b53268729ab5ad5
2018-04-28 19:08:02 +00:00
dan
2b137d65f5
Fix an RBU problem causing spurious SQLITE_CONSTRAINT errors when restarting
...
an RBU update in which more than one source table writes to a single target
database table.
FossilOrigin-Name: 564ae8297d417ba4b7978e430d41f125007177673163f6ed9adc3a3974f73d24
2018-04-28 18:20:01 +00:00
drh
a19d09677b
Add the SQLITE_DBCONFIG_RESET_DATABASE control for resetting a corrupt
...
database file without closing any database connections. Added the
".dbconfig" command to the CLI.
FossilOrigin-Name: a200a49edeaca5a787a3036070f7ced3cb6e9495f8afe7b74d5cde02c79b20dc
2018-04-28 13:21:00 +00:00
drh
7df011969c
Add the SQLITE_DBCONFIG_RESET_DATABASE control as a replacement for
...
the reset_database pragma. Resetting the database should be hard enough
to do that it cannot be done by accident.
FossilOrigin-Name: ff836cb8b0377c5970ecb2b797702e2b5d208eda443ecbd55f4c238a3094b28a
2018-04-28 12:43:16 +00:00
drh
46462e35d3
Merge updates from trunk.
...
FossilOrigin-Name: 94877e495c563f101b51cd8891ca7665c7aab87ff526157f1dc1781e0a2a5d87
2018-04-28 11:22:53 +00:00
drh
1efa8023a1
Prevent deep recursions on nested COLLATE operators.
...
FossilOrigin-Name: 6e098ee415f1a530e17a942c9ba51d67c25a3ebff6b97377b7858d0b10bcec92
2018-04-28 04:16:43 +00:00
drh
6bfd973ce6
Fix compiler warnings in FTS3.
...
FossilOrigin-Name: de508e831a43f02c3b354a24ea34798da03c163bae5521c852c9ddd252723739
2018-04-28 04:10:55 +00:00
mistachkin
542805d174
Document and expose sqlite3_win32_set_directory() function for use on Win32.
...
FossilOrigin-Name: 7626b593405ca720e371b9f698b72b499b7c829bfe00f758140bc542cf970689
2018-04-28 01:46:22 +00:00
mistachkin
c1e1ffeafb
Add comments about the intended use of the sqlite3_data_directory variable as it pertains to the sqlite3_win32_set_directory function.
...
FossilOrigin-Name: d11c419756ce28fcc1f58df6bbe59a3d8d19d0441970aa7bfa216ba915ceddf5
2018-04-28 01:44:27 +00:00
drh
0314cf3aa5
Add the "PRAGMA reset_database=ON|OFF" command. When on, it causes the
...
database to appear to be empty, causing the next transaction to reset it to
an empty database.
FossilOrigin-Name: 02e1a13c1f04bb72599b98f51240c78d0d050de264fef5808fd97db3f4c16dac
2018-04-28 01:27:09 +00:00
mistachkin
95d5ae19d1
Document and expose sqlite3_win32_set_directory() function for use on Win32.
...
FossilOrigin-Name: cbce7180ee664367ee8fc1f8af703eb7845bb58ade6870cc3b7608dcbe5952b3
2018-04-27 22:42:37 +00:00
dan
03db962ab5
Update test script fts3expr4.test so that it always creates fts3 tokenizers in
...
the "en_US" locality.
FossilOrigin-Name: 576a8f69ae25883f752e58953624e9f7126db998bebaa1f07f7c2ec47aaecabe
2018-04-27 18:05:01 +00:00
dan
0ef54fa6e8
Fix a test script error causing tests to fail in soak.test.
...
FossilOrigin-Name: 462b52b121c1882e0eca819bc30c0f6e94d7fdd60047d2c32adeff3a1eb70546
2018-04-27 16:35:44 +00:00
drh
ef9e3d78f2
Enhance the comments in the templatevtab.c implementation.
...
FossilOrigin-Name: 05f6278a02e5cde89f76ced5af7d508e26576d7291dad7ee9e06b1a3be516cb0
2018-04-27 15:17:08 +00:00
drh
6876dccbfe
The previous fix for ticket [d85fffd6ffe856092ed8da] in check-in
...
[0a514e62ad1ebe5c12da8dae] did not completely address the
probably in that it only worked for cases where the OP_SCopy that loaded
the register was the last instruction in the sequence for the expression, which
is not necessarily the case for expressions like CASE...END. This revision
prevents the registered that will be recomputed from being cached in the first
place.
FossilOrigin-Name: 9fd0faf517993587d2f54212638545fc85fbbc84a031bcfae8c1e5894825d83b
2018-04-26 18:34:26 +00:00
dan
c040e2b186
When processing an "ORDER BY ... LIMIT" that does not use an index, check
...
whether or not a record may appear in the final result set before adding it to
the temp b-tree used for sorting.
FossilOrigin-Name: 0fcfc36ceb820fc70136b799a0405fe92e50646e697be2872bbe9a53a05ed5a9
2018-04-26 17:43:35 +00:00
dan
f226f03d4f
When processing an "ORDER BY ... LIMIT" that does not use an index, check
...
whether or not a record may appear in the final result set before adding it to
the sorter.
FossilOrigin-Name: 71bf91c218334381b1b4bdba6a093e623b62e17f3e8550e154a11f0cb0b404f3
2018-04-26 16:13:47 +00:00
drh
909066bba0
Ensure that new.* values of an UPDATE do not get clobbered after the
...
BEFORE triggers run when unmodified columns of the row being updated are
reloaded. Fix for ticket [d85fffd6ffe856092ed8da]
FossilOrigin-Name: 0a514e62ad1ebe5c12da8daed429ae2f9d9910471d3c5cef3b6870bdadfefca1
2018-04-26 15:50:10 +00:00
drh
de7ca50dac
Clarification of the behavior of a BEFORE UPDATE trigger when the trigger
...
changes the values of some of the columns used to compute new columns in
the UPDATE.
FossilOrigin-Name: 7bb23c2a3d37f0d5e5515b917860818906819d54a0066e1ba8e9792a82f7d279
2018-04-26 15:04:18 +00:00
drh
896494e8ad
Improved VDBE comment on the OP_Param opcode. No substantial changes.
...
FossilOrigin-Name: 368c14da868a843767344f6cc17c499fddd83244c0510337ed9a918e64ee2413
2018-04-26 12:27:03 +00:00
dan
1e08074906
Update the "fuzz_malloc.test" script to print SQL statements in which OOM
...
handling problems are found to stdout.
FossilOrigin-Name: a956363cf6881be590120c7718976b54b12c4bd0d9228d8142b45e0fe1826f7e
2018-04-26 08:56:40 +00:00
drh
fc0ec3e5e8
Add new interfaces for accessing the list of SQL keywords:
...
sqlite3_keyword_count(), sqlite3_keyword_name(), sqlite3_keyword_check().
FossilOrigin-Name: 7dd34e3776fed90a49344d54a1b68bb59f7957b5a8a1a367087b7cafb63111c1
2018-04-25 19:02:48 +00:00
drh
7eabc44dee
Add the new DO and NOTHING keywords to the keyword lists maintained
...
by various extensions and auxiliary programs.
FossilOrigin-Name: 77a98a0781cd8450e2100111e70526db6a51d7e58e3c505ea87f685388099e82
2018-04-25 17:10:30 +00:00
drh
d11b8f671f
Add the new SQLITE_SHELL_INIT_PROC compile-time entry point to the CLI. This
...
is needed to work around the tighter sqlite3_config() constraints now in the
CLI.
FossilOrigin-Name: 3bcdbccf530e2a5aab7b91f4b9e5535cced91f242c49ff69b05a75d643b8b4a3
2018-04-25 13:27:07 +00:00
drh
b2c8559fad
Avoid many unnecessary calls to sqlite3ReadSchema() and sqlite3Init() when
...
the schema is known to be valid already.
FossilOrigin-Name: 58cf812fd81329e82b3fdd61b7ad2040c9b90d2d80f592b9231e0e1902c8d577
2018-04-25 12:01:45 +00:00
drh
3215872446
Add an assert() to ensure that schema mutexes are held prior to accessing
...
the DB_SchemaLoaded flag inside of sqlite3Init().
FossilOrigin-Name: d8b46290bb75c695dac523cf9a50d1b43e773802e3b95fd722feca16162ab7c5
2018-04-25 10:30:46 +00:00
dan
ccb9eb782c
Remove a recently added NEVER() macro from a branch that can be taken in
...
obscure circumstances.
FossilOrigin-Name: 2aa210030ae414782adab9291cc43a149a780f39bd3d306dc2892a8c20422a51
2018-04-24 18:59:18 +00:00
dan
820fcd2ce9
Fix a problem with processing "LEFT JOIN tbl ON tbl.a = ? AND (tbl.b=? OR
...
tbl.c=?)" in cases where there are indexes on both tbl(a, b) and tbl(a, c).
FossilOrigin-Name: ce35e39c5cc2b00dd6b4a9ffaa9d5eb7d9b862759e87d5f053729de7643eee9c
2018-04-24 18:53:24 +00:00
drh
c447595df5
Do not attempt to use terms from the WHERE clause to drive indexes on the
...
right table of a LEFT JOIN. Fix for ticket [4ba5abf65c5b0f9a96a7a40cd18b]
FossilOrigin-Name: aeb694e3f787f1f8b55650c17f90c197eee3f7f9b890a88f458c33e43009a082
2018-04-24 17:34:03 +00:00
drh
cd90ca7ded
Update the expert extension test cases to account for the fact that
...
EXPLAIN QUERY PLAN now shows the start of each trigger in its output.
FossilOrigin-Name: 8acb42f48929d908fe67a8536e240ca252a9ab780dce79eaa85b8fba35d52250
2018-04-24 16:51:38 +00:00
drh
cb23e5d5d1
All the OR optimization to proceed even if the OR is also converted into
...
an IN operator.
FossilOrigin-Name: e252c6540db266b93beeb47a8f7dbf3b275f8c782cd2d36ba4c00648c382f63f
2018-04-24 16:41:37 +00:00
drh
5776c139a4
Add a hyperlink to the ticket on the code comment for the fix to
...
ticket [7fa8049685b50b5aeb0c2].
FossilOrigin-Name: 45247c7f291bc0cc42600a4aa4ff7cdcd0a703fdfadcb0e12174c5250e70d503
2018-04-24 14:18:49 +00:00
dan
4da04f784f
Do not attempt to read values from indexes-on-expressions if the index is on
...
the RHS of a LEFT JOIN. This won't work if the index cursor points at a
null-row. Fix for [7fa80496].
FossilOrigin-Name: b8ef967ab1bebf2846c06c4f7200d6fa1c60e52e55711ea171c25ef1331f8a24
2018-04-24 14:05:14 +00:00
drh
4b5345ccc7
Enhance the CLI to render EXPLAIN QUERY PLAN using an ASCII-art graph.
...
This works with ".eqp" modes and when the query begins with exactly
"EXPLAIN QUERY PLAN". To see the original output format, add extra space
characters in between words of the initial "EXPLAIN QUERY PLAN".
FossilOrigin-Name: f53716ee2ab5a6d47a5551529aae526bb39058f4a8e11e6243b32c1ddc25a19e
2018-04-24 13:07:40 +00:00
drh
4d3e61403a
Fix a memory leak following failure to open an external CSV file in the
...
csv.c extension.
FossilOrigin-Name: 526ee07d19dbc8fd1af3a02a8da12b337020a4be40e045da9a19d0a7c2b6ab54
2018-04-24 10:57:10 +00:00
drh
8349c11d02
In EXPLAIN QUERY PLAN output, do not show an EXECUTE LIST SUBQUERY line for
...
IN operators where the RHS is a list and not a subquery, since in that case
there is no SUBQUERY to execute.
FossilOrigin-Name: 8bc0207abdeeb3ffac003703e78826759f07994698f6cdf40c89c3443ba22a47
2018-04-24 01:10:12 +00:00
drh
5279af8061
Fix to check-in [ca34c2dd20ee071e] - avoid a NULL pointer dereference
...
following an OOM.
FossilOrigin-Name: c7e6e848fa91f61bc980a031a17d4cd4784f93a1c9ffee35665efa1a59f2982a
2018-04-24 00:08:09 +00:00
drh
f49ff6ffb3
Fix a problem in sqlite3ExprCompare() associated with UPSERT.
...
FossilOrigin-Name: 67d0b2c15299dd20bca7254ecb33e71b5eee6024e2709bfdc36f877bf2a5679f
2018-04-23 20:38:40 +00:00
drh
fbe07539d3
Fix a formatting issue in the TreeView output for bare expression lists.
...
FossilOrigin-Name: a6356817815fe986c4d89475194e0537ebd46582d6df1034482bf08521182bdf
2018-04-23 20:04:38 +00:00
drh
48d219af4c
Add the ".imposter off" variant of the ".imposter" dot-command in the CLI.
...
FossilOrigin-Name: d3dad06ff1b163040c54dd215f30d6669cc2bc339001a362605f26f06eddf98c
2018-04-23 18:38:48 +00:00