]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
6 years agoMake the winTruncate() method of the windows VFS be a no-op if there are branch-3.25
drh [Fri, 23 Nov 2018 13:21:05 +0000 (13:21 +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: 8576ccb479fc4b76e950a5c2c5db5c57b59e3c17004b8cca478f0edafd386ec4

6 years agoVersion 3.25.3 version-3.25.3
drh [Mon, 5 Nov 2018 20:37:38 +0000 (20:37 +0000)] 
Version 3.25.3

FossilOrigin-Name: 89e099fbe5e13c33e683bef07361231ca525b88f7907be7092058007b75036f2

6 years agoDisable the IS NOT NULL optimization when the IS NOT NULL operator is part
drh [Mon, 5 Nov 2018 13:48:50 +0000 (13:48 +0000)] 
Disable the IS NOT NULL optimization when the IS NOT NULL operator is part
of the ON clause of a LEFT JOIN. Fix for ticket [65eb38f6e46de8c75e188a17ec].

FossilOrigin-Name: 8d09ce5d738bb00c4524c663ec69555fe917ac733d58b06a302675ce7fe33fca

6 years agoAdd extra defenses against strategically corrupt databases to fts3/4.
drh [Mon, 5 Nov 2018 13:43:03 +0000 (13:43 +0000)] 
Add extra defenses against strategically corrupt databases to fts3/4.

FossilOrigin-Name: 940f2adc8541a838c19ceeb62105074117c906efa0f36610a0d3e8d6f859154f

6 years agoIncrease the version number to 3.25.3.
drh [Mon, 5 Nov 2018 13:37:19 +0000 (13:37 +0000)] 
Increase the version number to 3.25.3.

FossilOrigin-Name: 1250ab8f22c1e34ed478588c2a858af78c45c128db30f703ece41b17c8d42a09

6 years agoFix a assert() in the query planner that can arise when doing row-value
drh [Mon, 5 Nov 2018 13:35:11 +0000 (13:35 +0000)] 
Fix a assert() in the query planner that can arise when doing row-value
operations on a PRIMARY KEY that contains duplicate columns.
Ticket [1a84668dcfdebaf12415d].

FossilOrigin-Name: 1309c84ad36b6ac6dedd103892445bf60dbf27167ef71e7722e934f2175a4199

6 years agoIn the WHERE-constraint propagation optimization, if there are duplicate
drh [Thu, 25 Oct 2018 15:25:10 +0000 (15:25 +0000)] 
In the WHERE-constraint propagation optimization, if there are duplicate
constraint, make sure only one of them propagates.  Proposed fix for
ticket [cf5ed20fc8621b165].

FossilOrigin-Name: caebf8792576752d1cd8af29f00ba3909b2448018c830287007328f6c31072c1

6 years agoFix a potential crash that can occur while reading an index from a corrupt
drh [Mon, 1 Oct 2018 14:05:03 +0000 (14:05 +0000)] 
Fix a potential crash that can occur while reading an index from a corrupt
database file.  The corruption is a record-header-size that is larger than
0x7fffffff.  Problem detected by OSSFuzz against GDAL and reported to us
(with a suggested fix) by Even Rouault.  The test case is in TH3.

FossilOrigin-Name: 5d2916589649421b53c599417577c8707352583378b0f47c899ee779cbd523c7

6 years agoEnsure that the OP_VColumn opcode does set sqlite3_vtab_nochange() unless
drh [Mon, 1 Oct 2018 11:00:00 +0000 (11:00 +0000)] 
Ensure that the OP_VColumn opcode does set sqlite3_vtab_nochange() unless
the OPFLAG_NOCHNG bit is set in P5.  Fix for ticket
[69d642332d25aa3b7315a6d385]

FossilOrigin-Name: 31ac8dbae4d5d3d5aee28959e9b1bfcb72a2f878541c0cbd74be46b0193df89c

6 years agoDisallow the use of window functions in the recursive part of a recursive CTE.
drh [Thu, 27 Sep 2018 13:10:37 +0000 (13:10 +0000)] 
Disallow the use of window functions in the recursive part of a recursive CTE.
Fix for ticket [e8275b415a2f03bee].

FossilOrigin-Name: b2849570967555d486e797cb1807e45706cb55036a4b9074be267b5e4940ec91

6 years agoVersion 3.25.2 version-3.25.2
drh [Tue, 25 Sep 2018 19:08:10 +0000 (19:08 +0000)] 
Version 3.25.2

FossilOrigin-Name: fb90e7189ae6d62e77ba3a308ca5d683f90bbe633cf681865365b8e92792d1c7

6 years agoFix a problem in releasetest.tcl causing configuration "Fast-One" to fail.
dan [Tue, 25 Sep 2018 13:52:54 +0000 (13:52 +0000)] 
Fix a problem in releasetest.tcl causing configuration "Fast-One" to fail.

FossilOrigin-Name: 32ac0014266706baa4e98de808eb5a6d0ffdb39dc37b4e37668f339e9e238183

6 years agoBump the version number to 3.25.2.
drh [Tue, 25 Sep 2018 01:38:00 +0000 (01:38 +0000)] 
Bump the version number to 3.25.2.

FossilOrigin-Name: 996d74f501a45ae12ddc16fe66f849993142e47ccb8b068c412d2ea9bd301ec2

6 years agoFix a compilation issue in the "userauth" extension. Also fix a few test
drh [Tue, 25 Sep 2018 01:35:17 +0000 (01:35 +0000)] 
Fix a compilation issue in the "userauth" extension. Also fix a few test
script errors that occur with SQLITE_USER_AUTHENTICATION=1 builds.

FossilOrigin-Name: e7db5f59ee62bb8bf61e17a75ecf89f7472fccf68d6d02b892e349142db1f47e

6 years agoFix a problem building on Android with SQLITE_ENABLE_BATCH_ATOMIC_WRITE set.
drh [Tue, 25 Sep 2018 01:17:50 +0000 (01:17 +0000)] 
Fix a problem building on Android with SQLITE_ENABLE_BATCH_ATOMIC_WRITE set.

FossilOrigin-Name: b9ffa77c92cbc47618da16f412df7745cbf92a7098d3f015724f9b66dca8a2e1

6 years agoAvoid incrementing the SQLITE_LOOKASIDE_MISS_SIZE stat before sqlite3_open()
drh [Mon, 24 Sep 2018 21:07:35 +0000 (21:07 +0000)] 
Avoid incrementing the SQLITE_LOOKASIDE_MISS_SIZE stat before sqlite3_open()
returns. Fix test script problem in lookaside.test.

FossilOrigin-Name: 3bd94e431783085a22733102218c0fe24a26376033cf9fe4380f6890aba8c79a

6 years agoFix missing space in 'configure.ac' reported on the mailing list.
drh [Mon, 24 Sep 2018 20:50:14 +0000 (20:50 +0000)] 
Fix missing space in 'configure.ac' reported on the mailing list.

FossilOrigin-Name: 4407e15ac953cca0e33d76bd1e6500d70ae9cb239ea2d776a19a13f59532b3f6

6 years agoAdd the "PRAGMA legacy_alter_table=ON" command to enable the pre-3.25.0
drh [Mon, 24 Sep 2018 20:48:20 +0000 (20:48 +0000)] 
Add the "PRAGMA legacy_alter_table=ON" command to enable the pre-3.25.0
behavior of ALTER TABLE that does not modify the bodies of triggers or
views or the WHERE clause of a partial index.  Enable the legacy behavior
by default when running the xRename method of virtual tables.

FossilOrigin-Name: 31dc8b191c3b7921f1e9ac1a07854d2bd9e39bc4a20cf2a70a28c41cdb0d0e95

6 years agoAllow a writable virtual table to have a schema with an INTEGER PRIMARY KEY
drh [Mon, 24 Sep 2018 19:41:12 +0000 (19:41 +0000)] 
Allow a writable virtual table to have a schema with an INTEGER PRIMARY KEY
and WITHOUT ROWID.  This fixes ticket
[f25d5ceebe1d710ff61a571e395356869d8272ef].  Test case in TH3.

FossilOrigin-Name: 3139af9910e484682d37eeac9dca188a73859b3241017bde31bc6cb597b40d3c

6 years agoFix a faulty assert() in the validation logic for the LEFT JOIN strength
drh [Mon, 24 Sep 2018 19:32:16 +0000 (19:32 +0000)] 
Fix a faulty assert() in the validation logic for the LEFT JOIN strength
reduction optimization.  Problem found by OSSFuzz.

FossilOrigin-Name: 8694c3d565f6f8209e24230765efa476e10048abb69a300b9df5cbaa45824ab8

6 years agoFix the "sqlite3" command in the TCL interface so that it correctly returns
drh [Mon, 24 Sep 2018 19:21:46 +0000 (19:21 +0000)] 
Fix the "sqlite3" command in the TCL interface so that it correctly returns
an error if invoked with no arguments.

FossilOrigin-Name: 8a82fcf05fa84def1433489f71dc28b47c1e082d044512b8756ec1bb4b913fab

6 years agoFix a problem with views that use window functions as part of complex expressions.
drh [Mon, 24 Sep 2018 18:29:21 +0000 (18:29 +0000)] 
Fix a problem with views that use window functions as part of complex expressions.

FossilOrigin-Name: 1c0ecbbdf1f309feaca747230d8925e61ddc6049a46c1dbbac7344bb933ab5e3

6 years agoVersion 3.25.1 version-3.25.1
drh [Tue, 18 Sep 2018 20:20:44 +0000 (20:20 +0000)] 
Version 3.25.1

FossilOrigin-Name: 2ac9003de44da7dafa3fbb1915ac5725a9275c86bf2f3b7aa19321bf1460b386

6 years agoDisable the ORDER BY LIMIT optimization in queries using window functions.
drh [Mon, 17 Sep 2018 15:25:21 +0000 (15:25 +0000)] 
Disable the ORDER BY LIMIT optimization in queries using window functions.
This fixes a problem that was introduced by check-in [206720129ed2fa8875a286]
which attempted to fix ticket [9936b2fa443fec03ff25f9].  This changes is
a fix for the follow-in tocket [510cde277783b5fb5de628].

FossilOrigin-Name: 36c75fd5b7cddb48be74f4f86fafe588b3e597a80d226eeb43b77cbd3817572e

6 years agoFix a false-positive in the post-ALTER-TABLE schema verification logic that
drh [Mon, 17 Sep 2018 14:18:41 +0000 (14:18 +0000)] 
Fix a false-positive in the post-ALTER-TABLE schema verification logic that
prevents ALTER TABLE from working if the table being altered has a trigger
that references any column of a virtual table. Ticket [b41031ea2b537237].

FossilOrigin-Name: 5ce568c0e73c8cd258c8fe21e6c5088cfbe3ac017460a014a4b832daecc0cdf7

6 years agoIncrease the version number to 3.25.1.
drh [Mon, 17 Sep 2018 11:36:20 +0000 (11:36 +0000)] 
Increase the version number to 3.25.1.

FossilOrigin-Name: f3c8cfdb35c6f0786bb21cafcc8c7e751e48a465f3e5a01292399f40e068e1d6

6 years agoVersion 3.25.0 version-3.25.0
drh [Sat, 15 Sep 2018 04:01:47 +0000 (04:01 +0000)] 
Version 3.25.0

FossilOrigin-Name: b63af6c3bd33152742648d5d2e8dc5d5fcbcdd27df409272b6aea00a6f761760

6 years agoFix minor typos in comments that get carried over into documentation.
drh [Fri, 14 Sep 2018 17:42:47 +0000 (17:42 +0000)] 
Fix minor typos in comments that get carried over into documentation.
No changes to code.

FossilOrigin-Name: 7921dd91a1745aa79ea157b91b22c380e9331800050861ee6ca1f0efa0a97628

6 years agoUpdate releasetest.tcl to run "make test" as part of the "Fast-One"
dan [Thu, 13 Sep 2018 17:11:51 +0000 (17:11 +0000)] 
Update releasetest.tcl to run "make test" as part of the "Fast-One"
configuration.

FossilOrigin-Name: d5ebfe1c75d336dac374d9cfa257e45e77ab51f9c2f24d1af615cbbe9dd83d9b

6 years agoMake sure the %z optimization for printf() is not invoked if there has been
drh [Thu, 13 Sep 2018 17:07:12 +0000 (17:07 +0000)] 
Make sure the %z optimization for printf() is not invoked if there has been
a prior error (SQLITE_NOMEM or SQLITE_TOOBIG) associated with the same
printf() call.

FossilOrigin-Name: a2304a3474b0ca35eee0af64286ce2f7cb24d181323e128d5f04f7fe6e1c0980

6 years agoFix a requirement mark on a test script. No changes to code.
drh [Thu, 13 Sep 2018 13:17:14 +0000 (13:17 +0000)] 
Fix a requirement mark on a test script.  No changes to code.

FossilOrigin-Name: 628d5c0aa057c05c7cf84c330a51b8a44720c97250eadf0e5e8c750b7a2969c3

6 years agoFix an assert() in os_unix.c that is not true when using RBU.
dan [Wed, 12 Sep 2018 20:32:19 +0000 (20:32 +0000)] 
Fix an assert() in os_unix.c that is not true when using RBU.

FossilOrigin-Name: 028ed8618af012b51104a06cc155b45d98bc4ff833d4431b9c38fd6851a74e82

6 years agoRestrict the scope of internal-use functions in alter.c.
drh [Wed, 12 Sep 2018 15:51:56 +0000 (15:51 +0000)] 
Restrict the scope of internal-use functions in alter.c.

FossilOrigin-Name: 4396914f8e1a847d86c22fb0b91e7431cf19aa260cbec520af3564248d6897ad

6 years agoImprovements to the documentation for SQLITE_FCNTL_DATA_VERSION.
drh [Wed, 12 Sep 2018 14:28:45 +0000 (14:28 +0000)] 
Improvements to the documentation for SQLITE_FCNTL_DATA_VERSION.
No changes to code.

FossilOrigin-Name: 27837624336d2883f721310bd4dceedb77085d1008af5e12557f634936d48b8c

6 years agoFix an invalid pointer comparison triggered by renaming a table column when
dan [Wed, 12 Sep 2018 08:51:48 +0000 (08:51 +0000)] 
Fix an invalid pointer comparison triggered by renaming a table column when
there are views with explicit column names in the schema.

FossilOrigin-Name: 572de7e4e33562c72cd90790b267ba389370f21ddcaebc4db609fd76ae9b7ada

6 years agoFix some harmless compiler warnings seen with MSVC.
mistachkin [Wed, 12 Sep 2018 01:05:26 +0000 (01:05 +0000)] 
Fix some harmless compiler warnings seen with MSVC.

FossilOrigin-Name: 78862252da7f59d4737ed16f4ccf100cea27d8b421db31051afbaa8d96f24de3

6 years agoFor MSVC, migrate some commonly used shell compilation options to the library.
mistachkin [Wed, 12 Sep 2018 00:48:17 +0000 (00:48 +0000)] 
For MSVC, migrate some commonly used shell compilation options to the library.

FossilOrigin-Name: 68a71e5f4e9cbd15eb64d271008e29f40913480bac467b90fb64f0269ad75818

6 years agoFix a harmless compiler warning that arose from the ENABLE_CURSOR_HINTS
drh [Wed, 12 Sep 2018 00:21:11 +0000 (00:21 +0000)] 
Fix a harmless compiler warning that arose from the ENABLE_CURSOR_HINTS
fix of check-in [0af18674ca5b34e67e]

FossilOrigin-Name: f578e62ae6f6cc78d8281adab9fa93f3f58711879c2860bbe19f291d257dc0af

6 years agoDo not do the byte-by-byte modifications in the resetdb.test script if the
drh [Tue, 11 Sep 2018 19:05:32 +0000 (19:05 +0000)] 
Do not do the byte-by-byte modifications in the resetdb.test script if the
reserved-byte flag in the DB header is non-zero, because in that case the
bytes will be in the wrong place and the test won't work.

FossilOrigin-Name: 0af18674ca5b34e67e1685be3adcdd99a7b8650589c6a7cde7ad9ef1852a8777

6 years agoFix a problem causing ENABLE_CURSOR_HINTS builds to segfault.
dan [Tue, 11 Sep 2018 13:38:35 +0000 (13:38 +0000)] 
Fix a problem causing ENABLE_CURSOR_HINTS builds to segfault.

FossilOrigin-Name: e7033104fa8bd974a9a3d173200aa07a3aa3daade86e7eb65cad5d00b086969e

6 years agoFix a test script issue in fts3ao.test.
dan [Mon, 10 Sep 2018 19:34:06 +0000 (19:34 +0000)] 
Fix a test script issue in fts3ao.test.

FossilOrigin-Name: 74c381b573817d0212153278b5ee5d2238a27a727dcf7ee769365c47bb9fc40d

6 years agoFix a minor problem causing an incorrect cursor-hint to be generated in some
dan [Mon, 10 Sep 2018 19:27:12 +0000 (19:27 +0000)] 
Fix a minor problem causing an incorrect cursor-hint to be generated in some
cases.

FossilOrigin-Name: d879c47d7d145cbe99602b2cf70294ddc946709e8d61040942085d29e2c5b6cd

6 years agoAdd the ability for loadable extensions to access the new
drh [Mon, 10 Sep 2018 17:21:17 +0000 (17:21 +0000)] 
Add the ability for loadable extensions to access the new
sqlite3_create_window_function() interface.

FossilOrigin-Name: 3def6d8ef11702eb03ad56aeb01763ec8e4ca8ed3b570ffb680164c5c3679e4f

6 years agoFix a broken assert() in fts3.c.
dan [Mon, 10 Sep 2018 16:38:25 +0000 (16:38 +0000)] 
Fix a broken assert() in fts3.c.

FossilOrigin-Name: 564fa75195c5179d0bc86431aaff06136fc65ec63aa9839cd1114b1fbfac928b

6 years agoNew testcase() macros on virtual table xBestIndex logic.
drh [Mon, 10 Sep 2018 14:43:15 +0000 (14:43 +0000)] 
New testcase() macros on virtual table xBestIndex logic.

FossilOrigin-Name: 3bbd9c5f2f1990f7d187951474a86996650dcede12c2608484d43250ae0b30d6

6 years agoFix the LIKE optimization so that it is disabled when the LHS of the
drh [Mon, 10 Sep 2018 12:40:57 +0000 (12:40 +0000)] 
Fix the LIKE optimization so that it is disabled when the LHS of the
expression does not have TEXT affinity and the RHS is the pattern '/%'
or the RHS begins with the escape character. Fix for ticket
[c94369cae9b561b1f996d0054b].

FossilOrigin-Name: f191431d63aba187000b5cbaf3e072ff5f1b1eef6a2a407fb4d1629bda4e4e8f

6 years agoFix a problem with processing a "vtab.col IS NULL" expression within
dan [Mon, 10 Sep 2018 12:17:16 +0000 (12:17 +0000)] 
Fix a problem with processing a "vtab.col IS NULL" expression within
the WHERE clause of a query when "vtab" is a virtual table on the rhs of a
LEFT JOIN.

FossilOrigin-Name: 83da4d4104ee1870a2a95bb5fa15ee6584c655d8b314b6b8ab97592dad4ee811

6 years agoFix an unreachable branch in the new sqlite3WhereOrderByLimitOptLabel()
drh [Sat, 8 Sep 2018 20:29:04 +0000 (20:29 +0000)] 
Fix an unreachable branch in the new sqlite3WhereOrderByLimitOptLabel()
function of the query planner.

FossilOrigin-Name: 5a954533edbde58aa7158572ece7ceeb1c6e610b71f3ae45d0b8371d74f9fea5

6 years agoFix multiple issues with the ORDER BY LIMIT optimization. This is the
drh [Sat, 8 Sep 2018 20:09:46 +0000 (20:09 +0000)] 
Fix multiple issues with the ORDER BY LIMIT optimization.  This is the
proposed resolution to ticket [9936b2fa443fec03ff25].

FossilOrigin-Name: 206720129ed2fa8875a286266d05b99fb2caf8671e4b74b26a6286a2073fcd8b

6 years agoAdd a missing call to free() in Lemon.
mistachkin [Sat, 8 Sep 2018 16:55:18 +0000 (16:55 +0000)] 
Add a missing call to free() in Lemon.

FossilOrigin-Name: 8b4cf33aafe09d9009119dcbd464b54be9605af5701002ee458819efa6e2e1f9

6 years agoFix typo in the Win32-specific code for the fileio extension.
mistachkin [Sat, 8 Sep 2018 16:53:47 +0000 (16:53 +0000)] 
Fix typo in the Win32-specific code for the fileio extension.

FossilOrigin-Name: e812e5d59a699e8b82c51d465d9c0f09df6a1e6996b5499814dca99c5f8020d5

6 years agoRemove a faulty ALWAYS() macro added by check-in [8fa254aa6329bdd0].
drh [Fri, 7 Sep 2018 19:12:08 +0000 (19:12 +0000)] 
Remove a faulty ALWAYS() macro added by check-in [8fa254aa6329bdd0].

FossilOrigin-Name: fc47316e9b6b9f4c37cb7d3fe2af3f4dfb900fb5f07945dbf1239152a2d8f836

6 years agoAdd extra test case to altertab.test.
dan [Fri, 7 Sep 2018 18:56:31 +0000 (18:56 +0000)] 
Add extra test case to altertab.test.

FossilOrigin-Name: 64c3ee3c255e4630ccd5002116d66fd2af6b12dbdd4a3bee5ed413c3ef87d33a

6 years agoAdd assert() and ALWAYS() to identify two unreachable branches.
drh [Fri, 7 Sep 2018 18:52:25 +0000 (18:52 +0000)] 
Add assert() and ALWAYS() to identify two unreachable branches.

FossilOrigin-Name: 8fa254aa6329bdd085b8e2c78d8e8a698b418eda8b2d48e0082dd9cd428cef29

6 years agoFix a problem with renaming a non-temp table that has at least one temp
dan [Fri, 7 Sep 2018 15:50:31 +0000 (15:50 +0000)] 
Fix a problem with renaming a non-temp table that has at least one temp
trigger and shares its name with a temp table.

FossilOrigin-Name: ceb60bd7e5f2a0a4247bff476fc6468227305467339ae0c24591be9d2b14bdde

6 years agoMinor fixes for problems revealed by releasetest.tcl.
dan [Fri, 7 Sep 2018 11:51:21 +0000 (11:51 +0000)] 
Minor fixes for problems revealed by releasetest.tcl.

FossilOrigin-Name: 1a8aedc3376b7ae32fa7b2c367eedd483e2629908836efd10ee5bd1fe0784675

6 years agoFix an uninitialized variable in the OP_ParseSchema opcode that comes up
drh [Fri, 7 Sep 2018 11:08:31 +0000 (11:08 +0000)] 
Fix an uninitialized variable in the OP_ParseSchema opcode that comes up
only if the schema is corrupt.

FossilOrigin-Name: 725808d4c59176f71787452c7e500b563fd99cfc8ece47b1efe01d5e207efe0d

6 years agoIn all.test, do not attempt to run the RBU tests in non-RBU builds.
dan [Thu, 6 Sep 2018 20:33:11 +0000 (20:33 +0000)] 
In all.test, do not attempt to run the RBU tests in non-RBU builds.

FossilOrigin-Name: 10c3e5a0314470ee1ffc37b68445a2cb2054530346d5f5ed3ffbd6df8003cad0

6 years agoFix a harmless compiler warning in os_unix.c.
drh [Thu, 6 Sep 2018 19:36:29 +0000 (19:36 +0000)] 
Fix a harmless compiler warning in os_unix.c.

FossilOrigin-Name: b9d1fb5d44e0a6ffc00ee987f178e448d7516e579beecdeeb387e69aef588921

6 years agoFix a problem with ALTER TABLE when there are views or triggers in the schema
dan [Thu, 6 Sep 2018 18:56:36 +0000 (18:56 +0000)] 
Fix a problem with ALTER TABLE when there are views or triggers in the schema
that contain "<expr> IS NULL" expressions.

FossilOrigin-Name: 91aab32e71fcb924e24c02d5f0901f7a474760fc993a7e7436e667512cf5d3c3

6 years agoFix a problem in ALTER TABLE with SQLITE_OMIT_VIRTUALTABLE builds.
dan [Thu, 6 Sep 2018 17:47:09 +0000 (17:47 +0000)] 
Fix a problem in ALTER TABLE with SQLITE_OMIT_VIRTUALTABLE builds.

FossilOrigin-Name: fa835145e63749e06e04bd50ff992afaeae05dcdd1df597d13911f944e62076b

6 years agoFix test script problems causing SQLITE_OMIT_VIRTUALTABLE builds to fail.
dan [Thu, 6 Sep 2018 17:23:08 +0000 (17:23 +0000)] 
Fix test script problems causing SQLITE_OMIT_VIRTUALTABLE builds to fail.

FossilOrigin-Name: 37ad064e5f5704cf345d23b38b3f6d627fbcf20dbb78c8a91e96c9704760a1b8

6 years agoMerge accidental fork.
mistachkin [Thu, 6 Sep 2018 16:50:54 +0000 (16:50 +0000)] 
Merge accidental fork.

FossilOrigin-Name: ebadb7dc25b9ab544a941ceb9a18926268c21bb60de98737f6ef19915ee8e61a

6 years agoFix harmless compiler warning.
mistachkin [Thu, 6 Sep 2018 16:47:10 +0000 (16:47 +0000)] 
Fix harmless compiler warning.

FossilOrigin-Name: 88b39c46c15ab6bdd0ac9536ddb6fb09862d578d0f691c57d039b0a906f1c25c

6 years agoFix a problem causing SQLITE_OMIT_VIRTUALTABLE builds to fail.
dan [Thu, 6 Sep 2018 16:47:08 +0000 (16:47 +0000)] 
Fix a problem causing SQLITE_OMIT_VIRTUALTABLE builds to fail.

FossilOrigin-Name: 18beabc848d0ed7f5c918cbec5372a49915d889d7ffc9f475e6b208407e9ebd2

6 years agoAdd new test file "alterauth.test".
dan [Thu, 6 Sep 2018 16:24:23 +0000 (16:24 +0000)] 
Add new test file "alterauth.test".

FossilOrigin-Name: 00940265b18a3cf848602e1e0b3edbd935cb4309ef91a34b0d5746a258a47ae6

6 years agoAdd an "ALTER TABLE RENAME COLUMN" command. Upgrade "ALTER TABLE RENAME TABLE"
dan [Thu, 6 Sep 2018 16:20:09 +0000 (16:20 +0000)] 
Add an "ALTER TABLE RENAME COLUMN" command. Upgrade "ALTER TABLE RENAME TABLE"
so that it modifies references to the renamed table embedded in SQL view and
trigger definitions.

FossilOrigin-Name: 4da5998314ed2c694b0e242755930f5320af89ac5c148845392f0a2043d44d22

6 years agoMerge latest trunk changes into this branch. alter-table-rename-column
dan [Thu, 6 Sep 2018 16:17:22 +0000 (16:17 +0000)] 
Merge latest trunk changes into this branch.

FossilOrigin-Name: 8a28a326d7f72ab94c7d089dbc047e719038b6cd410068dec0d173a7655c87ca

6 years agoEnsure that the tbl_name column in the sqlite_temp_master table is updated
dan [Thu, 6 Sep 2018 16:01:37 +0000 (16:01 +0000)] 
Ensure that the tbl_name column in the sqlite_temp_master table is updated
correctly as part of a RENAME TABLE operation.

FossilOrigin-Name: ffecfca511718e39e0003b380d5113755b8a11405a5bd80cc04503d9557f0842

6 years agoAdd the randomshape.tcl test-case generator script to the util subdirectory
drh [Thu, 6 Sep 2018 14:01:56 +0000 (14:01 +0000)] 
Add the randomshape.tcl test-case generator script to the util subdirectory
of the rtree extension.

FossilOrigin-Name: 8f48991dcbb01e21d065fbba7782a6d1aebaa8065841a70a76af1e5a21f18ea4

6 years agoFix excess memory usage in the JSON parser of GEOPOLY.
drh [Thu, 6 Sep 2018 11:14:17 +0000 (11:14 +0000)] 
Fix excess memory usage in the JSON parser of GEOPOLY.

FossilOrigin-Name: 9057e27e12ded07a9ea0b2868036d3019f7bc5be3a67e3d341f56b762d3de9d9

6 years agoFix a problem with geopoly trying to update both the _shape and an auxiliary
drh [Thu, 6 Sep 2018 02:40:15 +0000 (02:40 +0000)] 
Fix a problem with geopoly trying to update both the _shape and an auxiliary
column in the same UPDATE statement.

FossilOrigin-Name: 14c955152d0580abc3df1b363789f2925e013b9c957e550b1e6ebe83a82bae6c

6 years agoMerge latest trunk changes into this branch.
dan [Wed, 5 Sep 2018 17:52:52 +0000 (17:52 +0000)] 
Merge latest trunk changes into this branch.

FossilOrigin-Name: 6f4f707f9c3c29f2437962fd5d7761876cf8e7ed7fdcb9d0ca4fd001fa226597

6 years agoFix some test script errors. And an incorrect assert() in fts5.
dan [Wed, 5 Sep 2018 17:45:17 +0000 (17:45 +0000)] 
Fix some test script errors. And an incorrect assert() in fts5.

FossilOrigin-Name: f804336f083d8d26314bb1ba34cec427675065a67cbe2bf00bb42e40752aeb33

6 years agoRemove an old testcase() macro that is no longer valid.
drh [Wed, 5 Sep 2018 16:16:56 +0000 (16:16 +0000)] 
Remove an old testcase() macro that is no longer valid.

FossilOrigin-Name: e628713338f6e584a32d5fc3436ddbd9ee8cf88401c321c1ebe7daa1e695c623

6 years agoAvoid comparing pointer values after the object that they point to has been
dan [Wed, 5 Sep 2018 14:36:05 +0000 (14:36 +0000)] 
Avoid comparing pointer values after the object that they point to has been
deleted.

FossilOrigin-Name: 2ec7e50cbc0e7a4308d51be3c9416229b187a6a8abdd982c154edc256cd6da1f

6 years agoFix minor code issues in alter.c.
dan [Wed, 5 Sep 2018 08:28:30 +0000 (08:28 +0000)] 
Fix minor code issues in alter.c.

FossilOrigin-Name: 18ba35b86f3b9813179b5f8d74e59e4860bfb800f45aabab8d6c0a6d7c97fe74

6 years agoMerge latest trunk changes into this branch.
dan [Tue, 4 Sep 2018 18:23:59 +0000 (18:23 +0000)] 
Merge latest trunk changes into this branch.

FossilOrigin-Name: ef9e088290efa9d0fc36bcdef710cadfef37c8a33f4685dad4ce113807e1cc75

6 years agoImprove the error messages emitted by RENAME TABLE.
dan [Mon, 3 Sep 2018 20:05:15 +0000 (20:05 +0000)] 
Improve the error messages emitted by RENAME TABLE.

FossilOrigin-Name: 6805b5900df5e6d3329cbad2660875ebe4069efe37b19575f527d153dc0882a1

6 years agoEnsure that FTS5 queries of the form "WHERE rowid BETWEEN ? AND ? AND tbl
dan [Mon, 3 Sep 2018 17:11:11 +0000 (17:11 +0000)] 
Ensure that FTS5 queries of the form "WHERE rowid BETWEEN ? AND ? AND tbl
MATCH ? ORDER BY rank" do rowid filtering before sorting.

FossilOrigin-Name: f1138a38bd23f201a35621a71e82c5718abddb42ab82938e9516ab9d43e4df16

6 years agoAdd another test case to altertab.test.
dan [Sat, 1 Sep 2018 20:38:42 +0000 (20:38 +0000)] 
Add another test case to altertab.test.

FossilOrigin-Name: 828e8849faed85812c03215b00a2ba34cbb00dfa4d4afdcbd11300ba7fcf9743

6 years agoFix a problem with renaming a column in a table that has a temp trigger that
dan [Sat, 1 Sep 2018 20:23:28 +0000 (20:23 +0000)] 
Fix a problem with renaming a column in a table that has a temp trigger that
references another attached database.

FossilOrigin-Name: 336b8a0923bf65b7a2c35811cb6dec0e262a0b31e534d2a6ab093d2afdb05c1f

6 years agoFixes for harmless compiler warnings.
drh [Sat, 1 Sep 2018 20:02:07 +0000 (20:02 +0000)] 
Fixes for harmless compiler warnings.

FossilOrigin-Name: 41b8f38b97bf0d1abcd6de8e940269fc4c51e2bbcf7b2e53e0c8440c58187c33

6 years agoFix some harmless compiler warnings and improve defenses against OOM errors.
drh [Sat, 1 Sep 2018 16:55:36 +0000 (16:55 +0000)] 
Fix some harmless compiler warnings and improve defenses against OOM errors.

FossilOrigin-Name: 2e2cf992f5d6cae2030c3c03b0eb98af3b130e86a719b991e41380138751f615

6 years agoMerge alter-table-rename-table back into this branch.
dan [Sat, 1 Sep 2018 16:13:41 +0000 (16:13 +0000)] 
Merge alter-table-rename-table back into this branch.

FossilOrigin-Name: ad704a7c86c9ee51c1eb696007660cb9044bba6a8c588a33a8bd66613c231421

6 years agoHave "ALTER TABLE ADD COLUMN" reload the entire db schema, as "RENAME COLUMN" alter-table-rename-table
dan [Sat, 1 Sep 2018 16:05:50 +0000 (16:05 +0000)] 
Have "ALTER TABLE ADD COLUMN" reload the entire db schema, as "RENAME COLUMN"
and "RENAME TABLE" do.

FossilOrigin-Name: 8d89ddc1a628e983b0fbd929c9c9daac86ee23d18f8dd2709c971012389395c6

6 years agoMerge fixes from the alter-table-rename-column branch that occurred after
drh [Sat, 1 Sep 2018 15:55:44 +0000 (15:55 +0000)] 
Merge fixes from the alter-table-rename-column branch that occurred after
this branch separated from that one.

FossilOrigin-Name: 22e785aa2bbce4ae0852bc3d127d4b12222a192eb6e3ee874bf8e5c8582d05f3

6 years agoMerge fixes and enhancements from trunk.
drh [Sat, 1 Sep 2018 15:49:13 +0000 (15:49 +0000)] 
Merge fixes and enhancements from trunk.

FossilOrigin-Name: 589186c083ff3af8d5a6d5ad34e1cefea57806ebf3831ea3bf5a48ef1e173140

6 years agoUpdate test script snapshot_fault.test to account for the new
dan [Sat, 1 Sep 2018 06:13:07 +0000 (06:13 +0000)] 
Update test script snapshot_fault.test to account for the new
sqlite3_snapshot_open() error code.

FossilOrigin-Name: c1aca7673ab04740bc8ad76af0a72a229c79a0cd51cf84d1c689a77424ff17c6

6 years agoNew hyperlink on the README.md file.
drh [Fri, 31 Aug 2018 23:22:40 +0000 (23:22 +0000)] 
New hyperlink on the README.md file.

FossilOrigin-Name: c663961e34ec03ef76aabc9741f37d19544826e3e0b5931711313fc088e9e62c

6 years agoIf a call to sqlite3_snapshot_open() fails because the requested snapshot no
dan [Fri, 31 Aug 2018 19:00:16 +0000 (19:00 +0000)] 
If a call to sqlite3_snapshot_open() fails because the requested snapshot no
longer exists, return SQLITE_ERROR_SNAPSHOT instead of SQLITE_BUSY_SNAPSHOT.

FossilOrigin-Name: e07923128bb164efbafde29d49175b61f2ef44b2dfac5ae4ed61937945dfcf4c

6 years agoEnsure b-tree mutexes are always held when sqlite3FindTable() is called. Do
dan [Fri, 31 Aug 2018 18:23:53 +0000 (18:23 +0000)] 
Ensure b-tree mutexes are always held when sqlite3FindTable() is called. Do
not invoke the authorizer callback when parsing schema items as part of ALTER
TABLE commands. Fix test script issues.

FossilOrigin-Name: eac2aa7dce577f1998cc2078dd8ac384070f8acf1ceb565999a5cf719092024e

6 years agoTry to identify the places in WAL code where thread-safety depends on the
drh [Thu, 30 Aug 2018 20:28:18 +0000 (20:28 +0000)] 
Try to identify the places in WAL code where thread-safety depends on the
underlying architecture supporting atomic load and store of aligned 32-bit
values.

FossilOrigin-Name: 47d44be4a68d377d0049a12b2587dbbcc0870b469473e1098f7c0358fe8c7532

6 years agoTest the schema after renaming a table. Ensure that temp database triggers and
dan [Thu, 30 Aug 2018 20:03:44 +0000 (20:03 +0000)] 
Test the schema after renaming a table. Ensure that temp database triggers and
views are updated when renaming a column.

FossilOrigin-Name: f3c27d916d4837f8fc3dd812bd004535f04c7a53bd2a0a2419613275f48bec76

6 years agoGive the debugging routine print_pager_stats() external linkage in order to
drh [Thu, 30 Aug 2018 18:53:09 +0000 (18:53 +0000)] 
Give the debugging routine print_pager_stats() external linkage in order to
suppress harmless compiler and TSAN warnings.

FossilOrigin-Name: ff4dc08298ab3988e69fe60802657791f65d2af15f4b1cbd1d02649bc597d0d6

6 years agoFix an ALTER TABLE problem with processing temp schema views and triggers.
dan [Thu, 30 Aug 2018 16:26:48 +0000 (16:26 +0000)] 
Fix an ALTER TABLE problem with processing temp schema views and triggers.

FossilOrigin-Name: 72cfb1be29971d91a164f1d4f20cb054de68960a0bd547630bcd1160565971c5

6 years agoImproved JSON parser caching.
drh [Thu, 30 Aug 2018 01:52:10 +0000 (01:52 +0000)] 
Improved JSON parser caching.

FossilOrigin-Name: 58078c0d2647a194279fa80e032670441b296ffc3acee692901faa5beca460b7

6 years agoAdditional test cases for geopoly.
drh [Wed, 29 Aug 2018 21:01:22 +0000 (21:01 +0000)] 
Additional test cases for geopoly.

FossilOrigin-Name: 19b5eb45e090c4b7169a52d881495ee2eafc59f80e3db2288fc1814ba76134ac

6 years agoExtend RENAME TABLE to edit triggers and views. Still buggy.
dan [Wed, 29 Aug 2018 21:00:16 +0000 (21:00 +0000)] 
Extend RENAME TABLE to edit triggers and views. Still buggy.

FossilOrigin-Name: 01308bae3acf33f78b5bb90892085eab340df093aafc17e6ccf6a7d6cf324897

6 years agoFixes to the UPDATE logic in Geopoly.
drh [Wed, 29 Aug 2018 20:52:40 +0000 (20:52 +0000)] 
Fixes to the UPDATE logic in Geopoly.

FossilOrigin-Name: 7c3cee0a2a5ccacff27400c38bd708f7b9b968eb013a8fa685d876dfe85e12a6