Commit Graph

23773 Commits

Author SHA1 Message Date
drh e3afca73dc Version 3.38.1
FossilOrigin-Name: 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc
version-3.38.1
2022-03-12 13:37:29 +00:00
drh 3e7d815579 Fix a case in fts5 where a corrupt database could cause a crash.
FossilOrigin-Name: 1894577c8eff6d0cb586cc8cd3a8f6a2b5800b9aa6391261121f4e26c9ba5f8f
2022-03-11 12:40:18 +00:00
drh 401697bb54 Stronger defenses against corrupt schemas in the ALTER TABLE logic.
FossilOrigin-Name: 29744e69f473638796877bd073468046d4aeff209c0a0f30beee8c5f102112b6
2022-03-10 21:14:35 +00:00
larrybr c606152c7b Doc improvements re sqlite3_column_text*() endianness (no code change)
FossilOrigin-Name: a37c20d40f97570575abb1f1db31dbc934300e7f2294d38fe41850baedb3766f
2022-03-10 19:53:49 +00:00
drh d8659ad141 Prevent a NULL-pointer dereference when trying to parse a illegal
schema entry that contains a window function while doing a RENAME COLUMN.
[forum:/forumpost/ec2a2e0deb|Forum post ec2a2e0deb].

FossilOrigin-Name: 2c393228257490efcf609f3e428f0d02c74cbea48a28763b2414e69a4ced66da
2022-03-10 16:28:13 +00:00
drh 4acead62b1 Check-in [642a0b4752743216] fixing sqlite_dbpage is not exactly correct.
This patch should fix it.

FossilOrigin-Name: b6c4c8a09a63693dd515d30a9f07f67ed81dc14df2586835fcb2b1bc6a9d01fc
2022-03-10 01:15:35 +00:00
drh c36de71968 Further refinements to the sqlite_offset() fix from [6029514b08b88e3f].
FossilOrigin-Name: 98799d7bbb6d62d71862d5fdfe87856995dd179d66612e369c5dc440e7fac31a
2022-03-09 18:30:55 +00:00
drh 468657ec19 Fix the sqlite_dbpage virtual table so that it starts a write transaction
on all attached schemas.

FossilOrigin-Name: e92c4fdb99eb09507e6b970067c1a6f2043838f67017125851469d66c1bb5b20
2022-03-09 14:29:33 +00:00
drh 3b7520b747 Fix a potentially uninitialized local variable in the ".import"
command of the CLI - introduced by [741651fd4b1b776b].  This same change
is part of the nearby [/info/5e30c6ea707f9d38|"Fix compiler warnings"]
check-in.

FossilOrigin-Name: ce9e3d903c2e5993a3fdadaf809ce2026efd1b5b933930b50dd794c9a7329cdd
2022-03-08 16:12:53 +00:00
drh c2384cdbea Disable an assert in moveToRoot() when the database is corrupt.
[forum:/forumpost/e9a176b7bd|Forum post e9a176b7bd].

FossilOrigin-Name: ab744a5da80ddcd5c7cce60626d82c0e368f675b8a11bfb93b4739ea30bb07c0
2022-03-07 18:38:12 +00:00
drh 54068138f0 Do not allocate new Trigger objects in the parser following a syntax error,
to avoid violating invariants associated with Expr nodes.  See
[forum:/forumpost/2024e94071ef1531|forum thread 2024e94071ef1531] for more
information.

FossilOrigin-Name: 369d240455a2806afb1699273864bca3f84b163c6b1f93807c9147437001132b
2022-03-07 16:40:44 +00:00
drh 312d0ec0a7 Fix the code generated for vector IN operator constraints on virtual tables
so that they work even if the "omit" field in the sqlite3_index_info object
is off.  This has apparently never worked correctly before.  Presumably, nobody
has ever before written a virtual table that can use vector IN operator
constraints and that relies on bytecode to double-check the constraints.
Test cases in TH3.  Problem discovered by
dbsqlfuzz cab8e26194a40147627094f3c6849c0a7b1e0310.

