]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
6 years agoMerge changes from wal2 branch.
dan [Mon, 17 Dec 2018 15:22:44 +0000 (15:22 +0000)] 
Merge changes from wal2 branch.

FossilOrigin-Name: 85f49f0d7344611ac4157421273660c648f73ca62afa4faa8707475f21c67f7a

6 years agoAdd extra test case to wal2recover.test.
dan [Mon, 17 Dec 2018 15:22:24 +0000 (15:22 +0000)] 
Add extra test case to wal2recover.test.

FossilOrigin-Name: 1a5aa73435b11fff0567672dc921d34aad57adf0381ad430e1389f39a6f025b7

6 years agoMerge latest wal2 changes into this branch.
dan [Sat, 15 Dec 2018 20:59:14 +0000 (20:59 +0000)] 
Merge latest wal2 changes into this branch.

FossilOrigin-Name: 06bb80eeb84f57b1e8109a35f5b14992a2e23f2bf5a8921fa29087f96cb44d10

6 years agoFurther test cases for wal2 mode.
dan [Sat, 15 Dec 2018 20:20:13 +0000 (20:20 +0000)] 
Further test cases for wal2 mode.

FossilOrigin-Name: 9cb5f8dab685f5ea36ad142cfa588dee82e87f3a89e8dcf84e0ee124bb29bc7f

6 years agoAdd further tests for wal2 mode.
dan [Fri, 14 Dec 2018 19:53:39 +0000 (19:53 +0000)] 
Add further tests for wal2 mode.

FossilOrigin-Name: 54e628f902a5508badc8941ceda1bec12fe8f58969c91c670a37888ef2681880

6 years agoAdd tests cases for recovery in wal2 mode.
dan [Thu, 13 Dec 2018 16:26:43 +0000 (16:26 +0000)] 
Add tests cases for recovery in wal2 mode.

FossilOrigin-Name: 34f56f8a4239781071edf6317723d0a7333249551c2c1ce7ed39fc116d53d780

6 years agoAdd new test file wal2big.test.
dan [Wed, 12 Dec 2018 20:39:38 +0000 (20:39 +0000)] 
Add new test file wal2big.test.

FossilOrigin-Name: e3e50bcdab8c91e003942d84430b3e580e034141236d19dda0e8af4ecf0e085b

6 years agoAdd tests to ensure that each of the 4 wal read-locks does what it is supposed to.
dan [Wed, 12 Dec 2018 19:04:19 +0000 (19:04 +0000)] 
Add tests to ensure that each of the 4 wal read-locks does what it is supposed to.

FossilOrigin-Name: 4d5779f31d4931edb8bb8952d8886625ead5e51f0c308e5763e519427f6609e1

6 years agoChange the way wal2 locks work to ensure a reader only ever has to lock a
dan [Tue, 11 Dec 2018 17:56:23 +0000 (17:56 +0000)] 
Change the way wal2 locks work to ensure a reader only ever has to lock a
single slot.

FossilOrigin-Name: 18b2c23ac53d985ccc5798ea2d92fb75644b857c373fb490e0d04d5d0194a3d5

6 years agoMerge latest trunk changes into this branch.
dan [Tue, 11 Dec 2018 13:44:59 +0000 (13:44 +0000)] 
Merge latest trunk changes into this branch.

FossilOrigin-Name: d8dd98a39ea061dea264a7d81153f7b1be2f81b554b30d0ce289897c802209bd

6 years agoSmall performance improvement in sqlite3_step().
drh [Tue, 11 Dec 2018 12:51:46 +0000 (12:51 +0000)] 
Small performance improvement in sqlite3_step().

FossilOrigin-Name: d1db8d5894450b24bb0335983503d9bbf6cc48a0ae4b83291283fb2d32b6b25b

6 years agoSmall performance improvement in the sqlite3_bind() family of interfaces.
drh [Tue, 11 Dec 2018 12:20:41 +0000 (12:20 +0000)] 
Small performance improvement in the sqlite3_bind() family of interfaces.

FossilOrigin-Name: 1dc0c3df32572f09265fc73eeaa0748159e0e9523b9b2d6768b834a29c909968

6 years agoFurther refinements to the sqlite3_normalized_sql() interface. TH3 now
drh [Mon, 10 Dec 2018 20:01:40 +0000 (20:01 +0000)] 
Further refinements to the sqlite3_normalized_sql() interface.  TH3 now
gives 100% MC/DC on that interface.

FossilOrigin-Name: c96bf6cca220e363b099455ce35195ce7e89d374a52dc787f56e7b11e587bced

6 years agoRefactor the sqlite3_normalized_sql() implementation.
drh [Mon, 10 Dec 2018 18:15:44 +0000 (18:15 +0000)] 
Refactor the sqlite3_normalized_sql() implementation.

