]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
5 years agoFix a buffer overread that could occur when running fts5 prefix queries inside a... branch-3.19
drh [Tue, 3 Sep 2019 18:43:33 +0000 (18:43 +0000)] 
Fix a buffer overread that could occur when running fts5 prefix queries inside a transaction.

FossilOrigin-Name: 0770363b30382af76e87009192f3b59b8b089e2e2ad3dfac3392f52e78633a3b

5 years agoDisable the undocumented rtreenode() SQL function that is only used for testing,
drh [Tue, 3 Sep 2019 17:55:55 +0000 (17:55 +0000)] 
Disable the undocumented rtreenode() SQL function that is only used for testing,
except when doing a build that is specifically intended for testing.

FossilOrigin-Name: 34cd2d929e21e41373368da846ae4ddd6385c7ba0c45410903717a07aab862a3

6 years agoAdd new interfaces sqlite3_result_pointer(), and
dan [Wed, 19 Dec 2018 17:05:48 +0000 (17:05 +0000)] 
Add new interfaces sqlite3_result_pointer(), and
sqlite3_value_pointer() and use them to transfer the eponymous FTS3 column
pointer to the snippet() and offsets() routines.  Cherrypick from commit
[8201f4e1] on branch-3.18.

FossilOrigin-Name: 553a923c82e968104296253d07dc6e1219747d85ebb7b02640d33d7056418df4

6 years agoFix a crash that can follow an OOM in fts3 on this branch.
dan [Wed, 19 Dec 2018 14:44:20 +0000 (14:44 +0000)] 
Fix a crash that can follow an OOM in fts3 on this branch.

FossilOrigin-Name: de0781485701c138be58dcb0bb8eaa9dd2bad828ccafcc40db906f606d967639

6 years agoAdd extra defenses against strategically corrupt databases to fts3/4.
drh [Wed, 19 Dec 2018 01:44:50 +0000 (01:44 +0000)] 
Add extra defenses against strategically corrupt databases to fts3/4.

FossilOrigin-Name: 4f315e4a3d15b9196924db10dee9c1444964fc4590a153950bab9b1ec3ca4f0e

7 years agoFix a problem in test script thread001.test causing a spurious "-1 files were
dan [Fri, 16 Mar 2018 07:49:49 +0000 (07:49 +0000)] 
Fix a problem in test script thread001.test causing a spurious "-1 files were
left open" error when run separately. Cherrypick of [1774f1c3b].

FossilOrigin-Name: 6cf8172d9483ad321a38929a987f3bed637d87b1f58b17a894c64dc85d27204a

7 years agoAvoid running a couple of tests in crash8.test that depend on the presence of
dan [Tue, 6 Mar 2018 11:49:09 +0000 (11:49 +0000)] 
Avoid running a couple of tests in crash8.test that depend on the presence of
the journal file if running on an F2FS file-system that does not require a
journal file. Cherrypick of [797e02e0].

FossilOrigin-Name: eeedfc74d28a21305abf855f49e4418c9252c6918208d6ce110c001a628c7e3c

7 years agoIn SQLITE_ENABLE_BATCH_ATOMIC_WRITE builds on F2FS file-systems, invoke
dan [Fri, 2 Feb 2018 08:14:21 +0000 (08:14 +0000)] 
In SQLITE_ENABLE_BATCH_ATOMIC_WRITE builds on  F2FS file-systems, invoke
SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE if an SQLITE_FCNTL_COMMIT_ATOMIC_WRITE call
fails. Also, do not use an atomic transaction to create the initial database.
This is because if an error occurs while writing to the db file, any changes
to the file-size do not seem to be rolled back automatically. The only time
this matters is when the file was 0 bytes in size to start with. Cherrypick of
[b3122db154].

FossilOrigin-Name: 22a228edad3edf139b4cc78beaffb15a6f1999aa0ff198ee7b4ebe8074b42f48

7 years agoUpdate a couple of test scripts so that they work on F2FS file-systems that
dan [Fri, 2 Feb 2018 08:08:14 +0000 (08:08 +0000)] 
Update a couple of test scripts so that they work on F2FS file-systems that
support atomic transactions.

FossilOrigin-Name: 1b3946792730b536d0084cf9936624a456749c0059cee49fd69f36bec174c9c7

7 years agoFix a typo in test file crash8.test.
dan [Sat, 13 Jan 2018 14:07:24 +0000 (14:07 +0000)] 
Fix a typo in test file crash8.test.

FossilOrigin-Name: 4951d91d40ad3298b14e77f12dc27a43f261afc111e1ff61e1076217d5c43216

7 years agoFix various problems in test scripts preventing "make test" from passing on
dan [Sat, 13 Jan 2018 13:21:04 +0000 (13:21 +0000)] 
Fix various problems in test scripts preventing "make test" from passing on
F2FS file-systems with the "atomic-write" feature. Cherrypick of [56d93d07].

FossilOrigin-Name: 6a296d4d4d326f34f104a6632008050d1fff0e55118a428bc2df15cdef773b22

7 years agoVersion 3.19.4 version-3.19.4
drh [Fri, 18 Aug 2017 19:28:12 +0000 (19:28 +0000)] 
Version 3.19.4

