Commit Graph

26054 Commits

Author SHA1 Message Date
dan
b8d689b666 Fix windows-specific problems in test scripts sessionnoop2.test and sessionrowid.test.
FossilOrigin-Name: e4989c111ddffe6818cbb88a72bd027b30124d1e8de0cce4109c72a214ffb5b8
2023-05-13 20:01:27 +00:00
dan
5e65cd1caa Remove unnecessary call to sqlite3_dbdata_init() from shell.c.
FossilOrigin-Name: 84ca2000007d217f911a3b1586143fc9261c0697a9e9fadda6bd3dd6afdfb099
2023-05-13 19:38:30 +00:00
dan
fd0791587b Add an "#ifndef SQLITE_HAVE_SQLITE3R" directive to shell.c.in, to avoid including the recovery code a second time if the shell is being compiled with sqlite3r.c.
FossilOrigin-Name: 6f1a60fb7b3ef463b4131dfecbc72b7c778c794a9aa13ce4617ab6dd895508b2
2023-05-13 19:13:40 +00:00
larrybr
ea51c09a8b Mention that sqlite3_mutex_free() accepts NULL as a no-op.
FossilOrigin-Name: 603d9ad5012ca8996783996d7b8cd6a1aabf12b21604a2ccc137f4c2d99427b9
2023-05-13 15:34:15 +00:00
mistachkin
273c2a9425 Fix compilation issue seen with MSVC.
FossilOrigin-Name: 67001887044da71ab50c07d8345bd950a0a1f9688cf9cd6966312ea163cf6e17
2023-05-13 05:13:29 +00:00
drh
59b6a2bcbe Fix harmless compiler warning caused by [0772ddf56713d013].
FossilOrigin-Name: f06c16a8b0e7a15ce4f7d99af3376a1bf1bfbfc0fdc048b079418ae74c619d6b
2023-05-12 19:06:00 +00:00
dan
83be5586a0 Add multi-threaded test for "INSERT ... RETURNING ..." and SQLITE_BUSY errors.
FossilOrigin-Name: 559cb1c6de384fd14160db005acaf1858b8b018d3d40d7f786a56a49d3cdbd59
2023-05-12 19:02:50 +00:00
drh
4f3dc93978 Make the regexp extension more robust against OOM errors during compilation
of the recognizer engine.
[forum:/forumpost/f50aecd5e8|Forum post f50aecd5e8].

FossilOrigin-Name: 0772ddf56713d013cd1bd44f9c75977ca14f852e3a8f038b0a6b9814f6519d79
2023-05-12 15:45:34 +00:00
larrybr
fb74019a14 Fix unlikely strange result of CLI edit().
FossilOrigin-Name: ab3797e844c97fed344b36f30cfb788aca9e0d68c574fb833712219eb712db44
2023-05-12 14:51:00 +00:00
drh
69bc8c70f9 Ensure the _O_U16TEXT is defined for Windows builds of the CLI.
[forum:/forumpost/c80aa942dc6bf2|Forum post c80aa942dc6bf2].

FossilOrigin-Name: 504effa89b48c0dc6cd12b3eaf6017be3f32017c601af17759a3cc185346d868
2023-05-12 13:20:57 +00:00
drh
26a3e56649 Remove a stray CR from end of line in a source file.
FossilOrigin-Name: 48139fb904de4b7b383e7f8c29bed83ad878eb22b1dd773c366a0aee74613d23
2023-05-12 12:57:44 +00:00
drh
61791c6f4c Fix harmless typos in comments.
FossilOrigin-Name: 607c3efbe0293d7c11a955a9f21e24fb9f7f1bb758e13e60f4ba0cc0ac8b900c
2023-05-12 12:45:56 +00:00
drh
6b429dc11b Ensure that all prepared statements are expired and forced to reprepare
whenever the database text encoding changes.
[forum:/forumpost/43cbfc4d23|Forum post 43cbfc4d23].