FossilOrigin-Name: 06e955e5d2b857b9ce94a73fb174b620c101bdb160842f9a0e958bdb48e8c987

6 years agoFix issues with the new normalizer. normalize-refactor
drh [Mon, 10 Dec 2018 16:49:33 +0000 (16:49 +0000)] 
Fix issues with the new normalizer.

FossilOrigin-Name: 057d7d40c56b7416a59a79cb627b2b3e5837eca2d6dbcb50127baaadf1941f51

6 years agoRefactor the sqlite3_normalized_sql() implementation. This is a
drh [Mon, 10 Dec 2018 16:00:57 +0000 (16:00 +0000)] 
Refactor the sqlite3_normalized_sql() implementation. This is a
work-in-progress. There are still issues.

FossilOrigin-Name: a4c890b0af9786295e6df05022009d8946550adb873535c610be805c2b7a4083

6 years agoFix a problem with using "<db>-vacuum" (the default) as the state database
dan [Mon, 10 Dec 2018 08:41:32 +0000 (08:41 +0000)] 
Fix a problem with using "<db>-vacuum" (the default) as the state database
when resuming an RBU vacuum.

FossilOrigin-Name: c878d741733a897d47a1a0b57b454bc9095ce302b48cc01089336d5d20e2a24c

6 years agoAdd support for the VACUUM INTO command.
drh [Mon, 10 Dec 2018 01:48:29 +0000 (01:48 +0000)] 
Add support for the VACUUM INTO command.

FossilOrigin-Name: 77f150b8b46761f4f62f9d8926c10a95a70589a4525393fc16b321bd98c083a7

6 years agoFix the shell1.test test for the new format of the .backup command. vacuum-into
drh [Mon, 10 Dec 2018 00:41:28 +0000 (00:41 +0000)] 
Fix the shell1.test test for the new format of the .backup command.

FossilOrigin-Name: 9748d7995bc1dd632d66d2d326048d50e29c6f5e6993d5a6294d14421d2cb72f

6 years agoMerge fixes from trunk.
drh [Mon, 10 Dec 2018 00:40:43 +0000 (00:40 +0000)] 
Merge fixes from trunk.

FossilOrigin-Name: ab1e58fac9e3f9d7d90cefb39f8f145d211d38ec0cb393208c4531cc646056c1

6 years agoNew test case for ticket [1d958d90596593a77420e59].
drh [Sun, 9 Dec 2018 18:55:05 +0000 (18:55 +0000)] 
New test case for ticket [1d958d90596593a77420e59].

FossilOrigin-Name: b7bf3c9832bde26b359f4d58ebcf7788c500586d311387d022192ed65a126252

6 years agoDo not use a partial index as a table scan in an IN operator.
drh [Sat, 8 Dec 2018 20:30:31 +0000 (20:30 +0000)] 
Do not use a partial index as a table scan in an IN operator.
Fix for ticket [1d958d90596593a77420e59].

FossilOrigin-Name: 15bc915dd7ae25bfdfbe357c3792db3639799e4d121c6b5b24297af2d6d7129e

6 years agoAdd the --async option to the ".backup" command in the CLI.
drh [Sat, 8 Dec 2018 01:09:14 +0000 (01:09 +0000)] 
Add the --async option to the ".backup" command in the CLI.

FossilOrigin-Name: 7b6a605b1883dfcbe237b0a58f6f0c233a109e88b521c3b3d97198526c8a0317

6 years agoAllow the INTO clause of VACUUM to be a text-valued expression.
drh [Sat, 8 Dec 2018 00:43:08 +0000 (00:43 +0000)] 
Allow the INTO clause of VACUUM to be a text-valued expression.

FossilOrigin-Name: af172b53b46759f491f522356e14c5e2374d3f25ec70fbc1e100cadded8f9b22

6 years agoDo not allow VACUUM INTO into a file that already exists.
drh [Fri, 7 Dec 2018 23:48:41 +0000 (23:48 +0000)] 
Do not allow VACUUM INTO into a file that already exists.

FossilOrigin-Name: 92f70e0fa3c9de7fde046f11cc0a7c2800511bb5ace8e68c845133931607616e

6 years agoMerge the VACUUM simplification from trunk.
drh [Fri, 7 Dec 2018 20:40:12 +0000 (20:40 +0000)] 
Merge the VACUUM simplification from trunk.

FossilOrigin-Name: 93d92a0a5d21a1856316c0205ecaa253691b6e5349b552d43027005676d14820

6 years agoRemove a line of code from VACUUM that is no longer needed, due to the
drh [Fri, 7 Dec 2018 20:26:29 +0000 (20:26 +0000)] 
Remove a line of code from VACUUM that is no longer needed, due to the
change that allows ATTACH to run within a transaction.