FossilOrigin-Name: 605907e73adb4533b12d22be8422f17a8dc125b5c37bb391756a11fc3a8c4d10

7 years agoUse batch atomic writes when running on a recent F2FS filesystem, if compiled
drh [Mon, 31 Jul 2017 13:22:31 +0000 (13:22 +0000)] 
Use batch atomic writes when running on a recent F2FS filesystem, if compiled
with SQLITE_ENABLE_BATCH_ATOMIC_WRITE.

FossilOrigin-Name: 2dd0c77d54b333beee48c250e61c0002a03d34c5d4da07040ac414bdd36f56f9

7 years agoMove the generation of output column names earlier, to right after name
drh [Mon, 31 Jul 2017 13:11:26 +0000 (13:11 +0000)] 
Move the generation of output column names earlier, to right after name
resolution and before query transformations such as flattening.  This prevents
the names from getting mangled by query transformations, and obviates hacks
in the query flattener that attempt to work around the name mangling.
The resulting code is smaller and faster and gives more consistent output.
This is a fix for ticket [de3403bf5ae5f72ed] and a cherry-pick
of check-in [09834279aeca3bda]

FossilOrigin-Name: 499942b3eece097a6b1695ebe60d7eb3d7f3de397bc28ebf6b1fe038116487e8

7 years agoCorrectly handle an "INTEGER PRIMARY KEY UNIQUE" column in a WITHOUT ROWID
drh [Mon, 31 Jul 2017 12:19:40 +0000 (12:19 +0000)] 
Correctly handle an "INTEGER PRIMARY KEY UNIQUE" column in a WITHOUT ROWID
table.  This is a fix for ticket [bc115541132dad136], cherry-picked from
check-in [5216bfb73f1a49bdd8]

FossilOrigin-Name: 322a2ede6dae04a8e7e07fe0d99040f38f025fa142bd0493025ad6d65c2aaf6d

7 years agoIncrease the version number to 3.19.4
drh [Mon, 31 Jul 2017 12:07:52 +0000 (12:07 +0000)] 
Increase the version number to 3.19.4

FossilOrigin-Name: b77f297d38426a4d6da6d957f652d215f11327c09ed0f1d7e26306918dfa70ea

7 years agoMerge further enhancements to the batch-atomic-write subsystem. batch-atomic-write-3.19
drh [Mon, 31 Jul 2017 12:04:23 +0000 (12:04 +0000)] 
Merge further enhancements to the batch-atomic-write subsystem.

FossilOrigin-Name: 4be4265d74b8a46f6b0b0d9108efb1d2a3fb197d902bac1238e1ee03125f975a

7 years agoDisable the writecrash.test module on Windows. batch-atomic-write
drh [Fri, 28 Jul 2017 20:49:02 +0000 (20:49 +0000)] 
Disable the writecrash.test module on Windows.

FossilOrigin-Name: 4c0520d4df7473eb4cc764774df7d99bb96cf067ac224755e09f0df47fb2a810

7 years agoMore precise determination of when an in-memory journal needs to be
drh [Fri, 28 Jul 2017 18:16:14 +0000 (18:16 +0000)] 
More precise determination of when an in-memory journal needs to be
spilled to disk.

FossilOrigin-Name: 6a505bdd9347783d3d8105cb8185aa787801bad0c855b623cfd780fb406f0e7b

7 years agoAdd new extended error codes for the atomic write file-controls.
drh [Fri, 28 Jul 2017 13:18:35 +0000 (13:18 +0000)] 
Add new extended error codes for the atomic write file-controls.

FossilOrigin-Name: 94a2004756ffe027b3495be91366750135c294a9c460edc9a1b4b9422dcc33bd

7 years agoAdd new test file test/atomic.test.
dan [Fri, 28 Jul 2017 11:05:33 +0000 (11:05 +0000)] 
Add new test file test/atomic.test.

FossilOrigin-Name: f9213e4864d0542be5489e03cf40c47d9127a86bbbbbabd963aa08525d5dc97b

7 years agoBackport of all batch-atomic-write changes through check-in
drh [Fri, 28 Jul 2017 02:02:45 +0000 (02:02 +0000)] 
Backport of all batch-atomic-write changes through check-in
[67bad7fb9b]

FossilOrigin-Name: def55027b1f1db9c083830019dbcc3daed94f6cc70a76b285ac1af9d82f81695

7 years agoAdd the SQLITE_ENABLE_BATCH_ATOMIC_WRITE macro to ctime.c
drh [Fri, 28 Jul 2017 01:53:32 +0000 (01:53 +0000)] 
Add the SQLITE_ENABLE_BATCH_ATOMIC_WRITE macro to ctime.c

FossilOrigin-Name: 67bad7fb9b2fdb29b63308f22062444084dc28191a542e08076dc2e39caf6f62

7 years agoDo not set device-capabilities flags SEQUENTIAL or SAFE_APPEND for f2fs
dan [Thu, 27 Jul 2017 18:34:00 +0000 (18:34 +0000)] 
Do not set device-capabilities flags SEQUENTIAL or SAFE_APPEND for f2fs
file-systems.

FossilOrigin-Name: 4477e60cd801dab7a8aec12c5bc5e81e774bedbfed38abbc8eb8b37336141a44

