Commit Graph

22247 Commits

Author SHA1 Message Date
drh
ef5b2d27b7 Remove the VERSION_NUMBER macro from configure.ac as it has been unused
since 2009 check-in [7f4810747b086498].  See also
[forum:/forumpost/bb2c634fcd|forum post bb2c634fcd].

FossilOrigin-Name: 5466dd55d4aa15fd96f00b6e205dfb868879357a476df7ffd29b97bb570629a5
2020-11-24 13:14:15 +00:00
drh
de9873bb0a Syntactic changes to work around a bug in gcov 9.3.0. No changes to the
generated code for release builds.

FossilOrigin-Name: 4f1573b146193e5d552981a9d1d11e50da4da4a843f790e4af1cf0cc19a0b020
2020-11-23 21:05:29 +00:00
drh
d46beb06aa In os_unix.c, put ALWAYS() on unreachable branches associated with pathname
normalization.

FossilOrigin-Name: b45a08e3c7edfa76b699d3e29f28daa5bd08039668ec57121e4e85edf36150f1
2020-11-23 17:36:06 +00:00
dan
39acaec16c Fix a test script problem causing crash8.test to fail when run with leak-sanitizer.
FossilOrigin-Name: 2c437f7a2c87129d00c71fa569315b68e0ba9514041d93503350c9ae9f080f17
2020-11-23 15:30:16 +00:00
drh
1335ec7df7 Allow "substring()" as an alias for "substr()" for compatibility with other
SQL engines.

FossilOrigin-Name: aa2ee5754c9f8378c4d490ca756a6415042904477727f0d86e9c0190b5e8b275
2020-11-23 14:50:43 +00:00
dan
6a5e21149b Add file doc/vdbesort-memory.md, containing notes on the way vdbesort.c uses heap memory.
FossilOrigin-Name: 07f53899a929cce93f17c0332819610c9517c7e54e00092af20efd746cf84438
2020-11-20 14:16:41 +00:00
drh
6fc74a4454 The xFullPathname method of the unix VFS now normalizes the filenames by
omitting surplus "/", "/./" and "/../" strings.

FossilOrigin-Name: c38dec6f52c01614c1bee8356daf0fcd9f708d029116e9bff51e06719a730dde
2020-11-19 21:12:08 +00:00
drh
e5dc4a2097 More test case changes so that shared-cache mode tests all work
with normalized database names.

FossilOrigin-Name: 6f0d5f0949130a4688319adf05d37c5ccd683ca9ad2dacb7ce433a5fe18ac3c3
2020-11-19 21:01:11 +00:00
drh
f4097026ef Fix the tkt3793 test case so that work even when filenames are normalized.
FossilOrigin-Name: e85d32ac6c82d39f5dc9b28f881d5d72f5e5a7e16df12c19315bfa8edea1b0b4
2020-11-19 20:07:24 +00:00
drh
5dc18e33ae Use an ephemeral table rather than a RowSet to remember rowids in the
two-pass UPDATE algorithm, as this uses much less memory for large UPDATEs.

FossilOrigin-Name: 842c432772e6cd8464cdb7bfdb38789adeea9aa9e0486d4034cc9841f085f517
2020-11-19 19:43:46 +00:00
drh
02e4b7d7df If a read() or pread() indicates that the database file is unreadable due to
filesystem damage, then it returns SQLITE_IOERR_CORRUPTFS which is then
converted into SQLITE_CORRUPT before being returned to the application.

FossilOrigin-Name: 849e4e14fd06eda512381f5f8aa65f75ad0a955e835da7c63526a53cf5e8f4dc
2020-11-18 23:44:41 +00:00
drh
f56a4bfcd1 Improvements to the mechanism that attempts to report SQLITE_CORRUPT if
pread() says that the underlying filesystem is corrupt.

