Commit Graph

23457 Commits

Author SHA1 Message Date
drh
2db144c33b Add a Bloom filter to the automatic-index mechanism.
FossilOrigin-Name: 50ac4de1d7cbb586ea7969e1ae80ea8b021e194edc2fa7db19374b4ee9369bee
2021-12-01 16:31:02 +00:00
drh
c1085ea412 In the automatic index generator logic, be more precise about when a
partial automatic index is allowed in order to capture more cases where it
is legal to use a partial automatic index.

FossilOrigin-Name: 664b461bb5063d98047fc2e51a3827235cd9f55ca2e23cb66e719eac53fb5437
2021-11-30 14:07:58 +00:00
drh
78679a4950 Merge in the proposed date/time function enhancements: (1) Add the
unixepoch() function, (2) the 'auto' modifier and (3) the 'julianday' modifier.

FossilOrigin-Name: 19c51b46e4095ee28badb10f4e08bbd330bda320c9a8806e93b8fc60ba211a2e
2021-11-29 18:09:54 +00:00
drh
4a0a98d3fd Bump the version number up to 3.38.0 in order to begin the next development
cycle.

FossilOrigin-Name: 8ad1fcaa1b734e32d8d67c4cca7a23d2b9717ae5c7c2c5ad5a3411a503ee23ae
2021-11-29 17:55:12 +00:00
drh
1312a9c908 Add the unixepoch() function and the 'auto' and 'julianday' modifiers.
FossilOrigin-Name: 559fdc0aa76f4c207f99f7b0cee42043b402dc388165817529d9963b115a798c
2021-11-29 17:23:27 +00:00
drh
6df8c0cd3b Following a prior error, an ALWAYS() in sqlite3ExprCanBeNull() might be false.
dbsqlfuzz 5dbec6678a20e7595a34dfdd869a3b9722b3ca43.

FossilOrigin-Name: 4e207401acce1bdc17025f2d55bd94234b435e286cd43e1eda03b6949a2a91d3
2021-11-28 19:54:38 +00:00
drh
315e3122c3 Version 3.37.0
FossilOrigin-Name: bd41822c7424d393a30e92ff6cb254d25c26769889c1499a18a0b9339f5d6c8a
2021-11-27 14:13:22 +00:00
drh
14851b9a14 Fix a harmless comment typo.
FossilOrigin-Name: 7c567338ae4dd31097e9ae5c693b84369c35c5a52534797e8186b4be7297ba78
2021-11-27 12:03:51 +00:00
drh
855a165fec Add platform "Darwin-arm64" to test/releasetest_data.tcl.
FossilOrigin-Name: 1d5c9aacb8ab6349935561cc12734cf348c12c86e4663ddc7af113b3ed0f6186
2021-11-26 20:26:37 +00:00
drh
913306a53a Improved defenses against integer overflow when computing the size of a
memory allocations.  No bugs were fixed here.  But perhaps future bugs will
be prevented.

FossilOrigin-Name: eb878c01f317f09e8ef6b1bd2ec8d6d5cd6ce0bdfe9da7fa7d92d2047cc9d9e4
2021-11-26 17:10:18 +00:00
drh
e574a9233c Fixes to internal comments. No changes to code or documentation.
FossilOrigin-Name: 1489b196ce82cddf7360aff6c89219ca25e666187f0f5ff6419ba3b504cdef8d
2021-11-26 15:08:55 +00:00
dan
2df026a549 Avoid splitting Failure-Detection test cases in wapptest.tcl.
FossilOrigin-Name: 654e6cf8ab493d48b1827bb8100d4e4366a8e889e647c233a9b1b1278a7133d0
2021-11-24 21:16:32 +00:00
dan
622bd63c33 Update Makefile.msc to support target "tcltest" in the same way as the autoconf build system.
FossilOrigin-Name: 0f131b92252afc95c8c2d160d4be9ac2a737a610ee355efcd819f1af3bae3c56
2021-11-24 11:33:01 +00:00
drh
b0906b6088 Changes a test pattern for RBU so that it works regardless of whether newer
TCL versions are used.

