]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
5 years agoMinor adjustments for clarity and test coverage.
drh [Wed, 23 Oct 2019 15:47:33 +0000 (15:47 +0000)] 
Minor adjustments for clarity and test coverage.

FossilOrigin-Name: 30065716878d4058e75eb510b0b27b68e5193d04625eb173210de8061f20f499

5 years agoFix incorrect arguments to testcase() macros.
drh [Wed, 23 Oct 2019 03:53:10 +0000 (03:53 +0000)] 
Fix incorrect arguments to testcase() macros.

FossilOrigin-Name: 812467fbf04ce00228a8381a5eee471e4e35cc63184a4538129fcd70b7cec979

5 years agoFix the foreign key logic to be compatible with generated columns.
drh [Wed, 23 Oct 2019 00:31:01 +0000 (00:31 +0000)] 
Fix the foreign key logic to be compatible with generated columns.

FossilOrigin-Name: 3de57145a18c62ff9b556c7218d8b276000d0052e4890212fa9335235f22d03c

5 years agoTake the declared column time into account when computing the values for
drh [Tue, 22 Oct 2019 21:01:34 +0000 (21:01 +0000)] 
Take the declared column time into account when computing the values for
generated columns, and apply appropriate affinity.

FossilOrigin-Name: 9e04ba22dfce3998e61331ac229ff543ecccc590284c9dd5def21efbe594fba0

5 years agoMerge the row-value fix from trunk.
drh [Tue, 22 Oct 2019 20:16:04 +0000 (20:16 +0000)] 
Merge the row-value fix from trunk.

FossilOrigin-Name: 1fbd7438611174aa594485241c8cc2f4ea6d09c57ef2fc16c8995e8061fdfdd6

5 years agoDisqualify row-value comparisons for use by an index if the right-hand side
drh [Tue, 22 Oct 2019 19:51:29 +0000 (19:51 +0000)] 
Disqualify row-value comparisons for use by an index if the right-hand side
has an affinity that does not match the index.
Fix for ticket [6ef984af8972c2eb]

FossilOrigin-Name: 5c118617cf08e17a6edfdfba86e3fc49132a780990b68b52724c2aaeac85f506

5 years agoDo not allow generated columns in the PRIMARY KEY.
drh [Tue, 22 Oct 2019 15:45:03 +0000 (15:45 +0000)] 
Do not allow generated columns in the PRIMARY KEY.

FossilOrigin-Name: 1a54743a3d327efc8ecc45b9fde91ddfea3fca36408f9b753453c31f2e4cc69c

5 years agoIn UPDATE processing, include generated columns in the set of columns being
drh [Tue, 22 Oct 2019 13:59:23 +0000 (13:59 +0000)] 
In UPDATE processing, include generated columns in the set of columns being
updated if and only if their generator expressions reference some other
column that is being updated.

FossilOrigin-Name: d38176e93a628e03f1bd8b689fbc4152a1495388da917c2d89cefed04353d2d6

5 years agoNew testcase() macros. Fix a problem with INSERT when the IPK is to the
drh [Tue, 22 Oct 2019 13:01:24 +0000 (13:01 +0000)] 
New testcase() macros.  Fix a problem with INSERT when the IPK is to the
right of generated columns.

FossilOrigin-Name: 412799fc5527aaca987e4e04b8a4f774dcdb70fb80e3a126dc3a26d48a66935c

5 years agoMerge changes on trunk into the generated-columns branch.
drh [Tue, 22 Oct 2019 12:02:09 +0000 (12:02 +0000)] 
Merge changes on trunk into the generated-columns branch.

FossilOrigin-Name: ba123b8c201053d8f9387de38f3513b06f7721b28d79fab8489f96d336105117

5 years agoPrevious check-in to fix [b47e3627ecaadbde] was incomplete. This check-in
drh [Tue, 22 Oct 2019 11:29:22 +0000 (11:29 +0000)] 
Previous check-in to fix [b47e3627ecaadbde] was incomplete.  This check-in
completes the fix and adds a test cases.

FossilOrigin-Name: c7da1c01f1f239e68c2173ac5748b8c5798271e43bdcee68f51f97cd0ca92bd5

5 years agoMove the sqlite3LocateCollSeq(), sqlite3FindCollSeq(), and
drh [Tue, 22 Oct 2019 01:00:16 +0000 (01:00 +0000)] 
Move the sqlite3LocateCollSeq(), sqlite3FindCollSeq(), and
sqlite3GetCollSeq() routines so that they are all beside one another in
the callback.c source file.  No logic changes.

FossilOrigin-Name: 9ff80a9bf8fee776e2f282d0597215b77d48093ebc71d047ad1457da0582ddbc

5 years agoWhen flipping ("commuting") a comparison operator, set the new EP_Commuted
drh [Tue, 22 Oct 2019 00:03:41 +0000 (00:03 +0000)] 
When flipping ("commuting") a comparison operator, set the new EP_Commuted
bit rather than adding extra EP_Collate bits, to single later processing that
the order of precedence for COLLATE operators is inverted.
Fix for ticket [b47e3627ecaadbde]