FossilOrigin-Name: a92c398fc5df142ff1459c1be4a6832f2219bc7fabe5789535be3bbd41a4269b

6 years agoAdd multi-threaded performance test program "tserver" to this branch. Fix bugs
dan [Fri, 7 Dec 2018 20:25:14 +0000 (20:25 +0000)] 
Add multi-threaded performance test program "tserver" to this branch. Fix bugs
in the begin-concurrent/wal2 integration revealed by the same.

FossilOrigin-Name: 7bd3b35661d7d0e51113b9e4b15a0ab7f8e26edeafb43941ef5b44bb94df5109

6 years agoPrototype implementation for the VACUUM INTO command.
drh [Fri, 7 Dec 2018 17:28:28 +0000 (17:28 +0000)] 
Prototype implementation for the VACUUM INTO command.

FossilOrigin-Name: 036e3320a4af36c1311b25b2e504b0079c8b33df8ad7b7e5fddad07150e6f87d

6 years agoFix the sqlite3_normalized_sql() interface so that it renders
drh [Fri, 7 Dec 2018 16:32:11 +0000 (16:32 +0000)] 
Fix the sqlite3_normalized_sql() interface so that it renders
double-quoted string literals as "?".

FossilOrigin-Name: 0d8e150434bbd179696f1ffe71d1e06cb3d43e6468496c7e481fca8486387bad

6 years agoFix dbfuzz2.c so that it works with -DSQLITE_OMIT_INIT
drh [Fri, 7 Dec 2018 03:01:07 +0000 (03:01 +0000)] 
Fix dbfuzz2.c so that it works with -DSQLITE_OMIT_INIT

FossilOrigin-Name: 9ad796a8822f1b7e1e99b73c2cc5be59dbfd85e9c27f3e795c29a2c002c611d1

6 years agoFix the sqlite3ExprDup() function so that it correctly duplicates the
drh [Fri, 7 Dec 2018 01:56:26 +0000 (01:56 +0000)] 
Fix the sqlite3ExprDup() function so that it correctly duplicates the
Window object list on a Select that contains window functions.  Fix
for ticket [f09fcd17810f65f717].

FossilOrigin-Name: db5ed2268eda2e6c1df15cd8df4176463d89103b8fda33ba9a0604f0d92bd4da

6 years agoPerformance improvement: Avoid using sqlite3WalkerSelectExpr() ticket-f09fcd17810f
drh [Thu, 6 Dec 2018 22:12:18 +0000 (22:12 +0000)] 
Performance improvement:  Avoid using sqlite3WalkerSelectExpr()
and sqlite3WalkerSelectFrom() twice, so that the compiler will in-line their
implementation.

FossilOrigin-Name: 2b9258b8b0342330ebe8c22b59ec276fd042a05547d15b24fdf29e16280868de

6 years agoFix the sqlite3ExprDup() routine so that it makes complete duplications of
drh [Thu, 6 Dec 2018 22:04:19 +0000 (22:04 +0000)] 
Fix the sqlite3ExprDup() routine so that it makes complete duplications of
subqueries containing window functions.

FossilOrigin-Name: 940174543e87184a0278fcd02e8a096a11510174d9c1d65d21878819790ddaff

6 years agoNew test case that still hits an assertion fault, just to prove that the
drh [Thu, 6 Dec 2018 19:56:20 +0000 (19:56 +0000)] 
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

6 years agoSimplify the query flattener so that it does not duplicate the WHERE clause
drh [Thu, 6 Dec 2018 19:15:36 +0000 (19:15 +0000)] 
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

6 years agoWhen masking bits off of sqlite3.flags, make sure the mask is 64 bits
drh [Thu, 6 Dec 2018 17:06:02 +0000 (17:06 +0000)] 
When masking bits off of sqlite3.flags, make sure the mask is 64 bits
in size so as not to accidentally mask of high-order bits.

FossilOrigin-Name: 53d3b169d8e1892163526caff2c843302c92e280fdeff6831e23a9bb15b82be3

6 years agoAdd test file wal2snapshot.test that should have been added as part of an
dan [Thu, 6 Dec 2018 16:54:44 +0000 (16:54 +0000)] 
Add test file wal2snapshot.test that should have been added as part of an
earlier commit.

FossilOrigin-Name: f6baa7e1163ed5f61375b0554337030fec23e8a9f60c6412e1b5d626961e93f9

6 years agoWhen saving off the value of sqlite3.flags, take care to preserve all 64
drh [Thu, 6 Dec 2018 16:50:55 +0000 (16:50 +0000)] 
When saving off the value of sqlite3.flags, take care to preserve all 64
bits.