7 years agoDo now allow the geometry object in the right operand of a MATCH operator in
drh [Thu, 27 Jul 2017 00:27:57 +0000 (00:27 +0000)] 
Do now allow the geometry object in the right operand of a MATCH operator in
the RTREE extension to be inpersonated by a BLOB literal.

FossilOrigin-Name: 24c9cd460051781f7e6417b7e205274319258f061ae1191a6c5ff5af615439c9

7 years agoAdd a test for the outcome of a process crash within an xWrite VFS method
dan [Sat, 22 Jul 2017 20:12:31 +0000 (20:12 +0000)] 
Add a test for the outcome of a process crash within an xWrite VFS method
call.

FossilOrigin-Name: eb8718006cb23ba9304da5c30d19863d688495f0eaae3794c5ad870e481866f8

7 years agoAdd the "atomic-batch-write" permutation to permutations.test. This
dan [Sat, 22 Jul 2017 16:58:47 +0000 (16:58 +0000)] 
Add the "atomic-batch-write" permutation to permutations.test. This
permutation fails if not run on a file-system that supports
atomic-batch-writes.

FossilOrigin-Name: 9f1b83fae9c973eee80eefefe7bd3a1eb7bba8af4cd919d7a2ce911900dd9087

7 years agoKeep batch-atomic-writes turned on for journal_mode=MEMORY, but turn them
drh [Sat, 22 Jul 2017 16:32:33 +0000 (16:32 +0000)] 
Keep batch-atomic-writes turned on for journal_mode=MEMORY, but turn them
off for synchronous=OFF.  Refuse to compile with both SQLITE_MMAP_READWRITE
and SQLITE_ENABLE_BATCH_ATOMIC_WRITE.  Fix up some comments in the commit
logic.

FossilOrigin-Name: 2e80e19e4faac30947ed56aa3601c45c758cafb27f84780df255fdbcdc9a6999

7 years agoOmit unused batch-atomic-write code if SQLITE_ENABLE_BATCH_ATOMIC_WRITE is
drh [Sat, 22 Jul 2017 16:00:34 +0000 (16:00 +0000)] 
Omit unused batch-atomic-write code if SQLITE_ENABLE_BATCH_ATOMIC_WRITE is
not defined.

FossilOrigin-Name: a89b62c4966cd297326e8712da40e0962d2328d7ba1f201d5abcec911eeef347

7 years agoUse ioctl(F2FS_IOC_GET_FEATURES) to determine whether or not atomic batch
dan [Fri, 21 Jul 2017 21:06:24 +0000 (21:06 +0000)] 
Use ioctl(F2FS_IOC_GET_FEATURES) to determine whether or not atomic batch
writes are available.

FossilOrigin-Name: 532bbf1f2b1028db4e581c756533aa660e482d833caaed4eafb299ef9b584f3a

7 years agoFix typo in comment. No changes to code.
mistachkin [Fri, 21 Jul 2017 20:29:06 +0000 (20:29 +0000)] 
Fix typo in comment.  No changes to code.

FossilOrigin-Name: 65ec077ba63ab84ab8da91033adcf4a57bb9269ebcdd10f9e6c97c265512a80c

7 years agoAdditional documentation on the new VFS interface. No changes to code.
drh [Fri, 21 Jul 2017 14:49:58 +0000 (14:49 +0000)] 
Additional documentation on the new VFS interface.  No changes to code.

FossilOrigin-Name: 83077ec8b5804e6c709fa4f0b50afec9eae6d5b603cc4c3e8a408ed6b2bfaf28

7 years agoAdd the documentation text for the new VFS interfaces used by batch-atomic
drh [Thu, 20 Jul 2017 21:18:49 +0000 (21:18 +0000)] 
Add the documentation text for the new VFS interfaces used by batch-atomic
writes.

FossilOrigin-Name: 5e944eea5a32cb4d27a2d5ae283b9ce6fe08c1bc584256e8e8c78583c415eb2a

7 years agoTransform two #ifdef statements into #if statements.
drh [Thu, 20 Jul 2017 21:01:53 +0000 (21:01 +0000)] 
Transform two #ifdef statements into #if statements.

FossilOrigin-Name: f2c6b5845028ef25dcd17e23e11b93c9f7296c26c7a21718fdae8f4b48c4e1da

7 years agoSplit SQLITE_ENABLE_ATOMIC_WRITE into two options - the original and
dan [Thu, 20 Jul 2017 21:00:03 +0000 (21:00 +0000)] 
Split SQLITE_ENABLE_ATOMIC_WRITE into two options - the original and
SQLITE_ENABLE_BATCH_ATOMIC_WRITE.

FossilOrigin-Name: 7eb9bf2c5b42c39901fd571553c1f70aa5a9dac71fdc8e318b3063b928ad58f7

7 years agoAdd support for F2FS atomic writes. Untested at this point.
dan [Thu, 20 Jul 2017 19:49:14 +0000 (19:49 +0000)] 
Add support for F2FS atomic writes. Untested at this point.

FossilOrigin-Name: 416973ede3bde8567d1f2699728f72352979e054ef988d1c1e1cfe4290f6f8b8