FossilOrigin-Name: 469718f106e1cfa7f8f4714a9e743108c361af81e0258061c2b76880a7c352ae
2023-05-12 10:52:12 +00:00
drh
78b404d976 Add [/info/cec6a06508239c09e363?ln=5525-5531|restriction (5)] to the
omit-noop-join optimization.  Fix for the issue reported by
[forum/forumpost/49f2c7f690|forum post 49f2c7f690].

FossilOrigin-Name: 3e9c9bbdb59b9d500ff218db538c047c83da7ac18ebb95c3ee7629ab15e0b43a
2023-05-11 21:15:55 +00:00
drh
5ca40d84ad Fix a minor typo in a comment. No code changes.
FossilOrigin-Name: 607cfb5bc5c0fb8b789944c2326cfdebf0629e45fbf0a61dd5f667ed685a1bbe
2023-05-11 18:03:11 +00:00
dan
418d212308 Fix the rbu_exclusive_checkpoint=1 option so that it works with a zipvfs database in pass-through mode.
FossilOrigin-Name: caca67d30670913914335aa3edff784e1c3d26aed70ae32efb5607ccf31ad142
2023-05-11 17:25:14 +00:00
drh
28f4e7b286 Enhance the split-sqlite3c.tcl script so that it uses single-character
extensions on subordinate source files, even when the number of subordinates
exceeds 9.  This is not yet needed, but might be soon.

FossilOrigin-Name: 4150e416263f24efcbfe68d5b1e15ec7e79df41dff0b6dfdc59f06ee9e205049
2023-05-10 16:04:04 +00:00
drh
0051a56dec Fix harmless compiler warnings from the CBMC compiler.
FossilOrigin-Name: 5bc17cbccdd369486fca049be9d7457e18f162c0e2f5475809ffc8f01c5fa9d2
2023-05-10 13:56:32 +00:00
drh
5af043c2e7 Rename sqlite3IsTableConstraint() to sqlite3IsSingleTableConstraint() and
improve its header comment, in an attempt to make the code easier to reason
about.  No functional changes - should generate identical machine code.

FossilOrigin-Name: 5dae897431a0a9dbb354c4a8a48f935ea7438035d96f90b83dd81eae434c8277
2023-05-10 11:05:59 +00:00
drh
d733ee5cca Add a missing comma to the documentation for the OP_Jump opcode. No changes
to code.

FossilOrigin-Name: 7e2c2b1cee760af68cf303ce9ec1babbaf607fe54e043893c046d2d37cd0ab46
2023-05-10 10:03:28 +00:00
drh
88a99437b9 New restriction on the push-down optimization to prevent an ON or USING clause
on the left side of a RIGHT JOIN from being pushed down into a subquery that
is on the right side of that RIGHT JOIN.
[forum:/forumpost/a7d4be7fb6|Forum post a7d4be7fb6].
Also add comments to describe previously undocumented push-down optimization
restrictions.

FossilOrigin-Name: da3fba18742b6e0bd5290bee9d86a2d5cb1ff2de25d737ef93060d7c1143273f
2023-05-10 00:33:21 +00:00
larrybr
5fbb2adf7d Fix bug in fall-back logic of CLI .clone
FossilOrigin-Name: 0dcd9785c11e33e6393b7c1be1ff8fe7129f280439aed12de22d4687609a8bac
2023-05-10 00:20:42 +00:00
dan
d9be387361 Fix recover1.test so that it works with DEFAULT_AUTOVACUUM builds.
FossilOrigin-Name: 4ffae48e831eedf8f5e61dc6d38817c0fdccfb2f4f1189d07f9722b9e3a48b5e
2023-05-08 16:26:22 +00:00
drh
bbd0ae2e87 Improved error handling when ".open" fails in the CLI.
FossilOrigin-Name: 38544b11f0e19cc6c6f8230a89d28e36c7c3587481deaac6cedbf82338ca0d47
2023-05-08 13:47:38 +00:00
drh
addc7e0e5b In editPage(), if an attempt is made to edit an empty 64KB page, then take
the slow path through rebuildPage(), in order to maintain strict invariants
in the editPage() code.
[forum:/forumpost/0f37727c0d|Forum post 0f37727c0d].