FossilOrigin-Name: 9c6dbcfab5952cf4e54de30cf9cee48f988b91a35dc3f04d64d6d994dd84a076

6 years agoIssue a warning whenever a double-quoted string literal is used.
drh [Thu, 6 Dec 2018 16:11:14 +0000 (16:11 +0000)] 
Issue a warning whenever a double-quoted string literal is used.

FossilOrigin-Name: ac9ad5043026b30394812457e1535df2759aea0d4510029561e92e386672796f

6 years agoInvoking the sqlite3_trace() or sqlite3_trace_v2() interfaces cancels
drh [Thu, 6 Dec 2018 03:59:25 +0000 (03:59 +0000)] 
Invoking the sqlite3_trace() or sqlite3_trace_v2() interfaces cancels
any sqlite3_profile() that is running.

FossilOrigin-Name: ec63d3506bd429560077f82a4c5ed9d189780789fe1c134fff4f3b8733be1a3f

6 years agoRemove the unused pColHash field from the Table object.
drh [Thu, 6 Dec 2018 02:01:17 +0000 (02:01 +0000)] 
Remove the unused pColHash field from the Table object.

FossilOrigin-Name: 3a2c047989facc3461c63a2f9eed412014c951035a80da47c52a70139fb552de

6 years agoFix a potential NULL pointer dereference that can occur in ALTER TABLE
drh [Thu, 6 Dec 2018 01:53:12 +0000 (01:53 +0000)] 
Fix a potential NULL pointer dereference that can occur in ALTER TABLE
following an OOM.  Test case in TH3.

FossilOrigin-Name: ea50815bf80ab0d36891518f209acbcd3d6d8d84529741bffd4e841874c78aff

6 years agoFix a missing mutex in the sqlite3_normalized_sql() interface when it is
drh [Thu, 6 Dec 2018 01:08:58 +0000 (01:08 +0000)] 
Fix a missing mutex in the sqlite3_normalized_sql() interface when it is
called on a prepared statement that did not previously have a computed
normalization of the input SQL.

FossilOrigin-Name: 1a1a59c6c570879c8f318bbc132103c0285088ba233dd8c32e049b86419347b0

6 years agoGet rid of the hash table used to track IN operators in the
drh [Wed, 5 Dec 2018 23:56:02 +0000 (23:56 +0000)] 
Get rid of the hash table used to track IN operators in the
sqlite3_normalized_sql() implementation.  Use simple integer variables
instead.

FossilOrigin-Name: 272dc74fd0304d6a28aaa8798d13e2f950c1a24d92d17519e3c32aef86714586

6 years agoThe sqlite3_normalized_sql() interface should not be transforming quoted
drh [Wed, 5 Dec 2018 23:45:46 +0000 (23:45 +0000)] 
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

6 years agoFix an imbalanced lock problem in sqlite3Normalize() introduced by the
drh [Wed, 5 Dec 2018 21:55:39 +0000 (21:55 +0000)] 
Fix an imbalanced lock problem in sqlite3Normalize() introduced by the
simplification in [94ea6379178e3ff6a].

FossilOrigin-Name: f69624373e33c4d370a9264a317ffdb0adbce967a950f243de2b41161a8c7ded

6 years agoIncrease the version number to 3.27.0 for the next development cycle.
drh [Wed, 5 Dec 2018 19:42:59 +0000 (19:42 +0000)] 
Increase the version number to 3.27.0 for the next development cycle.

FossilOrigin-Name: 8f8d682825d065bcaebda4cba63f8b67789b923d8b62eb7c576a5bc01536f577

6 years agoAdd test cases to wal2concurrent.test.
dan [Wed, 5 Dec 2018 18:25:23 +0000 (18:25 +0000)] 
Add test cases to wal2concurrent.test.

FossilOrigin-Name: ef9e7a87a4ce4fe9596aed2f880f2b9fc3526c00c48f2868c625a4c24be65abe

6 years agoSimplifications to the sqlite3_normalized_sql() implementation.
drh [Wed, 5 Dec 2018 17:48:57 +0000 (17:48 +0000)] 
Simplifications to the sqlite3_normalized_sql() implementation.

FossilOrigin-Name: 94ea6379178e3ff6a0d1d5819ca4ac558bdadb1ca8a3637c797079db7dc0cd61

6 years agoFix a test script problem on this branch.
dan [Wed, 5 Dec 2018 17:36:20 +0000 (17:36 +0000)] 
Fix a test script problem on this branch.

FossilOrigin-Name: 692ddc280850ea2ff5d2fa3743f85fb123b4e4ebc452aae9c58b8d80d22b75b1

6 years agoFix a test script problem on this branch.
dan [Wed, 5 Dec 2018 17:31:24 +0000 (17:31 +0000)] 
Fix a test script problem on this branch.