7 years agoEnhance the built-in date/time functions so that they can be used in
drh [Thu, 20 Jul 2017 15:08:43 +0000 (15:08 +0000)] 
Enhance the built-in date/time functions so that they can be used in
CHECK constraints, in the WHERE clause or partial indexes, and index
expressions, provided that none of the non-deterministic keywords
("now", "localtime", "utc") are used as arguments.

FossilOrigin-Name: a90c062d46c63a1e6f83064b1c5afb26a16e93b6ee8620ca46d169fdb325c488

7 years agoNew test cases for date/time functions in indexes on expressions, in the index-on-date-func
drh [Thu, 20 Jul 2017 14:36:26 +0000 (14:36 +0000)] 
New test cases for date/time functions in indexes on expressions, in the
WHERE clause of partial indexes, and in CHECK constraints.

FossilOrigin-Name: b7f70c7fcabc10b8b3e62fe5ac68476cec23acaee037c7250ff70bca3f3ab541

7 years agoCombine the Parse.ckBase and Parse.iSelfTab fields into just Parse.iSelfTab.
drh [Thu, 20 Jul 2017 13:17:08 +0000 (13:17 +0000)] 
Combine the Parse.ckBase and Parse.iSelfTab fields into just Parse.iSelfTab.
This fixes a problem with date/time functions in check-constraints.  Add
some test cases for date/time functions in index expressions and check
constraints.

FossilOrigin-Name: 22eda0985ecd1f456c073e6ad735a8417f3ff1fb6aaad1640e1cec01e50c51d8

7 years agoAllow indexes to be created on date/time functions as long as the 'now'
drh [Wed, 19 Jul 2017 19:48:40 +0000 (19:48 +0000)] 
Allow indexes to be created on date/time functions as long as the 'now'
date and the 'localtime' and 'utc' modifiers are not used.

FossilOrigin-Name: 0a5e1c04d9d07bb7fd6546a9ddac1bf42b19ea19c2b79570aea6cd4226887a27

7 years agoRemove some 'breakpoint' commands in test files.
mistachkin [Wed, 19 Jul 2017 18:01:42 +0000 (18:01 +0000)] 
Remove some 'breakpoint' commands in test files.

FossilOrigin-Name: d14fc621e918915bbf8e04597eb238ea78dff3d9c5eb4402cb88692d00dbdfee

7 years agoAdd further tests to unionvtab.test.
dan [Wed, 19 Jul 2017 11:52:25 +0000 (11:52 +0000)] 
Add further tests to unionvtab.test.

FossilOrigin-Name: c93284cd65b6471bffc38696e14dc24a2170698faf566cf91b727ba272f88c25

7 years agoAdd VFS interfaces needed to make use of batch atomic write capabilities
drh [Wed, 19 Jul 2017 11:20:32 +0000 (11:20 +0000)] 
Add VFS interfaces needed to make use of batch atomic write capabilities
in the underlying filesystem.

FossilOrigin-Name: 929bc46b8be0111a7b6e3d6fe129f0cad869c6a551bd47569c122742597b9f1c

7 years agoFix a crash in unionvtab caused by a misconfiguration. Add other test cases
dan [Tue, 18 Jul 2017 21:19:17 +0000 (21:19 +0000)] 
Fix a crash in unionvtab caused by a misconfiguration. Add other test cases
for the same.

FossilOrigin-Name: 255d6b99de2bb210c09ebee9f9481ba3d1130fda47e6e01b4cc8411d00679d09

7 years agoFix shell.c.in so that it aligns with shell.c.
drh [Tue, 18 Jul 2017 20:59:40 +0000 (20:59 +0000)] 
Fix shell.c.in so that it aligns with shell.c.

FossilOrigin-Name: 505fdc8ff5150276d3c6ab6135a542b791e9e79e2f76323e592b73b3fdc9bc2a

7 years agoAdd test cases and fix minor error-handling issues in unionvtab.c.
dan [Tue, 18 Jul 2017 20:49:15 +0000 (20:49 +0000)] 
Add test cases and fix minor error-handling issues in unionvtab.c.

FossilOrigin-Name: deadaad2a0801b3c30d2a076d8eb006b62d8557cff820e0939741c078477c83f

7 years agoFix duplicate test name. No changes to code.
mistachkin [Tue, 18 Jul 2017 20:30:55 +0000 (20:30 +0000)] 
Fix duplicate test name.  No changes to code.

FossilOrigin-Name: 47b80ecc679e656ef865e73809d6a9aa485eceeacab86d10d405881c5d9872bd

7 years agoFix another harmless compiler warning. Get the MSVC makefile working with unionvtab.
drh [Tue, 18 Jul 2017 20:28:34 +0000 (20:28 +0000)] 
Fix another harmless compiler warning.  Get the MSVC makefile working with unionvtab.

FossilOrigin-Name: d49639c208ac366f6c675ac5671accc2a597558b62a51520194276c61f32d406

7 years agoSuppress harmless compiler warnings in union-vtab.
drh [Tue, 18 Jul 2017 20:22:12 +0000 (20:22 +0000)] 
Suppress harmless compiler warnings in union-vtab.

FossilOrigin-Name: 4d147a1e28b93e267889fcb01b538d6a2a58d6b1655512c883fa5b53ddcc60a4