FossilOrigin-Name: 5a9921c92ade9e13c3e49c50325c96e3264f3ad352a187387a960783a68bc9d3
2021-11-23 22:28:09 +00:00
drh
7907d372bc Fix a compiler warning in the dbserialize method of the TCL interface.
FossilOrigin-Name: ba71d030fef4cd4251dc882acc6897dbf9aaba498652900c491b082add87404f
2021-11-23 12:59:25 +00:00
dan
619a5f5572 Exclude two recently added tests in where.test from valgrind runs. They fail due to the subtly different handling of real numbers under valgrind.
FossilOrigin-Name: e842d2085b295ef1c927611f5d3b211fb6b513ca2676c074fe90331da81734eb
2021-11-23 11:34:43 +00:00
dan
70a05e9168 Omit wal mode tests in memdb1.test for builds and configurations that do not support wal mode.
FossilOrigin-Name: 0f13c0d9fd7757c6e0b845a285c0047d2c60293354335660d19d80ad799646fc
2021-11-22 16:50:41 +00:00
dan
b127d0fd2a Omit wal mode tests in vacuum-into.test for builds and configurations that do not support wal mode.
FossilOrigin-Name: 65de17635468791678b9d205552a4faec2d6c3b7d330c559b6f81ab072254533
2021-11-22 16:48:42 +00:00
dan
c7b29b0ce7 Do not attempt to run the tests in alterfault.est with SQLITE_OMIT_ALTERTABLE builds.
FossilOrigin-Name: 6f6f31c7df6831af28a24e69f744beeade739bb7bbb0810d5bbe592e4cd75e3d
2021-11-22 16:43:53 +00:00
dan
42ac4c2e5f Fix a typo in memdb1.test preventing tests from passing with -DSQLITE_DEFAULT_AUTOVACUUM=1 builds.
FossilOrigin-Name: eff4187c50790827d05bb28867cc6546196e7eee3b4c4de54b4e68bfb4e2830e
2021-11-22 16:27:36 +00:00
drh
b670fd5545 There are two possible error messages from stat-9.1, depending on
compile-time options.  Adjust the test case to accept either one.

FossilOrigin-Name: 0f567b61072e214c40cae1441889f83622a975f429b41803dfbed687718731c8
2021-11-22 16:06:57 +00:00
drh
81258cc911 In fuzzcheck, improve the defense against long delays due to
rogue busy_timeout macros in fuzzer-generated scripts.

FossilOrigin-Name: 3024d7ca03541a6fe3d264fdc82dd49f8f6b51d2fbeec4dfc9c6dd72806b271a
2021-11-22 13:59:06 +00:00
drh
9f9bdf9345 Fix the build for SQLITE_OMIT_CTE.
FossilOrigin-Name: d7ef96bae459f800241483fe8784552d18ee7f92f408f6453ac687de5530bbb9
2021-11-22 13:35:40 +00:00
drh
156d44104a In the previous check-in, do not overwrite the SQLITE_CORRUPT signal with
an SQLITE_OK before exiting fts3auxNextMethod().

FossilOrigin-Name: 396688ae5c10b9e7df1c76a3c6f548abf7a7ddad50c25fb23e194201dbb2e857
2021-11-22 12:59:44 +00:00
dan
bb0c54283d Fix a crash in the fts3aux code that could occur handling corrupt records.
FossilOrigin-Name: cdcd65b89ecffd380483404f5b1379beffd7ff107acaa5bc1185651cfacaa220
2021-11-22 08:12:14 +00:00
drh
6f991147bd New test cases for STRICT and NOT NULL in PRIMARY KEY.
FossilOrigin-Name: 0eafbc2f31b83f48833b19894ff3252a63c319ff501506ef9f744cca813a3a24
2021-11-20 13:30:03 +00:00
drh
a51e60079f Small performance increase and size reduction for sqlite3ExprCompare().
This change also handles some corner cases without the need for ALWAYS().