FossilOrigin-Name: 90f7c477354d67d22d5eb0da22dac579f384ab44743fdc19887220e32203ebc2

5 years agoAdd a VdbeCoverage() macro that was omitted from check-in [eea1e7aa57e74c43].
drh [Mon, 21 Oct 2019 23:41:56 +0000 (23:41 +0000)] 
Add a VdbeCoverage() macro that was omitted from check-in [eea1e7aa57e74c43].

FossilOrigin-Name: cd2317d04c1c4bcf5fe63aa02a6051bdfae8f5566a098e3f45bf9ec1dd0c3ea6

5 years agoTry to fix a harmless compiler warning reported by ICC.
drh [Mon, 21 Oct 2019 16:15:57 +0000 (16:15 +0000)] 
Try to fix a harmless compiler warning reported by ICC.

FossilOrigin-Name: 7f41b44ca2ecb907ea0fd09a974ac9dbdf911463a94f0f77c826cf1b1d9c3e8c

5 years agoChanges to the INSERT logic to make it simpler and faster and so that
drh [Mon, 21 Oct 2019 01:04:11 +0000 (01:04 +0000)] 
Changes to the INSERT logic to make it simpler and faster and so that
it works with generated columns and BEFORE triggers.

FossilOrigin-Name: bc368cb090376d33d3844e3689c4f6bd19eed758e39b878ee67fef93b1c839ea

5 years agoFix a resource leak in fts5 that could occur if an auxiliary function is called from...
dan [Sun, 20 Oct 2019 08:26:08 +0000 (08:26 +0000)] 
Fix a resource leak in fts5 that could occur if an auxiliary function is called from within a query that does not use the full-text index.

FossilOrigin-Name: b528bdcd45db1b783ecd9739c3d3c890f04de7003f079668970eafaf8e23b2f3

5 years agoWork toward getting generated columns to work with triggers. Still more
drh [Sat, 19 Oct 2019 18:47:27 +0000 (18:47 +0000)] 
Work toward getting generated columns to work with triggers.  Still more
work to do in this area.

FossilOrigin-Name: 932a37275d7e932f8237d32c8fc6087ed8cd342fe01ef2f7a43c7237ab84c9ac

5 years agoAdd testcase macros.
drh [Sat, 19 Oct 2019 15:01:52 +0000 (15:01 +0000)] 
Add testcase macros.

FossilOrigin-Name: fb9c9bb284d441bd7aa34c87b6fd8ce57d036c17623d82354154fc6286bdd134

5 years agoRefactor names of column index transformation functions, for clarity.
drh [Sat, 19 Oct 2019 13:29:10 +0000 (13:29 +0000)] 
Refactor names of column index transformation functions, for clarity.
Get generated columns working with ALTER TABLE RENAME COLUMN.

FossilOrigin-Name: 27ab41c9102e7801ff829488fc123a8040da008bef373d6704efbe2f93e1da90

5 years agoFixes for WITHOUT ROWID tables with VIRTUAL columns and an INTEGER PRIMARY KEY.
drh [Fri, 18 Oct 2019 18:33:25 +0000 (18:33 +0000)] 
Fixes for WITHOUT ROWID tables with VIRTUAL columns and an INTEGER PRIMARY KEY.

FossilOrigin-Name: 86074da0fd2949e231898ef0bc672d90fd89cefa49fb0eb50ff398fbdd91d1ad

5 years agoMerge trunk enhancements into the generated-columns branch.
drh [Fri, 18 Oct 2019 17:47:47 +0000 (17:47 +0000)] 
Merge trunk enhancements into the generated-columns branch.

FossilOrigin-Name: 85bc4524d76999080faa4474e8880d2b6a2ac3a7f6a76239af4de1a42f8138c8

5 years agoGet generated columns working for WITHOUT ROWID tables.
drh [Fri, 18 Oct 2019 17:42:47 +0000 (17:42 +0000)] 
Get generated columns working for WITHOUT ROWID tables.

FossilOrigin-Name: 9f409649ec4282a47f0a8b079b419f1922e0c24779b297f477ced168d5b7910d

5 years agoEnhance the ".imposter" command in the CLI so that the first argument
drh [Fri, 18 Oct 2019 15:58:50 +0000 (15:58 +0000)] 
Enhance the ".imposter" command in the CLI so that the first argument
can be an existing WITHOUT ROWID table instead of an index.  The resulting
imposter is the same table, but with columns in storage order and with
all constraints removed.

FossilOrigin-Name: 9dc0d34586eebf6705d9bd81494c417ac76707b8625d1ff99eda18b4ca2d8a50

5 years agoClaw back some performance from the sqlite3ExprGetColumnOfTable() routine.
drh [Fri, 18 Oct 2019 12:52:08 +0000 (12:52 +0000)] 
Claw back some performance from the sqlite3ExprGetColumnOfTable() routine.

FossilOrigin-Name: e8426acb94179ff49549aced6ea3c26c49ba4761c2f414fa1772d6a031edc79d