7 years agoRemove an unused variable from unionvtab.c.
dan [Tue, 18 Jul 2017 20:17:52 +0000 (20:17 +0000)] 
Remove an unused variable from unionvtab.c.

FossilOrigin-Name: a447fdf182c9090ca5b6c9c13147ae4b78d22d67f416ee7a0436ca408284c8fe

7 years agoImprove the readability of the unionvtab code.
dan [Tue, 18 Jul 2017 20:03:49 +0000 (20:03 +0000)] 
Improve the readability of the unionvtab code.

FossilOrigin-Name: 5bcf0f86ea7fbbc31a13b2d5b1cf93a92e46fb65fe8e779b3d7e4a98d60d7061

7 years agoHave unionvtab support constraints on the column that corresponds to the
dan [Tue, 18 Jul 2017 19:51:11 +0000 (19:51 +0000)] 
Have unionvtab support constraints on the column that corresponds to the
INTEGER PRIMARY KEY field of the underlying source tables in the same way as
rowid.

FossilOrigin-Name: 4a6c416fa025a34116ea30923a673cbb108b251b2676734ec8f603600e38e50e

7 years agoAdd test cases to unionvtab.test.
dan [Tue, 18 Jul 2017 18:50:37 +0000 (18:50 +0000)] 
Add test cases to unionvtab.test.

FossilOrigin-Name: 6c9128e1a53f8cf26de9ef1bc07051f2c94287531edacfcfb69d3cd7590240b3

7 years agoAdd the union-vtab extension - still experimental and under active
drh [Tue, 18 Jul 2017 18:19:35 +0000 (18:19 +0000)] 
Add the union-vtab extension - still experimental and under active
development.

FossilOrigin-Name: 948f95046b7eaa8c68617b36625a7500dd0e69e52425ac6d748f2a311eb2474a

7 years agoDo not use the flattening optimization for a sub-query on the RHS of a LEFT
dan [Tue, 18 Jul 2017 17:34:41 +0000 (17:34 +0000)] 
Do not use the flattening optimization for a sub-query on the RHS of a LEFT
JOIN if that subquery reads data from a virtual table. Because it prevents the
planner from creating an automatic index on the results of the sub-query, the
flattening optimization sometimes slows things down in this case.

FossilOrigin-Name: 9dbae1df75219e2accd8993015ce0ffc21966d7e69d04178b1a2cc46207fe260

7 years agoAvoid creating an automatic index on the RHS of a LEFT JOIN to optimize an IS
dan [Tue, 18 Jul 2017 17:13:41 +0000 (17:13 +0000)] 
Avoid creating an automatic index on the RHS of a LEFT JOIN to optimize an IS
term. Fix for [ce68383b].

FossilOrigin-Name: d2f0b2e859a8a413ee4e4bd7040e450ccd604069e4ea8dbc9ff924718c2b14d7

7 years agoChange the default command-line shell history depth to 2000 lines.
drh [Tue, 18 Jul 2017 14:41:44 +0000 (14:41 +0000)] 
Change the default command-line shell history depth to 2000 lines.

FossilOrigin-Name: 0b69aa7e37495f15c3fcc36969b650262b5aa5500fb40800de9a5c56a03f309d

7 years agoAdd test cases to test/unionvtab.test.
dan [Mon, 17 Jul 2017 21:03:13 +0000 (21:03 +0000)] 
Add test cases to test/unionvtab.test.

FossilOrigin-Name: f2c4a584e83ffcc1cedd39460eb06d6f231a1a87f269bb3e75055232a866067e

7 years agoEnhance error detection and fix other issues in unionvtab code.
dan [Mon, 17 Jul 2017 20:25:21 +0000 (20:25 +0000)] 
Enhance error detection and fix other issues in unionvtab code.

FossilOrigin-Name: 9c3f1b9a82e500e015deb0cc669fbb32e7f0cdc69f926ceff383ab946f8d8d18

7 years agoMerge all changes from branch-3.20. Improvements to the fts5() extension
drh [Mon, 17 Jul 2017 18:45:23 +0000 (18:45 +0000)] 
Merge all changes from branch-3.20.  Improvements to the fts5() extension
interface.  Work around a gcc/valgrind bug in the sqlite3_value_pointer()
interface.

FossilOrigin-Name: e0aca7d2c60d9859750a6e98d3e3b87f79779a45920348fc1bda7f1cb93ef996

7 years agoInterchange to branches within an "if" statement in sqlite3_value_pointer()
drh [Mon, 17 Jul 2017 17:46:29 +0000 (17:46 +0000)] 
Interchange to branches within an "if" statement in sqlite3_value_pointer()
in order to work around a bug in gcc.

FossilOrigin-Name: 8a606e4abab4efa03f2e5ffc33d7c5faa3c663f339da87b4ce9f3feed5dc7194

7 years agoImproved the interface to the fts5() extension mechanism for enhanced
drh [Mon, 17 Jul 2017 15:38:57 +0000 (15:38 +0000)] 
Improved the interface to the fts5() extension mechanism for enhanced
security.

FossilOrigin-Name: bc78235f547977f1a821342ca8f3e03103a0eb351f8b3115ac10b43dd9c7044d