FossilOrigin-Name: d814ba6effc7c5b021ff625b57371627f3ee326687c508da99f78bc164386b7e
2021-11-19 19:11:58 +00:00
dan
d9137e3be0 Fix a benign data race in os_unix.c that might trouble tsan and similar tools.
FossilOrigin-Name: 95806ac1dabe4598170061d903ae30f09bafac149ff6696963a7e056ac846cdb
2021-11-19 14:02:43 +00:00
drh
5e90794b67 Minor tweaks to the way auxiliary tools are built, to make it easier to
customize the builds without having to alter the code.

FossilOrigin-Name: 90b06b6f42918852cfb15258be462c6bed260c6a618b86fa9084bac72fa2f58f
2021-11-18 20:56:59 +00:00
dan
826ec6013c Fix a performance regression in rtree introduced by the previous commit.
FossilOrigin-Name: 7f42b8e1a25c0830fe81e4668318998af595826784a50780a5c1c0b4d95a2482
2021-11-18 20:11:31 +00:00
dan
895c807a6d Fix a problem slowing down the handling of == constraints in the rtree module.
FossilOrigin-Name: 509027e964f28efca088a41fe32f01c38316f7a919de63a8835e3bc7c3fb0787
2021-11-18 19:15:40 +00:00
drh
9cd0c3d4c5 Improve CSV quoting in the CLI using the strstr() function.
FossilOrigin-Name: b7927bf91049c903730a280484bbcdcdedc259a31fbcc3d3b0c7d046ec321633
2021-11-18 15:40:05 +00:00
drh
e41d30ffdd Fix an obscure problem associated with quoting of CSV output in the CLI.
FossilOrigin-Name: 38a9b660214c06aa6650c6bb11a429a8c74c09f1e0e5c18d691e36de4af7af71
2021-11-18 13:25:31 +00:00
dan
488b55856e Fix a problem causing an OOM within an ALTER TABLE ADD COLUMN command that adds a column with a CHECK constraint to go unreported.
FossilOrigin-Name: a33f5e93ecb7d84291f6fecc7b60f0c555034aa47e24584c63c78d8a94710d82
2021-11-16 13:36:50 +00:00
drh
9dc718856f Strengthen the sticky-CORRUPT idea of check-in [3feb0f1c3840904d] by
automatically changing the first COMMIT after an SQLITE_CORRUPT error into
a ROLLBACK.

FossilOrigin-Name: bd66ab8a1bc3c43a57c7caff5f54545b0feb0177f1f51492f30d308c123c43ba
2021-11-15 19:10:13 +00:00
drh
3ce76a0bbb Small performance optimization in sqlite3VdbeHalt().
FossilOrigin-Name: 9e1ecf438cb01d3d76950bcce1b3e4df29bedbb8176c8cede27e66f8e53e2098
2021-11-15 18:50:02 +00:00
dan
8745f8a3c3 Fix a problem causing the count(*) optimization to be misapplied in some cases where an aggregate sub-query uses a count() expression that is aggregated against the outer query.
FossilOrigin-Name: e30917278c0ec750b1756ddc5e32d65c55464531d6ef64d2e72a412dfe634f58
2021-11-15 14:11:23 +00:00
drh
5b001cc25d Improved context shown for the "ABORT-due-to-error" output line when using
"PRAGMA vdbe_debug=on" in an SQLITE_DEBUG build.

FossilOrigin-Name: c7776369bcd0dbeb418b14d5dc681a81ee426234cc3f4f79a3c899d7892e1560
2021-11-15 13:22:42 +00:00
drh
a2852ac4d2 Fix a faulty JSON assert() added 30 days ago by check-in [7b8ea2298927fd34].
dbsqlfuzz f30366e7b02562398a387ddcc681422fd4251190.