5 years agoFix sqlite3ColumnOfIndex() to account for virtual columns.
drh [Fri, 18 Oct 2019 12:14:48 +0000 (12:14 +0000)] 
Fix sqlite3ColumnOfIndex() to account for virtual columns.

FossilOrigin-Name: 447271123e3b467d9271a4c0cf27f47af2f865c9298b8c355d9e766411a1f422

5 years agoGet indexes working on virtual columns.
drh [Fri, 18 Oct 2019 10:05:06 +0000 (10:05 +0000)] 
Get indexes working on virtual columns.

FossilOrigin-Name: 450c48766c8e62653d074c95f69b0576de3880d183a1d1e5992d88b6fce6cc39

5 years agoSTORED columns can now reference other STORED columns, in any order, as long
drh [Fri, 18 Oct 2019 02:19:18 +0000 (02:19 +0000)] 
STORED columns can now reference other STORED columns, in any order, as long
as there are not loops.

FossilOrigin-Name: 0d236698e64b2a4b46f91a25279c406e0bf392fe66116678456f0a034c11d7b4

5 years agoIn the Table object, change the nVCol field to nNVCol - the number of
drh [Thu, 17 Oct 2019 18:35:57 +0000 (18:35 +0000)] 
In the Table object, change the nVCol field to nNVCol - the number of
non-virtual columns, as that is the quantity that we need most.

FossilOrigin-Name: 4ad66af04a654d92711d2d056ce8f35cd21eac4b99fb8d78be1a314620b6d29e

5 years agoBug fix with INSERT using an explicit column list on a table with
drh [Thu, 17 Oct 2019 18:07:22 +0000 (18:07 +0000)] 
Bug fix with INSERT using an explicit column list on a table with
a non-final STORED column.

FossilOrigin-Name: 61b4459ae6a6cc182c11abbc8b1dd629f77beb088d7ccad5e563d8d4769056df

5 years agoSome (but not all) INSERT and UPDATE statements now work for STORED columns.
drh [Thu, 17 Oct 2019 17:54:05 +0000 (17:54 +0000)] 
Some (but not all) INSERT and UPDATE statements now work for STORED columns.

FossilOrigin-Name: fe7517bf4d360597576ab9aba29627d7926d23f2bbbfb3e7bf4d32761617574c

5 years agoFix the xfer optimization for generated columns, so that VACUUM works again.
drh [Thu, 17 Oct 2019 16:16:34 +0000 (16:16 +0000)] 
Fix the xfer optimization for generated columns, so that VACUUM works again.

FossilOrigin-Name: 8f67b89b04622c1509dc102a83be7a80057dc791625804fc2c294089c98b97e4

5 years agoBasic UPDATE functionality working for VIRTUAL tables.
drh [Thu, 17 Oct 2019 15:59:03 +0000 (15:59 +0000)] 
Basic UPDATE functionality working for VIRTUAL tables.

FossilOrigin-Name: c21959d4eb5d742a097a98e1874c0bf132dc962a97a65be1ab22d6ca3cf2b261

5 years agoAvoid an infinite loop in fts3/4 incremental-merge in the case where the lowest level...
dan [Thu, 17 Oct 2019 15:41:36 +0000 (15:41 +0000)] 
Avoid an infinite loop in fts3/4 incremental-merge in the case where the lowest level in the database contains segments but no data (because there is a delete-marker for each valid entry). Fix for [bf1aab89].

FossilOrigin-Name: 35beaee059a6cccead4311886ca928d936f23584cf435e35e265e98feea723dc

5 years agoBug fixes so that "make test" once against runs with no errors.
drh [Thu, 17 Oct 2019 14:21:07 +0000 (14:21 +0000)] 
Bug fixes so that "make test" once against runs with no errors.

FossilOrigin-Name: 7bfe0f679d8951b3e925bdf549efa0f8d6b514eddeaca69cbfddbd9476cfff5f

5 years agoFix the table_info and table_xinfo pragmas so that they work with virtual
drh [Thu, 17 Oct 2019 13:15:40 +0000 (13:15 +0000)] 
Fix the table_info and table_xinfo pragmas so that they work with virtual
columns.  Table_info omits virtual columns.  Table_xinfo gives them a
"hidden" flag of 2, and 3 for STORED columns.

FossilOrigin-Name: 069351b85f9a706f60d3e98fbc8aaf40c374356b967c0464aede30ead3d9d18b

5 years agoINSERT with named columns for a table with generated columns.
drh [Wed, 16 Oct 2019 22:01:56 +0000 (22:01 +0000)] 
INSERT with named columns for a table with generated columns.

FossilOrigin-Name: 64db39f92d68d1b9f23e48af35e16b969c38b58041fbe900066eeb3ddb291cef

5 years agoALTER TABLE is able to add a VIRTUAL column.
drh [Wed, 16 Oct 2019 20:05:56 +0000 (20:05 +0000)] 
ALTER TABLE is able to add a VIRTUAL column.

FossilOrigin-Name: 120c6b78cb51532f783014605f1107d40b2e4f54e3852fb1f8f167d0c0b78c69