FossilOrigin-Name: 4a2040d5c78f42b892a080ba086f6ab32f59bb9c31b897af40c4359cdb17b0e9
2022-03-07 14:59:45 +00:00
drh 135f5fb747 Fix the .import problem in the CLI reported by
[forum:/forumpost/72a024c957|forum post 72a024c957].

FossilOrigin-Name: d753285bcbb68bdf8f6d95a64af58b20ce6da9f048734fdb0ae49150eb7befd4
2022-03-07 01:28:13 +00:00
drh 2614c7c873 The sqlite_offset() function should be non-deterministic.
dbsqlfuzz 3df8230bb940870db87ffca2c0fc759c1e7fa356.

FossilOrigin-Name: 8083757606920151171530f337919553fa8ba902a51744d7b21eeba1558db9fa
2022-03-06 11:44:14 +00:00
drh b9d060e934 Remove a NEVER() associated with sqlite_offset()>
FossilOrigin-Name: bf2501e26c8e4c08d679ea930bab89b9510808439aee9412ab176a9d29635cc7
2022-03-06 00:01:10 +00:00
drh 7b7932bed3 Fix the 'localtime' modifier in date/time functions so that it preserves
fractional seconds.
[forum:/forumpost/2ffbaa2c3fd7fb82|Forum post 2ffbaa2c3fd7fb82].

FossilOrigin-Name: 6833f4aeef4923c3633978720277ccbfc63b26c96092c12a6330e6d4629b5eb5
2022-03-05 20:20:45 +00:00
drh 1909223648 Increase the version number to 3.38.1.
FossilOrigin-Name: cd87e77dd062b6b9479c14f28bf7b94db86e3538d8977dc46f92fab8674dbec8
2022-03-05 19:46:17 +00:00
drh c95b28ebea Cherry-pick all bug fix changes since the 3.38.0 release.
FossilOrigin-Name: 45a5d5acf712cccf6d7043412fb21541ec00081d10fbd85421014677470a74f2
2022-03-05 19:39:19 +00:00
drh 98095e3949 Version 3.38.0
FossilOrigin-Name: 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab
version-3.38.0
2022-02-22 18:58:40 +00:00
drh 60f3657b4a Fix an undersized memory allocation in the test harness for RTREE. This
error was in test logic only, not in the SQLite library itself.
[forum:/forumpost/35470a0a72a005e1|forum post 35470a0a72a005e1]

FossilOrigin-Name: 7e3c9594390ac8defaf9825e14b4c19ef8c123b747971dd3d4df16110f443d3b
2022-02-22 15:47:55 +00:00
drh 16f56e8416 Fix compiler warnings for older compilers (ex: gcc 4.0.1 powerpc-apple-darwin).
FossilOrigin-Name: 5c188243d769681c68938c8e432155c8ec838d9e32fe8d1b12286ebc9d0e87f1
2022-02-21 14:30:59 +00:00
drh a12500005f Remove stray tab characters from auxiliary source code files.
FossilOrigin-Name: e25e33582b69289a2c3a6bc403e3911de22a3b529db1a565efb9f1af01b9e382
2022-02-21 13:44:51 +00:00
drh 91260dcf83 Add SQLITE_OMIT_JSON to the compile-time option test sequence.
FossilOrigin-Name: f36325a6e21c4d3b6ab48ebfb2efabda089281344d1e61949d1c9290e88395b1
2022-02-21 13:02:23 +00:00
drh d01a1bd94a Do not allow error messages from sqlite3NestedParse() to leak up into the
main parse.