FossilOrigin-Name: 285d1c5904dd607457c6b5ff7be3d3191a90ca8b1fb0837327663c9910f978ac

6 years agoFix a problem causing "PRAGMA journal_mode" to report the wrong journal mode
dan [Wed, 5 Dec 2018 17:20:47 +0000 (17:20 +0000)] 
Fix a problem causing "PRAGMA journal_mode" to report the wrong journal mode
(wal instead of wal2) under some circumstances.

FossilOrigin-Name: bf309107dfc4d2abd68b9339c68aeaaffd278096bb2a5912e4a0b0c124fd6345

6 years agoFix a problem causing "PRAGMA journal_mode" to report the wrong journal mode
dan [Wed, 5 Dec 2018 17:14:03 +0000 (17:14 +0000)] 
Fix a problem causing "PRAGMA journal_mode" to report the wrong journal mode
(wal instead of wal2) under some circumstances.

FossilOrigin-Name: 1d8d4f689653ce80157740e339f7f1b42479bf90d82b176d8202d0a49f428398

6 years agoFixes for snapshots API on this branch. Also ensure that the snapshots API
dan [Wed, 5 Dec 2018 16:45:38 +0000 (16:45 +0000)] 
Fixes for snapshots API on this branch. Also ensure that the snapshots API
cannot be used with wal2 mode databases (for now anyhow).

FossilOrigin-Name: d8c2d55fa4ec95c6506201edcd1cb2ef108a233bd87a6154f3593909977f7d3f

6 years agoFixes for snapshots API on this branch. Also ensure that the snapshots API
dan [Wed, 5 Dec 2018 16:31:02 +0000 (16:31 +0000)] 
Fixes for snapshots API on this branch. Also ensure that the snapshots API
cannot be used with wal2 mode databases (for now anyhow).

FossilOrigin-Name: 19c61ab79458936ff4dfca46cf4d1fb1ab16d7bdb5024f502eb4339ec4eef32c

6 years agoEnsure that ALTER TABLE modifies table and column names embedded in WITH
dan [Wed, 5 Dec 2018 13:49:04 +0000 (13:49 +0000)] 
Ensure that ALTER TABLE modifies table and column names embedded in WITH
clauses that are part of views and triggers.

FossilOrigin-Name: f44bc7a8b3fac82aa5598e9bdaf65ea4dd3c331cf90c1d5ba26ff1698e92c230

6 years agoEnhance the sqlite3_normalize_sql() interface so that it works even if the
drh [Wed, 5 Dec 2018 13:39:06 +0000 (13:39 +0000)] 
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

6 years agoFirst attempt at making features work together. Only the most minimal testing
dan [Tue, 4 Dec 2018 19:41:07 +0000 (19:41 +0000)] 
First attempt at making features work together. Only the most minimal testing
so far.

FossilOrigin-Name: fd707001f0afb1cf32cfeeda3ec7b5622eb49ddedf8fec1a7aa4c8841c77c37a

6 years agoAdd the "index_usage" utility program.
drh [Tue, 4 Dec 2018 16:51:42 +0000 (16:51 +0000)] 
Add the "index_usage" utility program.

FossilOrigin-Name: df95455213c9d1db7229e94217e78edc05cbf9e40f39528105494ea6ac52be94

6 years agoPerformance improvement in sqlite3_step() by creating a new mTrace flag
drh [Tue, 4 Dec 2018 14:33:02 +0000 (14:33 +0000)] 
Performance improvement in sqlite3_step() by creating a new mTrace flag
for the legacy xProfile pointer that is set by sqlite3_profile().

FossilOrigin-Name: e28584e8bc7b7405380064b60523fa6191f827f74075f6d117eb7732d752ba5e

6 years agoSmall performance increase in sqlite3_step() for the common case where
drh [Tue, 4 Dec 2018 13:51:26 +0000 (13:51 +0000)] 
Small performance increase in sqlite3_step() for the common case where
it returns SQLITE_ROW.

FossilOrigin-Name: 893448265299f4c70c32c8e92ea66f8d33c1c213b21701f73fa3815514cd5ef6

6 years agoReduce the size of the parser tables generated by Lemon by splitting the
drh [Mon, 3 Dec 2018 23:57:27 +0000 (23:57 +0000)] 
Reduce the size of the parser tables generated by Lemon by splitting the
yyRuleInfo structure into separate yyRuleInfoLhs and yyRuleInfoNRhs arrays.

FossilOrigin-Name: 70fe8ec2ae3099b8773834c7ac2e56768addbecd57956ac523e71a7dc264049c