5 years agoSimple INSERT and SELECT operations working with VIRTUAL columns.
drh [Wed, 16 Oct 2019 19:31:46 +0000 (19:31 +0000)] 
Simple INSERT and SELECT operations working with VIRTUAL columns.

FossilOrigin-Name: 7f9f90b1b885fa9905b296f2e0fcc9b2341019b42fc839722a93cf60e49a9252

5 years agoEnhancements to SQL query normalization for UPDATE statements.
mistachkin [Wed, 16 Oct 2019 17:46:22 +0000 (17:46 +0000)] 
Enhancements to SQL query normalization for UPDATE statements.

FossilOrigin-Name: bba975c7af3de9aeb5c62fb8b05d61b96e4ecd0b030008442bbdd345e1e5f134

5 years agoIf an AFTER DELETE trigger fires when a conflict row is deleted by REPLACE
drh [Wed, 16 Oct 2019 14:56:03 +0000 (14:56 +0000)] 
If an AFTER DELETE trigger fires when a conflict row is deleted by REPLACE
conflict resolution, make sure the conflict really has been resolved and that
the trigger did not recreate the row before continuing.
Ticket [a8a4847a2d96f5de]

FossilOrigin-Name: eea1e7aa57e74c4329003f4550168e2aed9e33d2301a3ba84b10781a9cebbc1b

5 years agoInitial experimental code for generated column support. Non-functional.
drh [Wed, 16 Oct 2019 12:18:59 +0000 (12:18 +0000)] 
Initial experimental code for generated column support.  Non-functional.

FossilOrigin-Name: 11d472c1df707b8d03ec57d8fc582a34f5eb89a9d02a154a9871650c65065b45

5 years agoFormatting change on a multi-line conditional, for improved clarity.
drh [Tue, 15 Oct 2019 19:01:55 +0000 (19:01 +0000)] 
Formatting change on a multi-line conditional, for improved clarity.
No logic changes.

FossilOrigin-Name: 7248e3476511ecd317f54edcfe1e87443bfdcc1b10c89c7734eefcabafec6c0b

5 years agoFuther improvements to the IN operator for row-values on virtual tables.
drh [Mon, 14 Oct 2019 20:32:31 +0000 (20:32 +0000)] 
Futher improvements to the IN operator for row-values on virtual tables.

FossilOrigin-Name: bc751fb64d5b08e5ca4c85cd1c6fbf09590fa9dad7e176ba373082ea373655b5

5 years agoNew test cases in test/fuzzdata8.db.
drh [Mon, 14 Oct 2019 15:24:20 +0000 (15:24 +0000)] 
New test cases in test/fuzzdata8.db.

FossilOrigin-Name: 344d9cb0c726078af6deb4a26bed3aded5b26914bb286d3446d3a4e9150840b7

5 years agoFix a problem with row-value IN(...) operators and virtual tables.
dan [Mon, 14 Oct 2019 15:15:50 +0000 (15:15 +0000)] 
Fix a problem with row-value IN(...) operators and virtual tables.

FossilOrigin-Name: aa57d7abac0bb92d4d5fd4e093a11cf8efc04e4eed748b2a400d01f137250649

5 years agoWhen Select-Trace is enabled (in debugging builds only) do not show the
drh [Sat, 12 Oct 2019 23:38:00 +0000 (23:38 +0000)] 
When Select-Trace is enabled (in debugging builds only) do not show the
result of Window function tree rewrites if there are no window functions.

FossilOrigin-Name: d1acf72ae1ea7484bb9c3a8630094f1a3a9597578c7b9d6e02fc0a4e3f59c57d

5 years agoUpdate the zipfile extension to use deflateBound(), instead of compressBound(), to...
dan [Fri, 11 Oct 2019 18:55:10 +0000 (18:55 +0000)] 
Update the zipfile extension to use deflateBound(), instead of compressBound(), to learn the maximum possible size of a deflate()d buffer.

FossilOrigin-Name: f5ee30426e8876e70304f852153b56991a2a66e0f6a82597e9dcccf49163272d

5 years agoFuther improvements to LEFT JOIN strength reduction.
drh [Fri, 11 Oct 2019 17:14:40 +0000 (17:14 +0000)] 
Futher improvements to LEFT JOIN strength reduction.

FossilOrigin-Name: 8a39167bd2d46496f7484cfec371e4bad22da882209b01da9459c4ed5877da25

5 years agoImprovements to the LEFT JOIN strength reduction optimization.
drh [Fri, 11 Oct 2019 16:01:21 +0000 (16:01 +0000)] 
Improvements to the LEFT JOIN strength reduction optimization.

FossilOrigin-Name: 548082dfab5d9484279ccc11cd2833ac131b54b7481372b576d7c28bbb3294ea

5 years agoEnsure fts3/4 prefix indexes are flushed to disk before an 'optimize' command. Fix...
dan [Fri, 11 Oct 2019 15:33:13 +0000 (15:33 +0000)] 
Ensure fts3/4 prefix indexes are flushed to disk before an 'optimize' command. Fix for [745f1abc].

FossilOrigin-Name: 4ed905b18847d4dbf5a2570052abced338065f824137b90300f62d77b3159d80

