]>
git.ipfire.org Git - thirdparty/sqlite.git/log
drh [Tue, 30 Oct 2018 00:06:52 +0000 (00:06 +0000)]
Improvements to the -fsanitize=fuzzer based database file fuzzer.
FossilOrigin-Name:
585c94db09d21ce5c5275537014ba5cfe75d4df9274d6fd8d07f754e4aa2c640
drh [Tue, 30 Oct 2018 00:06:27 +0000 (00:06 +0000)]
In the VACUUM command, defer setting writable_schema until after it has been
determined that the schema is not corrupt.
FossilOrigin-Name:
3afec260142f939c4ee1f3930769ddf383563eb7660b4ebe9478ccc0b8c62ace
drh [Mon, 29 Oct 2018 21:01:28 +0000 (21:01 +0000)]
Fix a potential assertion fault that can occur while trying to DROP a table
from a corrupted database file.
FossilOrigin-Name:
147a9429a558cf34c316ab8f87832e97caff55d92df696ab6fd045466c8c663d
drh [Mon, 29 Oct 2018 18:33:42 +0000 (18:33 +0000)]
Fix minor memory leak in the dbstat extension that can occur following an
attempt to analyze a corrupt database file.
FossilOrigin-Name:
cb874fd87384be397008e953242d5773ef5d64e07c3e1ae352a42a25d70597b4
dan [Mon, 29 Oct 2018 17:08:27 +0000 (17:08 +0000)]
In the sessions module, avoid collecting rebase data if the user has not
requested it.
FossilOrigin-Name:
de72a773dd3ad58a7f2233e1fc06bf60deb8892a2719ea8e9b42e7d592c1279f
drh [Mon, 29 Oct 2018 16:07:10 +0000 (16:07 +0000)]
Harden the dbstat extension against corrupt database files.
FossilOrigin-Name:
a0d47f25ae7bdf98f5b853f23776b3bf86bea7c0dda386664c1e3b1c363c518f
drh [Sat, 27 Oct 2018 21:06:44 +0000 (21:06 +0000)]
drh [Sat, 27 Oct 2018 16:02:16 +0000 (16:02 +0000)]
Add an entry in Makefile.in to build dbfuzz2 using clang-6.0 with
-fsanitize=fuzzer,undefined.
FossilOrigin-Name:
a4a083ed8cdb106af661d2ee0203e21c576f5c2304419ce603826e4f2851c2e0
drh [Sat, 27 Oct 2018 00:47:33 +0000 (00:47 +0000)]
Initial code for a fuzzing tool on database file that works with the
-fsanitize=fuzzer option of clang.
FossilOrigin-Name:
90d12094d36957fbded71545add8a5dc206798fdacc17d4d161d715569a7f991
dan [Fri, 26 Oct 2018 17:05:00 +0000 (17:05 +0000)]
Add the sqlite3session_config() interface. For configuring global parameters
belonging to the sessions module.
FossilOrigin-Name:
1e69f3ff057b0be27a9e79842de2485f8299799f309e89bfa7597dd688e0975b
dan [Fri, 26 Oct 2018 15:36:53 +0000 (15:36 +0000)]
Prevent an == constraint specified using the table-valued-function argument
syntax from being used to optimize any scan not related to the virtual table
for which it was specified as an argument.
FossilOrigin-Name:
4d46685f282409f7154be288719cbea4b743d7ea5315a55a91462003497469f7
drh [Thu, 25 Oct 2018 14:15:37 +0000 (14:15 +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:
5d5b596f152bb2781011a05f75f9e200774d4f69d648ef68de577b4ace973e07
drh [Wed, 24 Oct 2018 23:55:41 +0000 (23:55 +0000)]
Add the ENABLE_GEOPOLY case to the compile_options pragma.
FossilOrigin-Name:
de940296d227c96db4d0cf913fc5c0e5138729eda7cda0a0ac6b704cce1e1e1e
dan [Tue, 23 Oct 2018 13:48:19 +0000 (13:48 +0000)]
Fix a problem with using window functions in compound (UNION, INTERSECT etc.)
queries.
FossilOrigin-Name:
059ff53a46c7f1e4bf3e7dc558312beef67826c2753e2ab7e4e7df498b37b617
dan [Sat, 20 Oct 2018 13:48:09 +0000 (13:48 +0000)]
Add the sqlite3changeset_start_v2() - a new version of _start() that accepts a flags parameter - and a streaming equivalent to the sessions module. Also add the SQLITE_CHANGESETSTART_INVERT flag, used with start_v2() to invert a changeset while iterating through it.
FossilOrigin-Name:
cbedcb9aaefdfe00453efbdf0eac6c15e1f53bbe8fff2e7d534a5adf23be04f5
dan [Thu, 18 Oct 2018 15:17:18 +0000 (15:17 +0000)]
Take steps to avoid a potential integer overflow in sessionBufferGrow().
FossilOrigin-Name:
f7affa2e708d1b4c7c47157bcb18e9f79611ca45a93ebc88de6dc96f84a677e7
dan [Thu, 18 Oct 2018 14:59:21 +0000 (14:59 +0000)]
Add the SQLITE_CHANGESETAPPLY_INVERT flag to sessions. For inverting and applying a changeset in a single step.
FossilOrigin-Name:
d4b6406e7f5ba06ac73ab9fdef57232b2459e0af12420ed946ebed6aef46f0b1
drh [Fri, 12 Oct 2018 15:01:56 +0000 (15:01 +0000)]
drh [Thu, 11 Oct 2018 18:41:50 +0000 (18:41 +0000)]
drh [Thu, 11 Oct 2018 16:53:37 +0000 (16:53 +0000)]
drh [Thu, 11 Oct 2018 16:38:56 +0000 (16:38 +0000)]
Always reset the pager before changing the codec.
FossilOrigin-Name:
0bf0fd242b93c3bd308ab46db1be9edef141b89db07a0f5a4ed8b23c963da0d5
drh [Thu, 11 Oct 2018 13:51:48 +0000 (13:51 +0000)]
On the first connection to a WAL-mode database that was not cleanly shut down
and contains a left-over -shm file, truncate the -shm file to 3 bytes instead
of to 0 bytes. Avoiding a truncation to 0 means that system monitoring tools
can better detect if a process illegitimately tries to truncate a -shm file.
Such a rogue process might think it is being helpful by cleaning up old files,
but there is a race condition that can cause damage to the database.
FossilOrigin-Name:
90cf32cde072a305f30c75a71665d1f9e23e805c0a49f5306f015c056dd70f0c
drh [Thu, 11 Oct 2018 10:37:24 +0000 (10:37 +0000)]
In the CLI, fix a file descriptor leak following OOM and a missing va_end()
call.
FossilOrigin-Name:
ec36d15a9e349f4295a9e2215dea0a18e9276e0e4ce2d05021e6b467ab7763bb
drh [Thu, 11 Oct 2018 02:39:11 +0000 (02:39 +0000)]
In the unix VFS, fix the heap shm allocator (used for unix-excl)
so that it works even on systems where the page size is larger than 32KB.
FossilOrigin-Name:
7fbb083c5cf0948af3624b7538ffa086f77de27a3e84a7039ae7d6574f1a3a54
drh [Wed, 10 Oct 2018 18:56:40 +0000 (18:56 +0000)]
In the CLI, allow the SQLITE_HISTORY environment variable, if it exists,
to specify an alternative file in which to store the shell edit history.
FossilOrigin-Name:
696e82f7c82d1720756078e73f3b15b4cafc202ec290e66f9095a3246c65a3cb
drh [Mon, 8 Oct 2018 20:04:16 +0000 (20:04 +0000)]
Fix an issue with the new memstat.c extension.
FossilOrigin-Name:
ce6e80b1303ed161bec2c63735cd2e2bea7b4e9b4ff780d214d408b1a30d50da
drh [Mon, 8 Oct 2018 18:55:56 +0000 (18:55 +0000)]
Replace the new geopoly_reverse() function with geopoly_ccw(). The
geopoly_ccw() function only reverses the vertex order if doing so is necessary
to get the correct right-hand winding rule on the polygon.
FossilOrigin-Name:
075066944b13b18d339ccf87ae16f0b91bf00f40bd70f71c6beba6aa6c43f0b6
drh [Mon, 8 Oct 2018 12:58:59 +0000 (12:58 +0000)]
Add the geopoly_reverse() function to the GeoPoly extension.
FossilOrigin-Name:
690dd18a5768c5a8cdfa92d5b01901c1a7b1fb6ebb90399f56a3112e41609f92
drh [Sat, 6 Oct 2018 14:38:17 +0000 (14:38 +0000)]
Fix the ".help -all" option in the command-line shell.
FossilOrigin-Name:
aac8f1dff0728c629b5cbf30369ee91c5862a707ede694dc2628d1d4f5a6c202
dan [Sat, 6 Oct 2018 13:46:22 +0000 (13:46 +0000)]
Add test cases and assert() statements to ensure that the authorizer is being
called as expected from within ALTER TABLE.
FossilOrigin-Name:
ff10d2c7de430c88167b1e6e4f5307eee5d69e22c8d24b2ef4fcb3aea25a92e1
drh [Fri, 5 Oct 2018 15:10:00 +0000 (15:10 +0000)]
Changes to geopoly to silience false-positive warnings coming out of clang.
FossilOrigin-Name:
11d9015f31d1ea2fd27174d4ceea08a145fdbb92a175bec0aae4b90f991694bc
drh [Wed, 3 Oct 2018 18:05:36 +0000 (18:05 +0000)]
Add an ALWAYS on an unreachable branch in the ALTER TABLE logic.
FossilOrigin-Name:
ebcd4523171f0988ff08e2bf36fb8a0caa40efe7ac7556b4eb206784969b03e4
dan [Wed, 3 Oct 2018 11:13:30 +0000 (11:13 +0000)]
Change a type in shell.c.in from "int" to "sqlite3_int64" in order to
avoid a compiler warning and possible integer overflow.
FossilOrigin-Name:
bf0a6634cd8f9457992b8da522a6775a304156815bf6f4f64f96016356baa870
drh [Tue, 2 Oct 2018 20:16:41 +0000 (20:16 +0000)]
Add an additional assert() verifying mutex invariants on the
unixShmSystemLock() routine in the unix VFS.
FossilOrigin-Name:
cb1511065d5348c5b3015dc9d690fc5d519a14ffdfa7164bb552a4fa686ad142
drh [Tue, 2 Oct 2018 19:58:08 +0000 (19:58 +0000)]
Additional field name changes and commit fixes associated with shared-memory
locking in the unix VFS, to improve maintainability. No logic changes.
FossilOrigin-Name:
9280774a4bbc665d70f346d258768cbcca3e0e77791473aecfd7d0e87810ab31
drh [Tue, 2 Oct 2018 19:36:40 +0000 (19:36 +0000)]
Fix comments and refactor some names associated with shared-memory locking
in the Unix VFS. No logical changes.
FossilOrigin-Name:
3e9f1635271c92dce5324728b4ee1cc1a1856ec3c60b1b512a652c21e010e63e
drh [Mon, 1 Oct 2018 21:41:15 +0000 (21:41 +0000)]
Add the "PRAGMA table_xinfo" command that works like table_info but also
shows hidden columns in virtual tables and adds the "hidden" boolean column.
FossilOrigin-Name:
defa0515b8fd50ed9be699542f8c6695dd4a60c02f310665db6657ec5b6b67d0
drh [Mon, 1 Oct 2018 21:36:38 +0000 (21:36 +0000)]
drh [Mon, 1 Oct 2018 21:26:30 +0000 (21:26 +0000)]
Change the name of the pragma to PRAGMA table_xinfo. Improve the
mkpragmatab.tcl script to reuse column names where appropriate.
FossilOrigin-Name:
2fdd068987e59b979045d71ae64e700600ef07e54ae340f30c2064e5dcccb8ea
drh [Mon, 1 Oct 2018 18:28:42 +0000 (18:28 +0000)]
Add the extra "hidden" column to the end of the PRAGMA table_vinfo output.
FossilOrigin-Name:
cf1b76135f511530dcc7b82f78c952bf97ebcddb40be06f713f9f2326915fabe
dan [Mon, 1 Oct 2018 17:33:35 +0000 (17:33 +0000)]
Speed up xAccess() calls made on an RBU VFS when there are lots of open
connections.
FossilOrigin-Name:
310b4b65b8c8ee080760c7efb4c7e20244c6063a5dba37a4f40490105aafd29f
drh [Mon, 1 Oct 2018 17:15:17 +0000 (17:15 +0000)]
Bring the PRAGMA table_vinfo statement up to date with trunk.
FossilOrigin-Name:
6f606f99231f88ae5ff719d0ce21afc4b844490102c27ac20aa606baaf78d8d6
drh [Mon, 1 Oct 2018 13:54:30 +0000 (13:54 +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:
8ac2cdda68f92b0352bc7f0b4be5fca4bb58565ca65055fb34153cc284ed6922
dan [Mon, 1 Oct 2018 07:04:12 +0000 (07:04 +0000)]
Fix a problem with ALTER TABLE commands when the schema features an INSTEAD of
trigger that uses NEW.* or OLD.*.
FossilOrigin-Name:
c52f457e56eb9d573eb67093731eb231aaf6fd6dbdc397e6f948b82736fbe3ab
drh [Sat, 29 Sep 2018 19:38:42 +0000 (19:38 +0000)]
Add the PRAGMA table_vinfo command (with an extra "v" before "info") that
works like PRAGMA table_info (without the "v") except that it also shows
hidden columns on virtual tables.
FossilOrigin-Name:
8bcd1a59560aa7ea73e6529e5c14ece8ac09bf7e99efdcfd388fead39846b6bf
drh [Fri, 28 Sep 2018 23:53:24 +0000 (23:53 +0000)]
dan [Fri, 28 Sep 2018 20:46:41 +0000 (20:46 +0000)]
Have sqlite3changegroup_output_strm() call its output function more regularly.
FossilOrigin-Name:
8467c31aa0bf24e597f680748460a99f425c49f5ab741c3574c339aa56857146
drh [Fri, 28 Sep 2018 18:51:18 +0000 (18:51 +0000)]
Fix a bug in the sqlite_memstat virtual table that was causing it to report
the amount of memory used as zero bytes.
FossilOrigin-Name:
8a758a872175b0c74e631c231240c5c733fbec708d0cff23eb9c4025e4a800ec
drh [Fri, 28 Sep 2018 14:01:17 +0000 (14:01 +0000)]
Add the geopoly_regular(X,Y,R,N) function to the geopoly extension.
FossilOrigin-Name:
4505bbae58357eacab262b642b2a56d6dd380de72faceb5bbfd042eb94a12c06
drh [Fri, 28 Sep 2018 13:18:24 +0000 (13:18 +0000)]
drh [Fri, 28 Sep 2018 00:16:57 +0000 (00:16 +0000)]
Rig geopoly to use sqlite3AtoF() if it is available, as that routine is much
faster than atof().
FossilOrigin-Name:
470c6c07d0eb70806ac257c1c8ad877e041bbc14ff9a5c490edb51b2956ae726
drh [Thu, 27 Sep 2018 23:57:45 +0000 (23:57 +0000)]
Small performance optimization in the JSON parser of Geopoly.
FossilOrigin-Name:
fb520e71035258d5490be33ee28575df2caefa5d5a301c8bbdf1471551c96282
drh [Thu, 27 Sep 2018 20:37:52 +0000 (20:37 +0000)]
Enhance the GeoPOLY extension so that it always stores its polygons in the
binary format, which is faster and more compact.
FossilOrigin-Name:
dc35f7b1754a78fa0d70c92754de07bb3c28d0d31cb929ee8a3a47ac4f3d446e
drh [Thu, 27 Sep 2018 20:20:01 +0000 (20:20 +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:
322ab1fc613f616e9f07dc94ef74a29572a21cc476d88e97b4ce865500a47b62
dan [Thu, 27 Sep 2018 17:33:06 +0000 (17:33 +0000)]
Another minor tweak to memstat.c so that it may be built against older versions
of SQLite.
FossilOrigin-Name:
4c1fed60b9b35ac2f5d2f2533b54db429d72bdbc0aad0dd5af52ff851789d4ae
drh [Thu, 27 Sep 2018 17:15:21 +0000 (17:15 +0000)]
Modify the memstat virtual table so that it works with SQLite version 3.9.2.
FossilOrigin-Name:
7171d8ae6b1e7c97b0cf06bcca2262674c9ce557c85666b4b77c16cbac508502
drh [Thu, 27 Sep 2018 17:03:03 +0000 (17:03 +0000)]
Add the sqlite_memstat extension - an eponymous virtual table that shows
memory usages statistics for SQLite.
FossilOrigin-Name:
954ef61f6a02532e72c815208ec839310f1e00d69e0003cc6f5426f0559229d1
drh [Thu, 27 Sep 2018 16:57:42 +0000 (16:57 +0000)]
Enhancements to sqlite_memstat:
(1) Add an extra "schema" column to show the schema name for ZIPVFS stats.
(2) Only show ZIPVFS stats to schema that use ZIPVFS
(3) Put a NULL in unused columns of the output.
FossilOrigin-Name:
9351135b4331107be2f2bda7b6adbd5436381f4f9a68340e8a172b6517ec3f12
drh [Thu, 27 Sep 2018 15:45:03 +0000 (15:45 +0000)]
Add initial ZIPVFS support for the "main" database to the sqlite_memstat
virtual table.
FossilOrigin-Name:
9cd27350b0f62debfe3238c57c3ab51079699142e82c05a7ec8460a8429f55f2
drh [Thu, 27 Sep 2018 15:21:13 +0000 (15:21 +0000)]
Initial prototype of a eponymous virtual table that accesses sqlite3_status64()
and sqlite3_db_status().
FossilOrigin-Name:
0b44e1f68e0c8349367e3f929d4734c3df96338ec8d6fb652565bf894e8b8343
dan [Thu, 27 Sep 2018 12:14:15 +0000 (12:14 +0000)]
Disallow the use of window functions in the recursive part of a recursive CTE.
FossilOrigin-Name:
7fc2994434c7d9ed29c96a69c07e8eb4e97be776473c170c63f9a1bbaa09fa68
mistachkin [Thu, 27 Sep 2018 00:04:31 +0000 (00:04 +0000)]
Minor simplification: In OP_ParseSchema, read the p1 register once.
FossilOrigin-Name:
bd250533a06e4a11c1f548c3de66b8562fc627383848570d7d030cf132fd336f
drh [Wed, 26 Sep 2018 18:02:32 +0000 (18:02 +0000)]
Further improvements to the ".help" command in the CLI.
FossilOrigin-Name:
edc3d18ecbda32d6a55de76ee7335342425c57d917e9b48814a7301a012263b2
drh [Wed, 26 Sep 2018 16:53:51 +0000 (16:53 +0000)]
Begin revamping the ".help" command in the command-line shell so that it
can accept an argument and will do a search for commands that match that
argument.
FossilOrigin-Name:
209afb8d06466536863b89a8acb9a1a18477a06331d8cce95fc6380e1666b6f5
dan [Wed, 26 Sep 2018 16:05:07 +0000 (16:05 +0000)]
Tweak spellfix.c so that if SQLITE_SPELLFIX_5BYTE_MAPPINGS is defined at
compile time the Transliteration structure has space for 5 byte (instead of 4
byte) mappings.
FossilOrigin-Name:
cbaf5b6c1b07b29b2c83fa01618de856d81cc1174769cb9770cb5c894cc87ace
drh [Wed, 26 Sep 2018 03:43:42 +0000 (03:43 +0000)]
Fix typos in the header comment for the sha1 and sha3 hash extensions
in the ext/misc folder.
FossilOrigin-Name:
4ed9d83a0b14a22b3ecf25785b03b5a824d260e01a608aea85231df9b816421d
dan [Tue, 25 Sep 2018 13:51:31 +0000 (13:51 +0000)]
Fix a problem in releasetest.tcl causing configuration "Fast-One" to fail.
FossilOrigin-Name:
42e04fefbc241dd33f12abd66344a87720ae4cda6d82f2882217b3cb71be8733
drh [Mon, 24 Sep 2018 15:39:30 +0000 (15:39 +0000)]
Slightly smaller and faster alternative to [
507d892c3a40a0bacbd47 ] that
fixes a problem with views that use window function as part of complex
expressions.
FossilOrigin-Name:
d7c816ae15f05f21b9b213161e1044aaefc56f17e7bc4b7b551a9e04efc05855
dan [Mon, 24 Sep 2018 14:51:59 +0000 (14:51 +0000)]
Fix a problem with views that use window functions as part of complex expressions.
FossilOrigin-Name:
507d892c3a40a0bacbd47ed3c4fe2d8925a82716ae08da8401750a42782ba454
drh [Mon, 24 Sep 2018 14:10:55 +0000 (14:10 +0000)]
Allow a writable virtual table to have a schema with an INTEGER PRIMARY KEY
and WITHOUT ROWID. This fixes ticket
[
f25d5ceebe1d710ff61a571e395356869d8272ef ].
FossilOrigin-Name:
5a38d9281b4ad63b853efa5cdd5ad4a64b19dfaf8250ef8e0e186684df1211ea
drh [Mon, 24 Sep 2018 12:37:01 +0000 (12:37 +0000)]
Use compile-time options SQLITE_QUERY_PLANNER_LIMIT and
SQLITE_QUERY_PLANNER_LIMIT_INCR to control the value for
WhereLoopBuilder.iPlanLimit, rather than embedding magic numbers in the
code.
FossilOrigin-Name:
903e501894b2a5dd7055b5154d74d4a47a619f76e66485a4d62b6259f10723d6
drh [Mon, 24 Sep 2018 10:47:33 +0000 (10:47 +0000)]
Increase the initial value of WhereLoopBuilder.iPlanLimit to 20K. Issue
a warning if the iPlanLimit reaches zero.
FossilOrigin-Name:
3dd35f51187574f47f860405309877cdbf9dc5710703dfd98cf98073b771140c
drh [Sun, 23 Sep 2018 02:01:42 +0000 (02:01 +0000)]
Fix a faulty assert() in the validation logic for the LEFT JOIN strength
reduction optimization. Problem found by OSSFuzz.
FossilOrigin-Name:
2fd62fccd13e326dbd7dd730112542c6faa56e466bf4f7b8e22ced543031280c
drh [Sat, 22 Sep 2018 15:05:32 +0000 (15:05 +0000)]
Enhance WhereLoopBuilder.iPlanLimit to handle a case involving the OR
optimization discovered overnight by OSSFuzz.
FossilOrigin-Name:
7b59930a1d7b664b54d5a2bc9fa385925b5f4c8f34bf401c798307e3e2dae2c6
mistachkin [Fri, 21 Sep 2018 23:41:18 +0000 (23:41 +0000)]
Fix harmless compiler warning when compiled with SQLITE_OMIT_AUTHORIZATION.
FossilOrigin-Name:
50f2fa19532e0f849d61d9e2a97427cfbf64cfb787ca481ef8c860d0f24f6cfe
drh [Fri, 21 Sep 2018 19:06:09 +0000 (19:06 +0000)]
drh [Fri, 21 Sep 2018 18:43:51 +0000 (18:43 +0000)]
Put a limit counter on the query planner that restricts the number of
index+constraint options that can be considered for each table in a join.
This prevents certain pathological queries from taking up too much time
in the query planner.
FossilOrigin-Name:
8690b5a0cc08eeb175230de45d4ca9b9f7b9b22aeebea70b8b7151f10b130969
drh [Fri, 21 Sep 2018 13:07:14 +0000 (13:07 +0000)]
Optimization to the OP_MakeRecord opcode makes speed-check.sh run about
1.1 million cycles faster, and results in a slightly smaller library.
FossilOrigin-Name:
d10e63629183f6daf0c263cd4dae052a3786c8c1480b3b6a73124b3315e41951
drh [Thu, 20 Sep 2018 20:43:28 +0000 (20:43 +0000)]
drh [Thu, 20 Sep 2018 20:15:02 +0000 (20:15 +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:
7edd26ed27ed1e7eab603058f7d55f2eac45e7bd1908bfa5f32293611883b157
drh [Thu, 20 Sep 2018 19:02:15 +0000 (19:02 +0000)]
Combine the Expr.pTab and Expr.pWin fields into a union named "y". Add a new
EP_WinFunc property that is only true if Expr.y.pWin is a valid pointer.
This reduces the size of the Expr object by 8 bytes, reduces the overall
amount of code, and shaves over 1 million cycles off of the speed test.
FossilOrigin-Name:
ad130bb86e74e6ce165fdbdce3a19699510f0e62071c1c7923b5a4538d888c7c
dan [Thu, 20 Sep 2018 17:21:21 +0000 (17:21 +0000)]
By default, make all "ALTER TABLE RENAME" statements executed within a virtual
table xRename() method exhibit the legacy behaviour.
FossilOrigin-Name:
71947337e98b90debb13b390119bc2a6b39dd41535151b836071ee327a31e45d
dan [Thu, 20 Sep 2018 08:28:01 +0000 (08:28 +0000)]
Add a PRAGMA that restores the legacy ALTER TABLE RENAME TO behaviour.
FossilOrigin-Name:
5acad2e92c11c209bedc6ac8a709595e8070eed028ffc82af61499e5ceaa5e2b
drh [Wed, 19 Sep 2018 18:17:46 +0000 (18:17 +0000)]
A minor code simplification, saved in a branch for future reference.
FossilOrigin-Name:
5e458f4a92743effb9a3d3249767424fed8b444a05ca136c4a55d60c4d70c2cc
dan [Wed, 19 Sep 2018 17:09:09 +0000 (17:09 +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:
221f3f572ed49d7af69a2e7c88741fa5206ea33ca59ee791eac7698bdd11ca4d
drh [Wed, 19 Sep 2018 15:08:21 +0000 (15:08 +0000)]
Fix the "sqlite3" command in the TCL interface so that it correctly returns
an error if invoked with no arguments.
FossilOrigin-Name:
2034fa8089676132b5e2f71bdebf1af9ca141da2e173920c6e84fb974ab0f022
dan [Tue, 18 Sep 2018 19:40:18 +0000 (19:40 +0000)]
Fix a problem building on Android with SQLITE_ENABLE_BATCH_ATOMIC_WRITE set.
FossilOrigin-Name:
e41e50fe7430cb79f67369fe81ac9938665bfc5db59c4faaf429ceb8ca03f584
dan [Tue, 18 Sep 2018 17:50:34 +0000 (17:50 +0000)]
Avoid incrementing the SQLITE_LOOKASIDE_MISS_SIZE stat before sqlite3_open()
returns. Fix test script problem in lookaside.test.
FossilOrigin-Name:
e461cb281959d8517296e3e4e934eba8206770b1a592cd7655b6567268da1634
dan [Tue, 18 Sep 2018 17:00:06 +0000 (17:00 +0000)]
Enhance tester.tcl so that when "--malloctrace=1" is specified, the test
generates self-contained Tcl scripts that present GUIs instead of *.sql files
that require a separate program to interpret.
FossilOrigin-Name:
de2e3cbd08c00d235106c040fa472ec267ef8f1ec13c34ed7d16deac8d50b6cc
dan [Tue, 18 Sep 2018 16:06:42 +0000 (16:06 +0000)]
Minor improvements to the permutations.test script. Most notably, a command
like "permutations.test alter%" now runs all test scripts with names that
match the LIKE pattern "alter%". Or, say, "permutations wal alter%" to run all
alter% tests in wal mode.
FossilOrigin-Name:
3e1a2f6614eacb65e1dffe64c6292c809fc5808be2d9d7d103cfc57d7b32fcd9
drh [Mon, 17 Sep 2018 20:47:38 +0000 (20:47 +0000)]
Further optimizations to the UPDATE logic to avoid making changes to partial
indexes if none of the columns mentioned in the WHERE clause are modified by
the UPDATE.
FossilOrigin-Name:
d1365a5bf0ee2f145427b81d2a593f539c3ad4705d579478703c1f65ae5f80bf
drh [Mon, 17 Sep 2018 15:19:13 +0000 (15:19 +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:
c6c9585f294710829ca24b64d70a36fd9f409261dd0661367c6c4198cdbc4c81
drh [Mon, 17 Sep 2018 14:13:48 +0000 (14:13 +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:
84105ea4af98bd8bddbdf9dc6674bdf73c110c0685afe868ce9681da110144d7
drh [Mon, 17 Sep 2018 13:55:18 +0000 (13:55 +0000)]
Restore an assert() that was present on trunk.
FossilOrigin-Name:
a7b572ca7867a95f49888dc95c0dc6d726afa9fea26283be147ba422639d1307
dan [Mon, 17 Sep 2018 13:38:45 +0000 (13:38 +0000)]
Minor modification to the fix on this branch to avoid adding extra conditional
compilation macros.
FossilOrigin-Name:
4d8be404dab265b51e5a6a95e83be85c22512e19a437191690c7d845c87ff259
mistachkin [Mon, 17 Sep 2018 12:49:21 +0000 (12:49 +0000)]
Fix missing space in 'configure.ac' reported on the mailing list.
FossilOrigin-Name:
96b00a3cd2273dd3baa8e5b7a441458b142d4d2daabc679e4fcb5ab706674e76
dan [Mon, 17 Sep 2018 08:27:23 +0000 (08:27 +0000)]
Add extra test for the fix on this branch. Also fix a
pointer-compare-after-free problem that occurs in similar cases.
FossilOrigin-Name:
1856ea63b3186c2c8fa716ffe01c731397bdbbc3fbb56dc72ad0686cb7f152ca
drh [Mon, 17 Sep 2018 00:15:21 +0000 (00:15 +0000)]
Add assert()s to the new code in the previous check-in.
FossilOrigin-Name:
b12f23a5c484cab3654721299ea0f05230eef6b14012b557f3bf2592fac0f00e
drh [Sun, 16 Sep 2018 23:27:37 +0000 (23:27 +0000)]
First proposed fix for the ALTER TABLE problem described by ticket
[
b41031ea2b5372378cb3d2d ]
FossilOrigin-Name:
05a9d129254e01a5f6b5e4033c105190eae386575a94b020ef3e0cbd30bbf056
drh [Sun, 16 Sep 2018 18:23:48 +0000 (18:23 +0000)]
Remove an unreachable branch from the index-on-expression optimization.
FossilOrigin-Name:
2df2cf4f179dd88fb2530dfd338f344ac48dd052ef954dc95a136884523f7aee