6 years agoMerge the wal2 and begin-concurrent code. Both features work, but not at the
dan [Mon, 3 Dec 2018 20:49:34 +0000 (20:49 +0000)] 
Merge the wal2 and begin-concurrent code. Both features work, but not at the
same time.

FossilOrigin-Name: b7281a1caa574870a071bea3e96b1d8210c28c17f9094449b3ce1a42b311e6a1

6 years agoMinor change to wal.c on this branch to make it more similar to trunk.
dan [Mon, 3 Dec 2018 20:38:15 +0000 (20:38 +0000)] 
Minor change to wal.c on this branch to make it more similar to trunk.

FossilOrigin-Name: 6a7af3ead5949c461430c1fa92798dc2bbbc58c8cd504005c5afa38993f0be82

6 years agoCherrypick a couple of fixes from begin-concurrent-pnu into this branch. The
dan [Mon, 3 Dec 2018 19:29:37 +0000 (19:29 +0000)] 
Cherrypick a couple of fixes from begin-concurrent-pnu into this branch. The
differences between the two branches are now that this one does not have
"PRAGMA noop_update" or the mutex-free PRNG.

FossilOrigin-Name: a56506b9387a067ef259504d127694ad20223f4b08781d1676ff7f5fdd9443d8

6 years agoBring up to date with version 3.26.0.
drh [Mon, 3 Dec 2018 18:15:52 +0000 (18:15 +0000)] 
Bring up to date with version 3.26.0.

FossilOrigin-Name: f0ddb358cc68e5ec6d9e758893ab3da058a3b2e705124a7449279c992e672a4a

6 years agoIncrease a timeout in test file walprotocol2.test. To account for unix builds
dan [Mon, 3 Dec 2018 18:13:46 +0000 (18:13 +0000)] 
Increase a timeout in test file walprotocol2.test. To account for unix builds
without HAVE_USLEEP.

FossilOrigin-Name: 480be916c840e9e28010c22cf29a8396502c9e6387f31f750260c6290f58e9a1

6 years agoRemove the unused sqlite3Fts5UnicodeNCat() function.
drh [Mon, 3 Dec 2018 17:40:46 +0000 (17:40 +0000)] 
Remove the unused sqlite3Fts5UnicodeNCat() function.

FossilOrigin-Name: 7149dacf1d440a19f62808b4591c3fa8da202b2ec742d5490a63f2ec005ff9e7

6 years agoAdd the "remove_diacritics=2" option to the unicode61 tokenizer in both FTS5
dan [Mon, 3 Dec 2018 16:14:49 +0000 (16:14 +0000)] 
Add the "remove_diacritics=2" option to the unicode61 tokenizer in both FTS5
and FTS3/4.

FossilOrigin-Name: 06177f3f114b5d804b84c27ac843740282e2176fdf0f7a999feda0e1b624adec

6 years agoUpdate the autoconf makefile for MSVC.
mistachkin [Mon, 3 Dec 2018 14:58:07 +0000 (14:58 +0000)] 
Update the autoconf makefile for MSVC.

FossilOrigin-Name: 675aba1f8b989cfd99370704ecb09031026dc3321cccad122ea91d816e02fdba

6 years agoRemove two lines of unnecessary code, for a very small performance increase
drh [Mon, 3 Dec 2018 01:58:02 +0000 (01:58 +0000)] 
Remove two lines of unnecessary code, for a very small performance increase
and size decrease.

FossilOrigin-Name: 15824ccda0f110794a479b58fbf36082d8c383f34bae9dc0921d96547fb37869

6 years agoFix a parser bug in the use of parentheses around table-valued functions.
drh [Mon, 3 Dec 2018 01:47:41 +0000 (01:47 +0000)] 
Fix a parser bug in the use of parentheses around table-valued functions.

FossilOrigin-Name: 58a51123d1a6381cc67d3c64ba3468ec5a92c299ad6fd86de0b843d0ffafb846

6 years agoOmit a line of code that has no affect on the outcome.
drh [Sun, 2 Dec 2018 01:15:16 +0000 (01:15 +0000)] 
Omit a line of code that has no affect on the outcome.

FossilOrigin-Name: 5d933aa659eb7a13f9ab44fe7762be292a1c3c75b957a3b7e0bc6188257b62f4

6 years agoVery slightly smaller and faster.
drh [Sat, 1 Dec 2018 21:13:41 +0000 (21:13 +0000)] 
Very slightly smaller and faster.

FossilOrigin-Name: 27798f17f567ad065f8a99effcb287bc241df7b450330ef890d192c70528e62b

6 years agoSync this branch with the latest trunk.
dan [Sat, 1 Dec 2018 20:14:06 +0000 (20:14 +0000)] 
Sync this branch with the latest trunk.