7 years agoMerge the pointer-type enhancement from the 3.20 branch.
drh [Mon, 17 Jul 2017 13:37:07 +0000 (13:37 +0000)] 
Merge the pointer-type enhancement from the 3.20 branch.

FossilOrigin-Name: 9e8e1c4aa14bcda165b392d1d8af2ce394a56a8e7b67e4c73c742d8da75e73e2

7 years agoComment changes clarifying details of the pointer-type parameter. No
drh [Mon, 17 Jul 2017 12:41:29 +0000 (12:41 +0000)] 
Comment changes clarifying details of the pointer-type parameter.  No
changes to code.

FossilOrigin-Name: e4579e50a1ece4f65dfdae39d5c1670f0e3f7d4824e7d242f07ec9859d15155f

7 years agoAdd the pointer-type parameter to sqlite3_bind_pointer(),
drh [Mon, 17 Jul 2017 12:27:43 +0000 (12:27 +0000)] 
Add the pointer-type parameter to sqlite3_bind_pointer(),
sqlite3_result_pointer(), and sqlite3_value_pointer().  The pointer type is
a static string that must match (according to strcmp()) or else the pointer
is passed as a NULL.  This is a security measure to prevent crossing pointers
between different extensions.

FossilOrigin-Name: e1196567fcbc313657836262ed9f71668b1c47f26e4bc57c7880ff40079d66cc

7 years agoImprove the sqlite3_result_pointer() interface so that it cannot be faked pointer-types
drh [Mon, 17 Jul 2017 11:39:46 +0000 (11:39 +0000)] 
Improve the sqlite3_result_pointer() interface so that it cannot be faked
using sqlite3_result_null() and sqlite3_result_subtype().

FossilOrigin-Name: c13264d5ef0470fb24e09f7bc12f19be3b77eab06d41f55607b38dddb532a132

7 years agoAdd an experimental "pointer type" parameter to sqlite3_bind_pointer(),
drh [Mon, 17 Jul 2017 00:40:19 +0000 (00:40 +0000)] 
Add an experimental "pointer type" parameter to sqlite3_bind_pointer(),
sqlite3_result_pointer(), and sqlite3_value_pointer().  The pointer type is
a string that must compare equal using strcmp() or else the pointer comes
through as a NULL.

FossilOrigin-Name: 211cce04e97d2e325a6ea3e99738fc71115d673dc13daeffb03ac3140deb11de

7 years agoAdd the "unionvtab" virtual table extension in ext/misc/unionvtab.c.
dan [Sat, 15 Jul 2017 20:48:30 +0000 (20:48 +0000)] 
Add the "unionvtab" virtual table extension in ext/misc/unionvtab.c.

FossilOrigin-Name: 62a86aa6c0519cf1fa232169122d3d6ae8d2f66b20530fb934a82a15712bd2f0

7 years agoMerge the fix for ticket [a4e06e75a9ab61a12] from trunk.
drh [Sat, 15 Jul 2017 20:44:33 +0000 (20:44 +0000)] 
Merge the fix for ticket [a4e06e75a9ab61a12] from trunk.

FossilOrigin-Name: b64d64c84484162d1822430036ba0483365a39ef4cf82cd6a7b9436d9e9f50c8

7 years agoFix a register allocation problem in PRAGMA integrity_check that caused
drh [Sat, 15 Jul 2017 20:33:19 +0000 (20:33 +0000)] 
Fix a register allocation problem in PRAGMA integrity_check that caused
the same register to be used for two different purposes on the first
ATTACHed database if the schema for the ATTACHed database was noticable
more complex than the schema for the first database.
Fix for ticket [a4e06e75a9ab61a1].

FossilOrigin-Name: 253945d480b052bfe311888022b5eb0be91c8c80cda05036e58207d57520262c

7 years agoFix a missing \n at the end of a comment causing a line to be too long.
drh [Sat, 15 Jul 2017 20:25:22 +0000 (20:25 +0000)] 
Fix a missing \n at the end of a comment causing a line to be too long.
No code changes.

FossilOrigin-Name: 687bd478710eb827e041533eea67115464f5a0de767bb6cfdbe36a0d3c597fa1

7 years agoEnhance the showstat4 utility program to show the full precision of
drh [Sat, 15 Jul 2017 17:57:31 +0000 (17:57 +0000)] 
Enhance the showstat4 utility program to show the full precision of
floating point values in sqlite_stat4 tables.

FossilOrigin-Name: 5ec37c62f65b2870dcd7a906912da787367f3912a96b6f3536355fad65903575

7 years agoMinor change to one of the command-line shell test scripts to make that
drh [Sat, 15 Jul 2017 13:49:56 +0000 (13:49 +0000)] 
Minor change to one of the command-line shell test scripts to make that
script compatible with Tcl 8.5.

FossilOrigin-Name: 47cf83a0682b7b3219cf255457f5fbe05f3c1f46be42f6bbab33b78a57a252f6

7 years agoFirst release candidate for version 3.20.0.
drh [Sat, 15 Jul 2017 13:35:17 +0000 (13:35 +0000)] 
First release candidate for version 3.20.0.

FossilOrigin-Name: 035a86ec3e4abd2173bfd0d8666ec86bd85af414cb791e68e6334447ecd35b84