5 years agoFix the fts3/4 integrity-check command so that it works with "ORDER=DESC" tables...
dan [Fri, 11 Oct 2019 14:27:17 +0000 (14:27 +0000)] 
Fix the fts3/4 integrity-check command so that it works with "ORDER=DESC" tables. Fix for [8a6fa2bb].

FossilOrigin-Name: 5863546df99abd1ad4ebcaba18dec647be4368e2c13ce0b28e48c8608d3e87ef

5 years agoIncrease the version number to 3.31.0 for the next release cycle.
drh [Fri, 11 Oct 2019 14:25:00 +0000 (14:25 +0000)] 
Increase the version number to 3.31.0 for the next release cycle.

FossilOrigin-Name: ffd4c30620abe6ba38d82f3db934d18cc8468aaac4cd50a4e01be8910854d3f0

5 years agoFaster response to sqlite3_interrupt() in the OP_IntegrityCk and OP_Count
drh [Fri, 11 Oct 2019 14:21:48 +0000 (14:21 +0000)] 
Faster response to sqlite3_interrupt() in the OP_IntegrityCk and OP_Count
opcodes.

FossilOrigin-Name: bf875dc59909f9c22f7c1fc843bc4d9e5d97af5cb4ef43c4fa1d566ddfdeaacb

5 years agoUpdate the autoconf makefile for MSVC.
mistachkin [Thu, 10 Oct 2019 23:58:28 +0000 (23:58 +0000)] 
Update the autoconf makefile for MSVC.

FossilOrigin-Name: 9455643eecb74c8ac93ad3b3566f30e380dd912cdce3de993da5af42973ac59c

5 years agoFix harmless compiler warning seen with MSVC.
mistachkin [Thu, 10 Oct 2019 23:58:16 +0000 (23:58 +0000)] 
Fix harmless compiler warning seen with MSVC.

FossilOrigin-Name: 73a82114733af2a316f20eb8578badef307d14286c6ec03197744a6793425161

5 years agoPrevent SQLite from assuming that if ((? IS NOT NULL) IS NOT NULL) is true, ? may...
dan [Thu, 10 Oct 2019 17:09:44 +0000 (17:09 +0000)] 
Prevent SQLite from assuming that if ((? IS NOT NULL) IS NOT NULL) is true, ? may not be NULL. Fix for [d51a8696].

FossilOrigin-Name: 7833feecfe745e237f239ee4c38a9e4bf7ad66a32919150208da87c00a826473

5 years agoFix a problem in the fts3 integrity-check routine causing it to report as corrupt...
dan [Thu, 10 Oct 2019 16:41:44 +0000 (16:41 +0000)] 
Fix a problem in the fts3 integrity-check routine causing it to report as corrupt tables that contain values with embedded 0x00 bytes.

FossilOrigin-Name: 629e20c9880acc2cb9e2fa6da39a15a90483e9a8f433df29d285c23bdfb03b0b

5 years agoBe sure to rewrite column references inside FILTER clauses and window frame definitio...
dan [Thu, 10 Oct 2019 15:17:09 +0000 (15:17 +0000)] 
Be sure to rewrite column references inside FILTER clauses and window frame definitions when flattening queries. Fix for [1079ad19].

FossilOrigin-Name: ccba7202b69d239724c3b589439c9c3b0e1bba237accfeb11c39d492522b8719

5 years agoAvoid assuming that an expression that contains the sub-expression (? IS FALSE) or...
dan [Wed, 9 Oct 2019 21:14:00 +0000 (21:14 +0000)] 
Avoid assuming that an expression that contains the sub-expression (? IS FALSE) or (? IS TRUE) may only be true if ? is non-null. Fix for [a976c487].

FossilOrigin-Name: eb7ed90b8a65748f0721aaf7bdddd2207f552be5015603fbfb7044d815ae2f36

5 years agoDo not allow users to effectively disable fts5 crisismerge operations by setting...
dan [Wed, 9 Oct 2019 18:36:32 +0000 (18:36 +0000)] 
Do not allow users to effectively disable fts5 crisismerge operations by setting the crisismerge threshold to higher than the maximum allowable segment b-trees on a single level. Fix for [d392017c].

FossilOrigin-Name: 86e497209217abb7bcb491a023cd353f3c7c9c103ebd9f58dd8661b12cf3694c

5 years agoAn improved fix for the dbsqlfuzz-discovered ALWAYS() failure following OOM in
drh [Wed, 9 Oct 2019 15:37:58 +0000 (15:37 +0000)] 
An improved fix for the dbsqlfuzz-discovered ALWAYS() failure following OOM in
sqlite3ExprCollSeq().  This time with a test case (engineered by Dan).

FossilOrigin-Name: 907f7965b335d8d5441f2e386bb190d1f93ffcd45ca98d2d1c621dede491fc5e

5 years agoDisallow fts5 page sizes greater than 65536 bytes - as there are 16-bit offsets used...
dan [Wed, 9 Oct 2019 15:26:45 +0000 (15:26 +0000)] 
Disallow fts5 page sizes greater than 65536 bytes - as there are 16-bit offsets used in the page header.