FossilOrigin-Name: 0e0c23fcc493a5d6beb6ab9554981bbc36ba1554fea0f8ba78dc41738f4bd1c2
2021-11-15 01:45:11 +00:00
drh
146121f5cb Improved handling of OOM while reallocating a column name to add type
information.  dbsqlfuzz 5a195b4233649e49e0aa34f1b743ca192d85b198

FossilOrigin-Name: 5995dd4de4997c43b43befc1281ef6378f33f781134c7f368299d64db2344f1d
2021-11-12 14:39:49 +00:00
drh
9135ebb7db Make sure the rowid value returned by the VUpdate opcode is always initialized.
FossilOrigin-Name: 150b5be5d5771485f521e3a58312596ecdcd35f3a0ae9d42d88bb99348a197c4
2021-11-11 23:52:44 +00:00
drh
f9241a5fd0 Remove a NEVER() that was add yesterday. The fuzzer found a new test case
to make it happen.

FossilOrigin-Name: 83e6ac71073edfa0cd73788c30bdd5f09cb04c8a6a7d5123123dbcd354f430b8
2021-11-11 16:26:46 +00:00
drh
3ab4ffce1f New assert() statements to help prove correct usage of VdbeCursor objects.
FossilOrigin-Name: 7cee62f77a9e7c3cf886f136e75a93c3bbbb88e48b66035883bea5503d9fc03c
2021-11-11 11:23:08 +00:00
drh
34e71830de Load new test cases into test/fuzzdata8.db
FossilOrigin-Name: 8b53ffe99df6f5443bd22a9d95433819eb44c7e8f044c2f3e9d52661741d5612
2021-11-10 15:23:00 +00:00
drh
46c425b4dd Make SQLITE_CORRUPT sticky: If a CORRUPT error is returned, all subsequent
write statements within the same transaction also fail early with
SQLITE_CORRUPT.

FossilOrigin-Name: 3feb0f1c3840904d28fc9a61262820e2b9b764addc1dd178aecc2cd0f952042c
2021-11-10 10:59:10 +00:00
drh
995d33ae02 Change test case error message text to match the current implementation.
FossilOrigin-Name: de10795a1cf70925088e9652998e813665b2e147ffa4a4edab18c7e2c66bf5ae
2021-11-09 13:31:42 +00:00
drh
4e86aa86ea Fix lempar.c so that Lemon can compile with NDEBUG defined.
[forum:/forumpost/f331adca0b|Forum post f331adca0b]

FossilOrigin-Name: ba4fb51853fbcb8c142a350b4db0d59153f28ba0a63ad9a2d6fea7096d3dd544
2021-11-09 01:48:15 +00:00
drh
90cf38be63 Refactor the code that figures out which SELECT in a cascade of nested queries
a particular aggregate function belongs to.  This fixes the problem
reported by [forum:/forumpost/c7cc2aa3546e39c1|forum post c7cc2aa3546e39c1].
New test cases in dbsqlfuzz and th3.

FossilOrigin-Name: 74aec5dd1df95b5635f4da1f13753f113ea1d61de3dc3a1523ba51089c1900e4
2021-11-08 23:24:00 +00:00
dan
a32536b498 Fix the zeroblob() function and related APIs so that they work with SQLITE_OMIT_INCRBLOB builds.
FossilOrigin-Name: bc401a75dd9f3c29c5969ae36264e68ccefc0937e44e232ca1f6b550f7fd6e22
2021-11-08 19:35:26 +00:00
dan
1a39e45619 Fix an assert() in memdbTruncate() that could fail when processing a corrupt database.
FossilOrigin-Name: b1e2929860557cf88f98f0a4f2472e1a16be126bbb8050f0d728350f0cfe987a
2021-11-08 15:46:08 +00:00