FossilOrigin-Name: 7a44fa5a350a3f19b8e9f5196d22535788885f8c0e849572202bf64a055ddc2d

6 years agoVersion 3.26.0 version-3.26.0
drh [Sat, 1 Dec 2018 12:34:55 +0000 (12:34 +0000)] 
Version 3.26.0

FossilOrigin-Name: bf8c1b2b7a5960c282e543b9c293686dccff272512d08865f4600fb58238b4f9

6 years agoFix a typo in a comment. No changes to code.
drh [Fri, 30 Nov 2018 20:59:00 +0000 (20:59 +0000)] 
Fix a typo in a comment. No changes to code.

FossilOrigin-Name: 23684cb841ac2cb0d69e5470253bd96feb733762a7553b952a08470834fe85fa

6 years agoFix the name of the trig function approximation in geopoly. No functional
drh [Thu, 29 Nov 2018 12:00:02 +0000 (12:00 +0000)] 
Fix the name of the trig function approximation in geopoly.  No functional
changes to the code.

FossilOrigin-Name: 33576b12b450a37b467ba012e77b297eb80d7147b12a5b23302009bb32455720

6 years agoFix a typo in a comment used to generate documentation. No changes to code.
drh [Wed, 28 Nov 2018 19:23:28 +0000 (19:23 +0000)] 
Fix a typo in a comment used to generate documentation.  No changes to code.

FossilOrigin-Name: 62360ceae9d2321003c49cfac3e9f915969a0da12d02c3e633cfa898c0a68566

6 years agoUpdate incrvacuum.test so that it works with builds that do not support mmap().
dan [Thu, 29 Nov 2018 01:20:51 +0000 (01:20 +0000)] 
Update incrvacuum.test so that it works with builds that do not support mmap().

FossilOrigin-Name: 8eb62fd5fa9adb88de51aa812270dbdb32ee5cacd636d200e658c507a14a035b

6 years agoUpdate some test cases to account for SQLITE_OMIT_VIRTUAL_TABLE builds.
dan [Wed, 28 Nov 2018 11:49:46 +0000 (11:49 +0000)] 
Update some test cases to account for SQLITE_OMIT_VIRTUAL_TABLE builds.

FossilOrigin-Name: b53a9a3dc6b0422a102b245451769b0cd8c0d67090fefabf7cb3a65137a73771

6 years agoFollow-up to [0bf0fd242b93c3bd30]: only reset the pager when adding a
drh [Wed, 28 Nov 2018 11:09:09 +0000 (11:09 +0000)] 
Follow-up to [0bf0fd242b93c3bd30]: only reset the pager when adding a
new codec, not when overwriting an existing codec.  Also, improve a
comment in the pcache1 subsystem.

FossilOrigin-Name: 5c040fdb013d178e5dffa300621eab91b92beb085ffb9ef2ba08f6bf1dd4013e

6 years agoChanges to Makefile.in to allow testfixture to be built with
dan [Wed, 28 Nov 2018 08:24:41 +0000 (08:24 +0000)] 
Changes to Makefile.in to allow testfixture to be built with
SQLITE_USER_AUTHENTICATION.

FossilOrigin-Name: 7b510f59fd2cf68331c35ef6b4c2bcf092adf1120ea22be74d1bab1f42a171f5

6 years agoRemove -DSQLITE_USER_AUTHENTICATION from the "Unlock-Notify" configuration.
dan [Wed, 28 Nov 2018 08:09:08 +0000 (08:09 +0000)] 
Remove -DSQLITE_USER_AUTHENTICATION from the "Unlock-Notify" configuration.
Create a dedicated "User-Auth" configuration for testing this feature.

FossilOrigin-Name: 8c41024fbba8c70b671c63a5719c6757f0e6dc731ce52caa755edbb8e21d6944

6 years agoFixes for SQLITE_OMIT_VIRTUAL_TABLE builds.
dan [Wed, 28 Nov 2018 08:02:28 +0000 (08:02 +0000)] 
Fixes for SQLITE_OMIT_VIRTUAL_TABLE builds.

FossilOrigin-Name: 9bcdec85e21a5228c700f7373b92ae7ea14b585bcda34235b605be4f7ec15a15

6 years agoAlways enable SQLITE_ENABLE_DESERIALIZE for the MSVC makefile as this is necessary
drh [Wed, 28 Nov 2018 01:45:05 +0000 (01:45 +0000)] 
Always enable SQLITE_ENABLE_DESERIALIZE for the MSVC makefile as this is necessary
to get releasetest.tcl to work.

FossilOrigin-Name: d362dedba3637013d654f2a890fc7b61476f2adeb6bf3bffb4e715c1d1d0b7c2