FossilOrigin-Name: 9c4e21abdca664d6b7bcf0043fe9ec05ef8b2949ba6ee7208abaaec1ff4ed679
2022-02-21 00:23:49 +00:00
larrybr a7919add6a Improve .backup and .save help text
FossilOrigin-Name: 741651fd4b1b776b4dea156cdc987f426f7c668ece203bda6654b2c7117c8933
2022-02-19 21:25:48 +00:00
drh 1ff855b22e Add a NEVER() to a branch that is unreachable for STAT4.
FossilOrigin-Name: e4e97505af4016c48465009686bfeffe9627e225a5b2082a5bf4baeee40db5c9
2022-02-19 15:57:28 +00:00
drh b15a3940d1 Enhance the documentation on sqlite3_stmt_readonly() to explain that
EXPLAIN and EXPLAIN QUERY PLAN do not affect the return value.  Add test
cases to verify this.  Add new test cases and requirements marks for
complete requirements test coverage on this interface.

FossilOrigin-Name: a6fbb7ba0583b3981e2d8b809006b902b3e97e516dbd3ab7d905c5ea73df2272
2022-02-17 17:24:39 +00:00
drh dedd51aed4 Remove references to the now-defunct SQLITE_ENABLE_JSON1 compile-time option.
FossilOrigin-Name: db950192c93db7f5eb4ffcce41d0ea374c58450405945cfb8ebe0c93070b7c48
2022-02-17 14:33:13 +00:00
drh 24ea5fb3e8 Fix a testing error on Windows that was recently added to shell5.test.
FossilOrigin-Name: 6cace54320997dcbbdd49017f20eecafa88ebcc4b264ee800954f25d9605023d
2022-02-17 14:29:39 +00:00
drh be4e3c88f5 Make the sqlite3_error_offset() interface accessible from TCL using the
new "erroroffset" method on the sqlite3 object.

FossilOrigin-Name: 3454a1222bedefba527af98c0284ed0bfbd28dd941885d9a0ac9a44aea2fc8ec
2022-02-16 15:11:01 +00:00
drh 537a6bf189 Improved rendering of floating point numbers without a fractional part in
".dump" output from the CLI.
[forum:/forumpost/550d877659f37cb2|Forum post 550d877659f37cb2].

FossilOrigin-Name: 9edaeed56f2282fd4da935454178c38ab49d259aed96d4e720aae09050a53006
2022-02-15 13:23:09 +00:00
drh 0ca0988355 New assert() statements to help prove correctness of memjournal.c.
FossilOrigin-Name: d74ec88c2f9b9e056988add8322186750229e14a609d1a6969ba393a5b8c5174
2022-02-15 11:46:31 +00:00
drh e63b7bdac8 Generalize the in-memory journal so that it is able to accept writes that
begin at any offset less than or equal to the current file size.

FossilOrigin-Name: c039d5476e0836c16d8c1ad99a2620f7fd04eb4b0e5dcb2246b42dde2ae1f95a
2022-02-14 21:11:17 +00:00
larrybr 7d5113f0a3 CLI .import can auto-rename non-unique column names when it creates a new table
FossilOrigin-Name: 4b5d07ea7e6f5d6f1279c88bc474ee4bc8bd2cebe38a268f211f47e44569e4b1
2022-02-14 18:55:19 +00:00
drh 9a4e88604c Minor correction to the early corruption detection added by
[a6fda39e81d0da98|check-in a6fda39e81d0da98] so that it works even if
the page being cleared in page 1 of the database.

FossilOrigin-Name: a5ec16907ef6ab50e041101d87c5756c71469923872a86c3ab383f188673d7a5
2022-02-14 18:18:56 +00:00
drh 0aa0945111 Fix a bad assert() (it needs an "||CORRUPT_DB" term) in b-tree, discovered
by dbsqlfuzz.