FossilOrigin-Name: 75775c5ab44e497cb19be10397229637f1374f05c3244e8f92d6c54fcea94f5f

5 years agoRemove the "fastfuzztest" makefile target. Use only "fuzztest".
drh [Wed, 9 Oct 2019 15:08:27 +0000 (15:08 +0000)] 
Remove the "fastfuzztest" makefile target.  Use only "fuzztest".

FossilOrigin-Name: e17571c789db31123642d0ed1f3d8764e070019e0deb8b88cce58d2183551cdf

5 years agoNew test cases added to test/fuzzdata8.db.
drh [Wed, 9 Oct 2019 15:03:45 +0000 (15:03 +0000)] 
New test cases added to test/fuzzdata8.db.

FossilOrigin-Name: b68d21e93a0839b42f49845918df7738ee7fa2a05c7f4ae2f89fdbb5e47ad8eb

5 years agoChange sqlite3SelectDup() to always return NULL if an OOM has occurred.
drh [Wed, 9 Oct 2019 15:00:37 +0000 (15:00 +0000)] 
Change sqlite3SelectDup() to always return NULL if an OOM has occurred.

FossilOrigin-Name: 01ba4641ab436c6065c8725908fc0913f2abded4ea62e004b7534e0116b9451a

5 years agoUse the "fuzztest" target in place of "fastfuzztest". makefile-cleanup
drh [Wed, 9 Oct 2019 13:52:31 +0000 (13:52 +0000)] 
Use the "fuzztest" target in place of "fastfuzztest".

FossilOrigin-Name: 7129e468fd182c1820cdfa2c66a81d1697e5d1580680b77c0df9bb0ae0049e0d

5 years agoRemove the obsolete "fastfuzztest" target from the makefiles.
drh [Wed, 9 Oct 2019 13:12:55 +0000 (13:12 +0000)] 
Remove the obsolete "fastfuzztest" target from the makefiles.

FossilOrigin-Name: 3d44f1ee0f606409bc9c091dae2c9d2e78ada318a0de08437f4f4835a1a5d203

5 years agoSave CPU cycles in sqlite3Prepare() by, among other things, shifting the
drh [Wed, 9 Oct 2019 01:19:07 +0000 (01:19 +0000)] 
Save CPU cycles in sqlite3Prepare() by, among other things, shifting the
EXPLAIN column label logic over to sqlite3VdbeMakeReady().

FossilOrigin-Name: 1ca5ef84506aac3e2f08baa36095b3befdeedf2a3443fcd9154a277b55cbf64b

5 years agoFix problems with using the fts5 'rebuild' command inside a transaction that contains...
dan [Tue, 8 Oct 2019 13:34:24 +0000 (13:34 +0000)] 
Fix problems with using the fts5 'rebuild' command inside a transaction that contains other updates of the same table. Fix for [e258f008].

FossilOrigin-Name: 238e0835714696aba0631f288fcc30ec5fddb43893d469c6bf017f386b3cddee

5 years agoDisallow page-sizes smaller than 32 bytes in fts5. Also ensure the fts5 integrity...
dan [Mon, 7 Oct 2019 20:36:18 +0000 (20:36 +0000)] 
Disallow page-sizes smaller than 32 bytes in fts5. Also ensure the fts5 integrity-check works even when "PRAGMA reverse_unordered_selects" is true. Fix for [265e935b26].

FossilOrigin-Name: 8ab0aebdb3c2d6fb3160b2c58ce6cc0495a6ddd960878a6395958c837f3d1b71

5 years agoOmit a pointless memory allocation in vdbeSorterSort().
drh [Mon, 7 Oct 2019 20:33:26 +0000 (20:33 +0000)] 
Omit a pointless memory allocation in vdbeSorterSort().

FossilOrigin-Name: 5d76dbc5b0584c15d7d59e5c079868f2077f32b865f406b40ec837b8ab6ef2e1

5 years agoFix a problem with running ALTER TABLE ADD COLUMN statements within a transaction...
dan [Mon, 7 Oct 2019 18:43:21 +0000 (18:43 +0000)] 
Fix a problem with running ALTER TABLE ADD COLUMN statements within a transaction that writes to one or more virtual tables.

FossilOrigin-Name: 31e85fbbc4cfd09a98b4a6dc6624f863816f376c6a4eef1fafc657c8e1abbc36

5 years agoAdd a test case for the assert() fix in the previous commit.
dan [Mon, 7 Oct 2019 13:46:43 +0000 (13:46 +0000)] 
Add a test case for the assert() fix in the previous commit.

FossilOrigin-Name: 32fba11ab72f6300391267eaad64e92fa767c289029e668e4bd6c9165acf1487

5 years agoFix a faulty assert() statement in the sqlite3VdbeMemExpandBlob() routine.
drh [Mon, 7 Oct 2019 13:26:58 +0000 (13:26 +0000)] 
Fix a faulty assert() statement in the sqlite3VdbeMemExpandBlob() routine.

FossilOrigin-Name: 69a26eade2f92029e722a5a654214b1e2a3fc7ed497ce9aa5a7dce944f90e502