FossilOrigin-Name: b887c7504e7edeba758f3c1203c6cc56eef499fe05e7e6c6d82939bf7d78c57f
2020-11-18 21:50:05 +00:00
dan
8ea11095c9 Update cksumvfs.c so that if SQLITE_AMALGAMATION is defined, SQLITE_CKSUMVFS_STATIC is implied.
FossilOrigin-Name: 184e9d782dfbad8011b5b0043b3fd8e5a369ed7076e37e14b301483ce5ffe5db
2020-11-18 20:55:01 +00:00
dan
c30b78f6f3 Add test infrastructure for cksumvfs. And update cksumvfs so that it works in concert with version 2 VFSs. No changes to core SQLite.
FossilOrigin-Name: 43d4801df5dc4625f6829ed8246758493842b2416ba609ee0423ef63155cece2
2020-11-18 18:36:43 +00:00
dan
8bb3961d40 Fix a problem causing sqlite3_carray_bind() to return an undefined value.
FossilOrigin-Name: 083203a549d3cf26991d8626b308ff1e9e44be6abb72ab3d38e5fd53c99aed7f
2020-11-18 14:30:53 +00:00
dan
5011bb8dd2 Update test code to fix a problem with SQLITE_OMIT_VIRTUAL_TABLE builds.
FossilOrigin-Name: 29c779a07bf6ede1ec2cdb4695d801a5c113ab4b12d6cd22bcee8d2adb06891e
2020-11-18 14:12:20 +00:00
drh
5a07d10fd1 On unix, for certain error codes of read()/pread() return
SQLITE_IOERR_CORRUPTFS instead of SQLITE_IOERR_READ.  And then convert this
error into SQLITE_CORRUPT prior to returning back to the application.

FossilOrigin-Name: 9538ea8447e7b07c05197d6ff2208d3e97b45798736c85b63e8f0c7a3a98c1f3
2020-11-18 12:48:48 +00:00
drh
32881bebbe Claw back most of the performance lost in the previous commit.
FossilOrigin-Name: df8ce2675b070fcdc338918e7652a26ffc90439fe399ceac206fadf8a93a681f
2020-11-17 21:26:13 +00:00
dan
aff1a57f4d Fix trivial memory leaks in the shell and sqldiff programs.
FossilOrigin-Name: 272793e5edc47e431be77d589718a001f2696869e3e15f1371a1890645a995a7
2020-11-17 21:09:56 +00:00
dan
12c9994659 Fix test file busy2.test so that it works with the "inmemory_journal" permutation.
FossilOrigin-Name: b192fdddb63ac56fd6725032af110a069baac52347c0012c130bf34f3cbe69e4
2020-11-17 18:25:48 +00:00
drh
ea847f1b94 Add a single-argument form to the CARRAY table-valued function, with
content bound using the sqlite3_carray_bind() interface that is included
with the extension.

FossilOrigin-Name: 7b229cb1202be203a87b8f47d284313f357deb1e6dfeb94bba7b46744c33512e
2020-11-17 14:41:37 +00:00
drh
7f42dcd901 Enhance the unix VFS so that it removes extra "/", "/./" and "/../" from
the database filename.

FossilOrigin-Name: 7ba89d3e5c68d970ed26c2ec6e6e34bae535c2cc0b22a022d20ac9ff4527b8ab
2020-11-16 18:45:21 +00:00
drh
ea2487200f Modify UPDATE so that two-pass updates on a rowid table use an ephemeral
table to store rowids rather than a RowSet.  This uses less memory, though
it is slower.

FossilOrigin-Name: 4673096dd8c5ed7aed098ff518a6d01d35c40fad991b89fddd91c19a727a4308
2020-11-14 20:03:34 +00:00
drh
b035b87ef8 Improved diagnostics output with ".wheretrace 0x800". No changes to
non-debug builds.

FossilOrigin-Name: 772ae83c61c87a9004a614d8ec120ba843286bff1edbd20b987fd592ced84d79
2020-11-12 18:16:01 +00:00
drh
75e6bbbeca Fix a typo in a comment. No changes to code.
FossilOrigin-Name: 572f1ed59d29e74f810c74ef9e72ebc94c2d3e04befc03a1f88034f04a9c60a8
2020-11-11 19:11:44 +00:00
drh
235667a858 Use NEVER and ALWAYS macros to confirm that the return value from
sqlite3ExprSkipCollateAndLikely() is never NULL in some of its use cases.