FossilOrigin-Name: f5f263cc626d6a8bea3e85e28bb716e3eac0d9cd199cc060c0c8b0c77b280a45
2022-02-14 13:53:49 +00:00
larrybr 3363386145 CLI's .import column rename made more minimal, and reports renames.
FossilOrigin-Name: c626cff7f99ec502ebd46f9cdafc3d088697544ef5d6559b6b3ae85679b4f9fa
2022-02-14 01:12:46 +00:00
larrybr 42de1c52dd Sync w/trunk, fix zAutoColumns placement blunder, all to pass all TCL tests
FossilOrigin-Name: 67dc59f46d742ad69742fb34540a3074af163a3f1a0f9093f83db2276bf944ca
2022-02-13 22:18:22 +00:00
dan dfcb11de18 Do not run merge1.test with SQLITE_OMIT_VIRTUALTABLE builds.
FossilOrigin-Name: bf8dbfd499e732f14c7a8efee527e8ce155937dbb2a3e85213f8aa64ac497189
2022-02-12 18:56:24 +00:00
dan 02ede43da2 Fix a possible user-after-free in ALTER TABLE found by asan.
FossilOrigin-Name: 9252619d410293ddefd108f5cf81b6fb4932bd3f2ceaaa92abb7542e34f66111
2022-02-12 16:02:37 +00:00
dan 8443505dc9 Update fuzz.test to account for a change in error message made in the core.
FossilOrigin-Name: c57601b51f9b59e9d8f0eb06580fa14f49525e56bd0190c02865e478bd1f48e7
2022-02-12 13:45:02 +00:00
dan af7b8dcb58 Avoid dropping SQLITE_TOOBIG errors in the quote() function.
FossilOrigin-Name: 115c3051a1ff7567e84f14fc4c49efe61bc2850248533449b0195c305ab6516e
2022-02-12 13:37:27 +00:00
larrybr 43a196a3bb For .import auto-column, aid build-time override of rename decoration.
FossilOrigin-Name: 433e5ead2b711d1e3b0b62cf8cb5a8a65e2474c68ef2173317ed4323fc8bdc58
2022-02-12 13:12:03 +00:00
larrybr 0a704c3145 Fix auto-column bug noted by post https://sqlite.org/forum/forumpost/d102c15d63
FossilOrigin-Name: 689137e1b5bc78b0f16e5db86d16415b9fa77d22ded59e93d75e7033b465e673
2022-02-12 10:48:42 +00:00
larrybr 78138397b5 Sync w/trunk, allow build-time override of auto-column decorating character
FossilOrigin-Name: caaef4c592c980889efb349fa73b61303ec493172d90cd67d54ffde0855e4138
2022-02-12 02:15:37 +00:00
drh f17f607556 Fix a test in without_rowid1.test so that it is disabled without
ALTER TABLE support, as it uses ALTER TABLE.

FossilOrigin-Name: ca22a64e6f05a6688974f4cff1a0ff2c873aad1947f3cf6ffaeee8bb074b2627
2022-02-11 21:20:46 +00:00
dan 7b57aa3da9 Update some OOM tests of the ALTER TABLE command to account for an error message which may be returned if opening the temp db fails.
FossilOrigin-Name: 3409fd4150df059d7308f79fa3672a330af9cefe2ad9120c3da5ef1413921e96
2022-02-11 19:41:03 +00:00
drh eba21cd4be Load recent dbsqlfuzz finds into test/fuzzdata8.db.
FossilOrigin-Name: b275ad250d8aa286829647967ab7e75fcd2b5674caab1a34eab59d8486a34cd5
2022-02-11 17:47:58 +00:00
drh 11fc3c0fa7 Reference the wayback machine for the dead hyperlink to the MS support
page in the comments about why the extra typedef for va_arg().  No code
changes.

FossilOrigin-Name: ab1a9b5b78de7c00b38357b1df08e82ce5608a14f8c675ac20c5f2dad5212f50
2022-02-11 17:47:25 +00:00
drh 4ba1c5cc49 Fix an assert() in the pager by adding "|| CORRUPT_DB", in as much as the
assert() is not necessarily true if the database size in the header is
wrong.  dbsqlfuzz f2f996065b90988aa9b0ae425b66dbb296546a08.

FossilOrigin-Name: a51402e8c29fad2b24e32de55b10691fb0ebd6c2cebac941e43e54be211d5d39
2022-02-11 17:33:02 +00:00