7 years agoFix another minor problem in test file like.test.
dan [Sat, 15 Jul 2017 08:02:10 +0000 (08:02 +0000)] 
Fix another minor problem in test file like.test.

FossilOrigin-Name: 0953e74612358f48a9c9e3772876b514bc79784f277497121c59302a3106110c

7 years agoFix test problems causing the "prepare" permutation test to fail.
dan [Sat, 15 Jul 2017 06:35:15 +0000 (06:35 +0000)] 
Fix test problems causing the "prepare" permutation test to fail.

FossilOrigin-Name: b61cc5a0f9f2c2d2175ad30fc3fa4cb2086dbb948d5a5cc538ac43b871bb5221

7 years agoFix test problems with stmtvtab1.test under some permutations.
dan [Fri, 14 Jul 2017 20:53:21 +0000 (20:53 +0000)] 
Fix test problems with stmtvtab1.test under some permutations.

FossilOrigin-Name: ad6699d476b93131887e30475517764e281647f94df4a8248e2b88f1f14da91d

7 years agoFix a typo in a comment used to generate documentation. No code changes.
drh [Fri, 14 Jul 2017 19:52:47 +0000 (19:52 +0000)] 
Fix a typo in a comment used to generate documentation.  No code changes.

FossilOrigin-Name: 65f9f29c58f61646d700eee6610ce85b572306f0ce2f19bebfd37632523019e5

7 years agoIdentify requirements text in the SQLITE_DBCONFIG_ENABLE_QPSG documentation.
drh [Fri, 14 Jul 2017 19:47:32 +0000 (19:47 +0000)] 
Identify requirements text in the SQLITE_DBCONFIG_ENABLE_QPSG documentation.
Add some implementation marks for SQLITE_DBCONFIG_MAINDBNAME requirements.
No code changes.

FossilOrigin-Name: ab165dcf35ae7385c9366853ce5648294bf5dc9aa9ffe1af84243e6fac3472fc

7 years agoAdd requirements marks for some of the new features in the 3.20 release.
drh [Fri, 14 Jul 2017 19:22:08 +0000 (19:22 +0000)] 
Add requirements marks for some of the new features in the 3.20 release.

FossilOrigin-Name: 264238671379306b14d62a6ddaefd2a20acd34ca77276b6ce872253160fe0146

7 years agoTweak Makefile.in so that testfixture can be built with the
dan [Fri, 14 Jul 2017 19:12:26 +0000 (19:12 +0000)] 
Tweak Makefile.in so that testfixture can be built with the
--disable-amalgamation configure switch.

FossilOrigin-Name: 394c6f4f4376bc3d7796ea4157ba2ae230b0ca950774eff127ae6ef8a7b08602

7 years agoModify mkopcodeh.tcl so that it can handle "same as" opcodes with values
dan [Fri, 14 Jul 2017 17:50:11 +0000 (17:50 +0000)] 
Modify mkopcodeh.tcl so that it can handle "same as" opcodes with values
larger than the total number of opcodes.

FossilOrigin-Name: 1eb56fe0305f0841b14865b7560add3da529b211328f5fa171b9628418a6ed49

7 years agoIn the LSM1 virtual table, dequote the filename before opening the file.
drh [Fri, 14 Jul 2017 15:57:56 +0000 (15:57 +0000)] 
In the LSM1 virtual table, dequote the filename before opening the file.

FossilOrigin-Name: 6ed4ef03ff6f22ae83a14facc48ce594911d7d7b37446436b68af3a822578fae

7 years agoChanges to the LSM1 Tcl tests to make things work on Win32.
mistachkin [Fri, 14 Jul 2017 15:45:27 +0000 (15:45 +0000)] 
Changes to the LSM1 Tcl tests to make things work on Win32.

FossilOrigin-Name: 7dc5e70ef1faa0b51a04abdfe1ee2f9ea5c2d0f99ea8ef6260b9de02500cf8b2

7 years agoInclude a hint in the header comment of the LSM1 makefile about how to
drh [Fri, 14 Jul 2017 15:42:11 +0000 (15:42 +0000)] 
Include a hint in the header comment of the LSM1 makefile about how to
set the LSMOPTS variable.

FossilOrigin-Name: b5e3b264814cde9572130b70fc0d21ccebc2d7f5f0e7db50b6395cb63723383e

7 years agoUpdate the Makefile for LSM1 so that the LSMOPTS can be set prior to
drh [Fri, 14 Jul 2017 15:32:11 +0000 (15:32 +0000)] 
Update the Makefile for LSM1 so that the LSMOPTS can be set prior to
including the Makefile, in order to add platform arguments such as -fPIC.

FossilOrigin-Name: fe319bcd7f85e9997babdb024ab350514524f5901903600fa9780bdcd1805098

7 years agoFix a typo in the header comment to the remember extension. No code changes.
drh [Fri, 14 Jul 2017 15:18:51 +0000 (15:18 +0000)] 
Fix a typo in the header comment to the remember extension. No code changes.

FossilOrigin-Name: 604b9664f4dd6e8d188b5c57407edbbe0639345f8d30bf2d19016f8324934840