FossilOrigin-Name: a865e574e510c1ca192d0bd5293fb583def90f7ed086af2c89ca856ce93d115b
2023-05-08 13:38:14 +00:00
drh
c42bbfc550 Ensure that the label for a JSON object really is a string and not an array
or object that just happens to end with a string.
dbsqfuzz 32f62ed8676d0a153dbe756aeae3202d3670fe50.

FossilOrigin-Name: c335737c2889722ea05b732a5efff8a2f31140c18ca038c41e05c2a26e0db5bd
2023-05-08 11:11:08 +00:00
dan
6d841fdc89 Add tests for recovering data to a lost-and-found table from a utf-16 db. No code changes.
FossilOrigin-Name: 832f6e9f797eecb9a3dae4e7e20c70eda1e91372e9d3ce4223d57f26582cdbd2
2023-05-08 10:51:35 +00:00
drh
28f32bedd1 It turns out that pagerExclusiveLock() can be called with the lock state
already set to RESERVED if the SQLITE_FCNTL_PERSIST_WAL setting is set and
a specific sequence of multiple journal mode changes occur.
Enhance pagerExclusiveLock() to deal with this.
[forum:/forumpost/8130545bc6|Forum post 8130545bc6]

FossilOrigin-Name: 2bb8d977392f635515aa4a36f6f763a2e4858f7adc1120519e2e74c04a9749b5
2023-05-07 03:23:32 +00:00
drh
4e73863fd4 Fix a comment in the JSON logic. No code changes.
FossilOrigin-Name: 3f30ea5ec9d849c64d8c38f4fffbc06c749ecff91ab90bc29b3a3cc9ec5b9df0
2023-05-05 20:22:06 +00:00
dan
77eb3e305c Fix a buffer overrun that could occur when using the format() function to format a very small real value with the "," modifier.
FossilOrigin-Name: 910e770ad4d8e8e45bf069af963f2e975bfcfb882578dc5fe714cd2396258934
2023-05-05 19:36:13 +00:00
dan
ed96436f23 Reduce the maximum depth of nesting in json objects to 1000.
FossilOrigin-Name: c7697a0d45bfab20ec09f17ad65e375ddb43af6762278481c13a65c9a784978e
2023-05-05 15:52:44 +00:00
dan
3e49355e17 Do not attempt to run json502.test with SQLITE_OMIT_VIRTUALTABLE builds.
FossilOrigin-Name: 6664850647cd314c076842df5bf94e4f12d9be7fb56795b2af25f15c1267fa4d
2023-05-05 15:28:35 +00:00
drh
e030619109 Updates to compile-time option usage and especially to the compile-time option
test script in tool/omittest.tcl.

FossilOrigin-Name: fece588b186c4f9f76d626313e35336fd5681e966e9bd0fa1053b147c4e3c315
2023-05-05 14:16:31 +00:00
drh
fb18d81038 Fix the pager2-3.1 test case so that it does not run if a required
dependence (shared-cache) is omitted from the build.  Fix for
[forum:/forumpost/7a028538a7|forum post 7a028538a7].

FossilOrigin-Name: a77c8a780f884d0cb01d20912cf1aeec0bb7f3999d23117fe5bd82bc4405d483
2023-05-05 14:14:10 +00:00
dan
cad6aae45e Allow virtual tables to prepare writes to shadow tables in defensive mode from with xRelease() callbacks - even if the xRelease() is invoked from within sqlite3_finalize().
FossilOrigin-Name: a17106494a8a67bc92cfe27ee8ef9bf160517d6930d796980ae12287b98c1cfe
2023-05-05 11:47:31 +00:00
drh
0498caec89 Improved formatting of comments on SQLITE_CONFIG_xxx defines as those
comments are used by documentation.

FossilOrigin-Name: 2cb840bc9df81f76699f742e5db03835f4c272548cca0e6d24412503db3d76b3
2023-05-05 11:33:59 +00:00
drh
d2bef86709 Add the "subsecond" modifier to the date/time functions.
FossilOrigin-Name: 6fcb5a941fba0449d017954590bde7da74e5a1f8fd9b3e1febdff9bed1f22051
2023-05-04 20:28:19 +00:00
larrybr
88813681c2 Add some tests of subsecond modifier for date/time functions. Sync with trunk.
FossilOrigin-Name: 6499ebff545e663198bd0534be205a4e9ca68c7fb20fdcfa54fae4d9b79bfe3a
2023-05-04 20:19:33 +00:00
drh
6242c9386f Enhance the format() function so that the "," modifier works for floating
point numbers in addition to integers.