6 years agoFix a failing assert() in sqlite3ResetAllSchemasOfConnection().
dan [Tue, 27 Nov 2018 19:47:55 +0000 (19:47 +0000)] 
Fix a failing assert() in sqlite3ResetAllSchemasOfConnection().

FossilOrigin-Name: 0ea049f342d11c676e148239e45d252164081362e921a4beb735d6899eb77344

6 years agoImprovements to two cases in pragma4.test.
drh [Tue, 27 Nov 2018 17:02:38 +0000 (17:02 +0000)] 
Improvements to two cases in pragma4.test.

FossilOrigin-Name: 3c893d9bcc34c391505b08cc35808dd3abddf3c5d952798334c296547bcae6a6

6 years agoRemove the sqlite3PagerUseWal() routine which was made obsolete by
drh [Tue, 27 Nov 2018 14:41:07 +0000 (14:41 +0000)] 
Remove the sqlite3PagerUseWal() routine which was made obsolete by
the [81629ba91475938b6ad] change.

FossilOrigin-Name: 4331b4990cbc1221d94fadd376dfc6efe83f67836aef00912126da4c924bf659

6 years agoAdd a simple test case for Lemon. Always include assert.h in the
drh [Tue, 27 Nov 2018 14:34:33 +0000 (14:34 +0000)] 
Add a simple test case for Lemon.  Always include assert.h in the
Lemon-generated parser.

FossilOrigin-Name: 9c9c46dcbe92aeabe3d5675bb69681b6dfd53798bc67e6a2ceba67ed3c4fb0af

6 years agoFix to the error handling logic in the Lemon parser template. This does
drh [Tue, 27 Nov 2018 14:03:11 +0000 (14:03 +0000)] 
Fix to the error handling logic in the Lemon parser template.  This does
not affect SQLite since SQLite does not use that part of the Lemon parser
template.

FossilOrigin-Name: c6dfc59eb12a02d35b708b5d94239377c79f688fa572f72bad51a157b1bf599c

6 years agoAdd an "#ifndef SQLITE_DISABLE_FTS4_DEFERRED" block around function
dan [Tue, 27 Nov 2018 09:57:10 +0000 (09:57 +0000)] 
Add an "#ifndef SQLITE_DISABLE_FTS4_DEFERRED" block around function
fts3EvalDeferredPhrase() in fts3 in order to silence a compiler warning.

FossilOrigin-Name: 6f4b0d0494446d46ac22b17650a25b025995cc545cac8fbc4776cf9dd388bcd8

6 years agoDo not allow direct access to internal-use SQL functions such as
drh [Mon, 26 Nov 2018 18:09:15 +0000 (18:09 +0000)] 
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

6 years agoMinor comment enhancement in alter.c. No changes to code.
drh [Mon, 26 Nov 2018 15:00:25 +0000 (15:00 +0000)] 
Minor comment enhancement in alter.c.  No changes to code.

FossilOrigin-Name: 12920bcb99b25e147e1877ee001bc551a743e3530c954fe2b45a18a4eef9eeff

6 years agoMerge latest trunk changes into this branch.
dan [Mon, 26 Nov 2018 07:21:06 +0000 (07:21 +0000)] 
Merge latest trunk changes into this branch.

FossilOrigin-Name: 28a615a2e0f48b0fee3eaf7841ff902e069fa6c221df6ad9a57b8709c88561fb

6 years agoFix a bug in the geopoly_ccw() function. Test cases in TH3.
drh [Sat, 24 Nov 2018 20:44:46 +0000 (20:44 +0000)] 
Fix a bug in the geopoly_ccw() function.  Test cases in TH3.

FossilOrigin-Name: 773c5c1d9c0ec40c51949c38c9dc17e778086f3f92791cca9b85288de0076dab

6 years agoMake the winTruncate() method of the windows VFS be a no-op if there are
drh [Sat, 24 Nov 2018 17:46:07 +0000 (17:46 +0000)] 
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

6 years agoRemove the unused mmapSizeActual field from the Windows sqlite3_file
drh [Sat, 24 Nov 2018 16:07:21 +0000 (16:07 +0000)] 
Remove the unused mmapSizeActual field from the Windows sqlite3_file
implementation.

FossilOrigin-Name: 0e7aa62227d1d9c3540b54d7caf44a1ce7ccfa706672fc41dbb2be477ab3a667

6 years agoFix a problem reading from temp databases in SQLITE_DIRECT_OVERFLOW_READ
dan [Thu, 22 Nov 2018 19:10:14 +0000 (19:10 +0000)] 
Fix a problem reading from temp databases in SQLITE_DIRECT_OVERFLOW_READ
builds.

FossilOrigin-Name: 81629ba91475938b6ad528e7b1dbef4ad22239782bb2e9c1bb59413aba11da87