7 years agoChange the name of the STMT virtual table to SQLITE_STMT. Also remove the
drh [Fri, 14 Jul 2017 15:14:21 +0000 (15:14 +0000)] 
Change the name of the STMT virtual table to SQLITE_STMT.  Also remove the
first column of that virtual table, which was a pointer leak.

FossilOrigin-Name: 1bc4e93407b7894b0271fbde3720930dcaadda6070e871d9719c4e8dc65b915f

7 years agoMinor updates to requirements marks and documention. No changes to code.
drh [Fri, 14 Jul 2017 13:24:31 +0000 (13:24 +0000)] 
Minor updates to requirements marks and documention.  No changes to code.

FossilOrigin-Name: 8f6dd5e2907d6df230fcbceadd226496bcc35a33c117da58215f7d333c1cc7b8

7 years agoAdd very simple tcl tests for the lsm1 extension.
dan [Fri, 14 Jul 2017 11:40:48 +0000 (11:40 +0000)] 
Add very simple tcl tests for the lsm1 extension.

FossilOrigin-Name: 5e0a97930b08fff1c3a29f5c8b2962b856e3302209228c0e71b9f1a1bd2a4be3

7 years agoMinor tweaks to documentation. No code changes.
drh [Fri, 14 Jul 2017 04:16:03 +0000 (04:16 +0000)] 
Minor tweaks to documentation.  No code changes.

FossilOrigin-Name: d8cd0434f3451e27aefe38a1a9efdc4dfded2ea33baf25d82814c89264f3afff

7 years agoFix harmless compiler warnings in the readline tab-completion logic of the
drh [Fri, 14 Jul 2017 00:28:28 +0000 (00:28 +0000)] 
Fix harmless compiler warnings in the readline tab-completion logic of the
command-line shell.

FossilOrigin-Name: 271ca4acfcff448cf863045595d2c2616decd13b6015d7db481c91e2ad5bb92a

7 years agoImproved documentation for the new sqlite3_bind_pointer() interface and its
drh [Thu, 13 Jul 2017 22:39:15 +0000 (22:39 +0000)] 
Improved documentation for the new sqlite3_bind_pointer() interface and its
cousins.

FossilOrigin-Name: 889968bdbf1c258238cb68d82f059e16366c4a40c2d541dd4a1811ab72e693cb

7 years agoImprovements to the documentation for SQLITE_PREPARE_PERSISTENT.
drh [Thu, 13 Jul 2017 22:03:34 +0000 (22:03 +0000)] 
Improvements to the documentation for SQLITE_PREPARE_PERSISTENT.
No code changes.

FossilOrigin-Name: 265778142485882f39edfb5756175b2675c1993f0d6395dabbcbbb3767c6ec77

7 years agoFix documentation typo. No changes to code.
drh [Thu, 13 Jul 2017 20:11:52 +0000 (20:11 +0000)] 
Fix documentation typo.  No changes to code.

FossilOrigin-Name: 9319f7b71f68c9dc64c22c60b90650955b72f6bd9852d5ea86fa96a5c6fede37

7 years agoUpdate header comments on the carray() and remember() extensions to bring
drh [Thu, 13 Jul 2017 19:11:13 +0000 (19:11 +0000)] 
Update header comments on the carray() and remember() extensions to bring
out the fact that the pointer arguments must be bound using
sqlite3_bind_pointer().

FossilOrigin-Name: 55f5396576d186f310cb0fa66fbdb8ea68c18a3d0fe5de4b395ea03c7aa04c9e

7 years agoAdd new interfaces sqlite3_bind_pointer(), sqlite3_result_pointer(), and
drh [Thu, 13 Jul 2017 18:09:36 +0000 (18:09 +0000)] 
Add new interfaces sqlite3_bind_pointer(), sqlite3_result_pointer(), and
sqlite3_value_pointer() used to safely move pointer values through SQL without
exposing underlying memory address information.

FossilOrigin-Name: 72de49f204277191f62601cce70d5013ec30b564a01063f1e841019c78ae6c77

7 years agoFix an incorrect type signature for the loadable extension pointer bind-pointer
drh [Thu, 13 Jul 2017 17:56:52 +0000 (17:56 +0000)] 
Fix an incorrect type signature for the loadable extension pointer
for sqlite3_result_pointer().

FossilOrigin-Name: 0bd7875bd9948836a14061275eb8ddac627f562a49f59f400ec98c00e2be82c5

7 years agoAdd the three new pointer interfaces to the loadable extension mechanism.
drh [Thu, 13 Jul 2017 17:54:12 +0000 (17:54 +0000)] 
Add the three new pointer interfaces to the loadable extension mechanism.
Update sqlite3_value_subtype() documentation to remove the statement about
it not being used internally.

FossilOrigin-Name: e5a518038fcb23376d2b17d4d70648320bc5540c5bd8b164201044ebe1ce45c5

7 years agoUpdate the FTS3 extension to use sqlite3_result_pointer() and
drh [Thu, 13 Jul 2017 17:48:14 +0000 (17:48 +0000)] 
Update the FTS3 extension to use sqlite3_result_pointer() and
sqlite3_value_pointer() for passing FTS3 cursor objects from the table
into functions such as snippet().

FossilOrigin-Name: 0fa2e170e5e078d155c98b212ade36bd8424502ae07f2d82ebf77a76f57586ba