5 years agoFix the OP_SeekRowid opcode so that it works correctly with a Real argument
drh [Mon, 7 Oct 2019 01:05:57 +0000 (01:05 +0000)] 
Fix the OP_SeekRowid opcode so that it works correctly with a Real argument
without damaging the value in the register that is the argument.
Ticket [b2d4edaffdc156cc].  Test cases in TH3.

FossilOrigin-Name: 3cde82c86b963fa75192907d548febd3882c7d8fc7daf1903fadd5ca46623be1

5 years agoOmit the check for conflicting shared-cache locks in sqlite3Prepare() if the
drh [Sat, 5 Oct 2019 19:53:21 +0000 (19:53 +0000)] 
Omit the check for conflicting shared-cache locks in sqlite3Prepare() if the
database connection uses no shared cache.  We might be able to go back and
remove this code completely, due to the newer Schema.iGeneration logic, but
that will take more analysis.  This check-in gives the speed benefit but not
the reduction in code size.

FossilOrigin-Name: 0b73a09270dfafb27f8d1762b547ef8178c9da66f45e7153ff0b76272dfa92f5

5 years agoOptimization to sqlite3VtabUnlockList() for the common case when there
drh [Sat, 5 Oct 2019 19:24:52 +0000 (19:24 +0000)] 
Optimization to sqlite3VtabUnlockList() for the common case when there
is no work to do.

FossilOrigin-Name: fc8d45086dc2bcb9bce756088e99e63cbeedf9129139fb0e6a48b43c4f502180

5 years agoCall sqlite3Prepare() directly, rather than going through sqlite3_prepare(),
drh [Sat, 5 Oct 2019 18:33:25 +0000 (18:33 +0000)] 
Call sqlite3Prepare() directly, rather than going through sqlite3_prepare(),
when processing the sqlite_master.sql column for a schema.

FossilOrigin-Name: cc49380ea76a4a05843d3a0bdfb925464dc9d72c33cf5ab5243dd07d161ad038

5 years agoReorder two comparisons for a small performance gain in OP_Transaction.
drh [Sat, 5 Oct 2019 15:28:24 +0000 (15:28 +0000)] 
Reorder two comparisons for a small performance gain in OP_Transaction.

FossilOrigin-Name: d7667f6560318272c8b35b478e29b0ed134105dfd119a2fd53ef0490442c60cc

5 years agoPerformance optimization to the lookaside-memory disabling mechanism.
drh [Sat, 5 Oct 2019 14:39:36 +0000 (14:39 +0000)] 
Performance optimization to the lookaside-memory disabling mechanism.

FossilOrigin-Name: 17ce1c49cb0ed6fdd8c7c33431bc2afa217f1092c99b8dd608890a8e7aec7fb1

5 years agoVersion 3.30.0 version-3.30.0
drh [Fri, 4 Oct 2019 15:03:17 +0000 (15:03 +0000)] 
Version 3.30.0

FossilOrigin-Name: c20a35336432025445f9f7e289d0cc3e4003fb17f45a4ce74c6269c407c6e09f

5 years agoAvoid running a couple of tests in affinity2.test as part of the valgrind permutation...
dan [Thu, 3 Oct 2019 16:02:22 +0000 (16:02 +0000)] 
Avoid running a couple of tests in affinity2.test as part of the valgrind permutations, as the way floating point computations are simulated by valgrind causes them to fail.

FossilOrigin-Name: 7f9a4b6015ac332a04d3e394a6b3210fc95253d8786a261178a5639cb8d9d987

5 years agoIncrease the precision of floating point value display in VDBE debugging
drh [Thu, 3 Oct 2019 14:51:59 +0000 (14:51 +0000)] 
Increase the precision of floating point value display in VDBE debugging
output.  No changes to normally deployed code.

FossilOrigin-Name: a561a656ff50efc0103da3988626cea3ef05757403b83960f2aa6c0a48c2765e

5 years agoFix some test script issues that come up with SQLITE_OMIT_VIRTUALTABLE builds.
dan [Thu, 3 Oct 2019 14:36:36 +0000 (14:36 +0000)] 
Fix some test script issues that come up with SQLITE_OMIT_VIRTUALTABLE builds.

FossilOrigin-Name: 3934d2d08ee14d644dc01f967c10f219b76b172c963c90a7a8141f2b08a7d5bf

5 years agoFix issues with command line invocation of wapptest.tcl.
dan [Thu, 3 Oct 2019 13:44:08 +0000 (13:44 +0000)] 
Fix issues with command line invocation of wapptest.tcl.

FossilOrigin-Name: 9e0d5d2640a92070967bc9fdf5c5b1653e41b9c04e04dcb70f18ead10f053aef

5 years agoUpdate error detection logic in releasetest.tcl to account for new
drh [Wed, 2 Oct 2019 19:44:42 +0000 (19:44 +0000)] 
Update error detection logic in releasetest.tcl to account for new
output formats in USAN.

FossilOrigin-Name: 3f36b988360204628d5ad1df2db34818b9a2d6ba989018d4c17757229f4b0f65