FossilOrigin-Name: 76d2eb86e109fc3cbdba2e8175c22ed7660b59bb9315f6c55c565587f33ad43b
2020-11-08 20:44:30 +00:00
drh
78043e891a Add ALWAYS() to conditionals associated with SHM locking that are always true.
FossilOrigin-Name: b599e89076d60afede7d2b3503b9338ca863d0c2d25799afe4080a6186386ea9
2020-11-06 16:48:55 +00:00
drh
4e451aad54 Suppress errors associated with TEMP triggers that reference objects in
non-TEMP databases.  This is a continuation of the fix for ticket #3810
shown in check-in [ba1afc040171810d]
from [/timeline?c=trunk:200908061743|2009-08-06], based on a bug report in
[forum:/forumpost/157dc791df|forum post 157dc791df]

FossilOrigin-Name: 991ca9b26bacd8f6b64498057fe28f2068466a220f372fd365b6685f583f0e92
2020-11-05 19:13:44 +00:00
drh
114cb01796 Remove unused variable from speedtest1.c
FossilOrigin-Name: c0a18565e614021b74646de7efd11d3d46894ef9132fb26787ab0269dc6a647c
2020-11-05 14:50:21 +00:00
drh
6d5ab2a1d6 Fix an another OSS-Fuzz discovered assertion fault due to ALTER TABLE and
strange triggers.

FossilOrigin-Name: 6646d7898ca1d2f71ec906d9613fbfc5c59c6cf05f053529e6e32ab826d1cb78
2020-11-02 00:40:05 +00:00
drh
2fa7818571 Add the -tabs command-line option to the CLI.
FossilOrigin-Name: 7d01e84dc49074e6364267eea9fd20d46a457d2498121a0f218fbf482692392d
2020-10-31 18:58:37 +00:00
dan
7a39faecc2 Update the ALTER TABLE command to correctly handle UPDATE ... FROM statements within trigger programs.
FossilOrigin-Name: 3e6af890406b58da1c4aebec4d483be7ab0fdb589ef7a4c4e987d6bde18d6b97
2020-10-31 16:33:01 +00:00
drh
ed7974dee5 Always create a statement journal when using the OP_ParseSchema opcode,
as you never know when it might fail.  See the discussion on
[forum:/forumpost/daa2c728cc|forum post daa2c728cc].

FossilOrigin-Name: aa512f72cf5adfece6299db17bd122aeff0cdee2a25f83f60e2ebb05e99c9591
2020-10-26 18:14:12 +00:00
dan
19f7bd3b07 Ensure that the table argument passed to Tcl_GetIndexFromObjStruct() in the sessions module test code is declared "static".
FossilOrigin-Name: 80eba105d6d1b49ba8ca2ad4e14ddec2de0bdc2f6686c2f8a1c1d24fc1fe846f
2020-10-26 16:22:31 +00:00
dan
d1d43efa4f Prevent fts5 tokenizer unicode61 from considering '\0' to be a token characters, even if other characters of class "Cc" are.
FossilOrigin-Name: b7b7bde9b7a03665e3691c6d51118965f216d2dfb1617f138b9f9e60e418ed2f
2020-10-26 13:24:36 +00:00
drh
beb22d086b Minor tweaks to query planning weights so that when STAT4 is enabled
and functioning, a full table scan is more likely to be selected if
that seems like the fastest solution.  Only do this when STAT4 info
is available because an error has a large potential downside.

FossilOrigin-Name: 0e7e113d9f2c929c1f8a85e2cfad8e2e60f0e8770212b5e5320fb2a2c42911f8
2020-10-22 18:50:30 +00:00
drh
461ff3594b Test case updates.
FossilOrigin-Name: 27c681c9c6672ad7098d8ff2c41e76d3e9e55866b6327ed85e73f63bd623ceed
2020-10-22 18:16:17 +00:00
drh
403869680b Sometimes it makes sense to do a full table scan rather than try to use
an index when most of the rows will be selected.  This branch is trying to
tune the query planner to make that happen more often.