FossilOrigin-Name: 83683e108bce83c105bbcce1aa62880d8f14ebf3383d87d83a1e5c85026a7817
2023-05-04 14:44:53 +00:00
drh
e8468098a0 Add support for the comma (,) modifier to %f formats in the format() function.
FossilOrigin-Name: 7080e196a1f887640ff51ddc508ec6796ce12874c2944855702753b64a8e5e50
2023-05-04 13:07:49 +00:00
drh
c1e40a3a02 Fix a bug in cursor hints that can cause references to tables that have not
been opened.  Cursor hints are intended for use by COMDB2 only and should not
appear in production builds, so this should not be a factor for the vast
majority of users.

FossilOrigin-Name: d3370d59cffb7ab982d6c620c93d22aa6a9dc786e1c4af95ca8d45ff0b9b7d6f
2023-05-04 11:29:15 +00:00
drh
62b28db5c7 Add another assert() to FTS5 to demonstrate that a pointer is never NULL.
FossilOrigin-Name: b8a84a1bf53fa07ef01c57c6db6329ba439774a262b3adcbe94e7bd77525e296
2023-05-03 14:10:05 +00:00
dan
3f23eb6813 Add an assert() to fts5_config to ensure that a potential OOM is being handled correctly.
FossilOrigin-Name: fe9c207657400f9d9f4e822eb658157bc147ed538e2701322f6f973933f023ed
2023-05-03 13:57:57 +00:00
drh
3442306989 Protect a macro argument with parentheses in FTS5.
FossilOrigin-Name: bc07fe51fe0c6bb50ca8ae1baefcc35c8f5395b2d0de641bf0b0cedc92d754d4
2023-05-03 13:48:33 +00:00
drh
dda2833a4e Add a comment to the [0512f82a2cde7447] change to link it to its TH3 test case.
FossilOrigin-Name: 1281d4d9d799ef83e6eb51d656ede82b4503d39adf169deb936b30ebfddd88b1
2023-05-03 13:33:37 +00:00
drh
69e2422973 Enhancement to showwal such that it shows what the page hash should be
on a hash mismatch.

FossilOrigin-Name: 960dc97083ed9a7bfa912010b9ea19114f51dd10e73d5c5bf06cc642ebd1a2e7
2023-05-03 13:03:30 +00:00
larrybr
6539977cfd Conform CLI double-quoted escaping to what its doc says.
FossilOrigin-Name: 910535ba518f35ecc64c980ad67e3af69008d1995235f52ab12db6cefdb6602b
2023-05-03 11:27:15 +00:00
drh
b4824b055c In the zipfile extension, leave the catalog list in a consistent state when
the last entry is removed from the list.
[forum:/info/f03f1e4c5a5c9959|forum post f03f1e4c5a5c9959].

FossilOrigin-Name: 1b489d008b7bda12f9bf92e246bc613ef61e9c74ace0652d6d088e5a6e0696f6
2023-05-03 07:30:15 +00:00
drh
ce2aa8bebe If the page size is wrong on the page1 content inside a WAL file, then
running VACUUM could trigger an assert().  This check-in changes that assert()
into a branch that returns SQLITE_CORRUPT.
[forum:/info/4ef9b37d74d2d2e8|Forum post 4ef9b37d74d2d2e8]

FossilOrigin-Name: 0512f82a2cde7447cb348d9fd620f39f2f0e359141903cde20f7ba30b5d34af3
2023-05-03 06:48:08 +00:00
drh
681307dc80 Improved detection of excess recursion on arrays and objects in the JSON
parser.  Fixes a problem detected by dbsqlfuzz.

FossilOrigin-Name: d40fd5924adaa8d6b1dd6b9a4087f64d496cf60096ae11c9229c59309c0d4844
2023-05-03 06:38:03 +00:00