5 years agoUpdate corruptM.test to account for the fact that the database schema may be loaded...
dan [Wed, 2 Oct 2019 19:43:38 +0000 (19:43 +0000)] 
Update corruptM.test to account for the fact that the database schema may be loaded from within the "sqlite3" command for some test permutations.

FossilOrigin-Name: cb9470fc064aad72a4e42c6a021410401b3b1a32446ae8b9cd9c759f0a2a01ef

5 years agoFix a long-standing problem in fts4 incrmental merge.
dan [Wed, 2 Oct 2019 19:33:34 +0000 (19:33 +0000)] 
Fix a long-standing problem in fts4 incrmental merge.

FossilOrigin-Name: 67da31e24ebb49c4cac81c9e7cfca37ca422555fd0fdb01d8f180890783c84ff

5 years agoDisable sqlite3_drop_module() tests when virtual tables are omitted from
drh [Wed, 2 Oct 2019 00:25:08 +0000 (00:25 +0000)] 
Disable sqlite3_drop_module() tests when virtual tables are omitted from
the build.

FossilOrigin-Name: 9f4035f91a9f914797c67afbf19139b2cd25aea48595f7254fe5d18cd693d972

5 years agoRemove references to test scripts analyzeA.test and analyzeB.test from
drh [Tue, 1 Oct 2019 21:31:57 +0000 (21:31 +0000)] 
Remove references to test scripts analyzeA.test and analyzeB.test from
permutations.test, since those test modules no longer exist.

FossilOrigin-Name: 2394879698107479270c9d899c704de3756ceae177a338b3c37844e2a31aa6dd

5 years agoThe nodeReaderInit() function in FTS3 may not assume that the node is
drh [Mon, 30 Sep 2019 19:13:31 +0000 (19:13 +0000)] 
The nodeReaderInit() function in FTS3 may not assume that the node is
non-empty.

FossilOrigin-Name: 361eb2f682a303bba72b39d322d9de630494ca044fe0508dcb23b6130d312d85

5 years agoAdd missing comment to constant definitions.
drh [Sat, 28 Sep 2019 18:28:19 +0000 (18:28 +0000)] 
Add missing comment to constant definitions.

FossilOrigin-Name: 661a3789eb329a2487855e49c31067a9dde4c91c1a3a65b65375d079f906b1da

5 years agoImprovements to a comment. No code changes.
drh [Sat, 28 Sep 2019 16:14:55 +0000 (16:14 +0000)] 
Improvements to a comment.  No code changes.

FossilOrigin-Name: 1a3671c7003bfff817a8239424c2f945d9dfced97daadb5a5acab203b9bda69b

5 years agoIn FTS3/4, the poslist end marker must be larger than any other possible
drh [Sat, 28 Sep 2019 11:19:56 +0000 (11:19 +0000)] 
In FTS3/4, the poslist end marker must be larger than any other possible
poslist value, even on a corrupt poslist.

FossilOrigin-Name: 752679aea5a6bbde24cbf39e2fa018f7dd1c226d463ca4bd74125303b2255170

5 years agoUpdate requirement marks due to changes in documentation wording.
drh [Fri, 27 Sep 2019 17:36:37 +0000 (17:36 +0000)] 
Update requirement marks due to changes in documentation wording.

FossilOrigin-Name: 326cdc16f4db23c1d17596e4ef8d9d7abc672d48665950029ba53fd40c1b2d99

5 years agoAllow compile-time options -DHAVE_GETHOSTUUID=0 and -DHAVE_GETHOSTUUID=1.
drh [Fri, 27 Sep 2019 16:33:27 +0000 (16:33 +0000)] 
Allow compile-time options -DHAVE_GETHOSTUUID=0 and -DHAVE_GETHOSTUUID=1.

FossilOrigin-Name: 3bcb9cc104e0265a600b03415ad955187fc6445ea8e46dc656412cba5bc1d621

5 years agoAlternative implementation of the previous check-in which is testable.
drh [Fri, 27 Sep 2019 15:15:38 +0000 (15:15 +0000)] 
Alternative implementation of the previous check-in which is testable.

FossilOrigin-Name: 102ef64462cf0d78395ccc7ebb8e3bf6b7647c06b7657a037e051697bc08d6b7

5 years agoFix sqlite3ExprCompare() so that it ignores differences in the Expr.iTable
drh [Fri, 27 Sep 2019 15:01:02 +0000 (15:01 +0000)] 
Fix sqlite3ExprCompare() so that it ignores differences in the Expr.iTable
field for IN operators, as otherwise it can lead to false negatives, which
is usually harmless, but can cause problems for an assert() in the window
function logic.

FossilOrigin-Name: 6a204b192a6c6f21988cab217366f21b14c672b81ceadc43675761a6d8c4484f

5 years agoMore minor test file fixes.
dan [Thu, 26 Sep 2019 20:57:53 +0000 (20:57 +0000)] 
More minor test file fixes.

FossilOrigin-Name: 352878fe1cbcf7b6803624544bba5a95565d1638d4dd09e91764ddad17889301