FossilOrigin-Name: 0f42099ad65855c94af8472f3a6fddac7fc2a82e8fdfcc06a298eb6683a28688
2020-10-22 15:47:48 +00:00
drh
672f07c642 Fix the sqlite3_hard_heap_limit() so that it works with sqlite3_realloc64()
in addition to sqlite3_malloc64().  Improvements to OOM processing and
debugging aids in the fuzzcheck utility.

FossilOrigin-Name: 602d7369166d406a26834aa47d71d565a17d377d32e41f308821a50b41f91896
2020-10-20 14:40:53 +00:00
drh
1a56fce614 Fix an assert() inside of debug-only code that can fail following an OOM.
FossilOrigin-Name: 79da254f41a0d7d5fdc57f0cc40b3560bfcf7f79eed24a9fada1b6b4ca3adb5a
2020-10-20 12:37:51 +00:00
drh
94d6f3f836 Fix an incorrect table ref-count in the new recursive CTE logic that might
result in a reference to freed memory following a syntax error.

FossilOrigin-Name: 75a0288871ccb2a69a636cbb328fe19045a0d0ef96a193ecd118b9a196784d2d
2020-10-19 20:49:54 +00:00
drh
787f6d418d Enhance recursive common table expressions to support two or more
recursive terms.

FossilOrigin-Name: 77e64647ec429c6e0d884abbd00dabebe738f89544a4984d6fd7a702b928ccfd
2020-10-19 12:35:08 +00:00
drh
07d7a8dca9 New test cases for recursive CTEs with multiple recursive terms.
FossilOrigin-Name: cd5182bd6f5969ba0812275f471224908296960358013327cebbe0c52b820f04
2020-10-19 01:44:43 +00:00
drh
340558540e Allow multiple recursive terms in the compound SELECT of a recursive CTE.
This facilitates writing a query to find find the connected components of
an undirected graph.

FossilOrigin-Name: 5481fa8c79c34f434e99ab633ff3d0942a309a74fb0cf38e3d3617b51d5d21dd
2020-10-19 01:23:48 +00:00
mistachkin
a00a016740 Fix harmless compiler warnings.
FossilOrigin-Name: 7f8802bb7be61fdf7c7a591945d533d848bc46d2989f7739dd9ad89e1b6a9c65
2020-10-18 18:35:34 +00:00
drh
ff01ee34c9 Fix the SQLITE_DESERIALIZE_FREEONCLOSE flag so that it works as it is
documented to work.
See [forum:/forumpost/ba1dff667a|forum post ba1dff667a]

FossilOrigin-Name: d6fac8a1d3efeb2c4f03dae437b5b314765c93770a70603803a8039291dbcabb
2020-10-17 22:13:16 +00:00
drh
e93986a93b Fix an incorrect printf() in debugging logic in where.c.
Problem reported [forum:/info/80a9c47769772207|by forum post 80a9c47769772207].

FossilOrigin-Name: 883da4dadc88809192e4ed2f753f8883471fb43aa330bc58b017c66e1acedc6c
2020-10-17 19:09:04 +00:00
drh
71cb422055 Minor fixes to the cksumvfs documentation in the header comment of the source
file.  Enhance speedtest1.c so that it can more easily do performance
comparisons of cksumvfs.

FossilOrigin-Name: ed3bb818f58b75c087f2875331ec944397b6c61a5b14d8af4b9ec6f376bd1872
2020-10-15 17:59:38 +00:00
drh
f8c4c3a09f The windows VFS accepts query parameter "exclusive=true" to cause it to
take a mandatory file lock, preventing other applications from even
reading the file.

FossilOrigin-Name: 05b573fdb27abec7d75aa1375325d45043cfd674f5b346fb341f001d7e04d160
2020-10-15 14:37:27 +00:00
mistachkin
d5157e01b8 Enhancements to TclKit batch tool for MSVC.
FossilOrigin-Name: 2a8a4552112be6e39e3475e9a8579582b5157086d3efd37971463c0e3958068d
2020-10-14 21:31:20 +00:00