Commit Graph

6342 Commits

Author SHA1 Message Date
dan 154cc74601 Only run sync2.test on unix, as it depends on instrumentation in os_unix.c.
FossilOrigin-Name: ecb9321e18dd72ea18d197c61c4d69500e9c4282c0eac67822cb40b2710a2815
2017-03-20 15:11:40 +00:00
drh 978896e0eb Fix the check.test script so that it works on Windows.
FossilOrigin-Name: 8822eb5d790bf8d4302c3f2dc05ab672193b309fb11771c4b3eea8a77f37e299
2017-03-20 14:44:07 +00:00
drh 544cab7651 Set a reasonable limit on the number of opcodes in a prepared statement
for ossfuzz.c.  This should prevent timeouts in OSS-Fuzz when it generates
totally unreasonable queries.

FossilOrigin-Name: f74899ed2c78019abb406432a74dcd42a0ff8d9add005f8544dc4a8905f232eb
2017-03-17 22:51:28 +00:00
drh f53524b4f7 Add the --show-errors and --show-max-delay command-line options to the
ossshell test program.

FossilOrigin-Name: 626bdca98e0cd78ae873d97e75bb7d544ca18759c9f1e67f4adf03daca7fe5bf
2017-03-17 14:59:40 +00:00
drh a3b2da9889 Fix a problem in the enhanced PRAGMA integrity_check where it verifies
CHECK constraints: Do not be confused by the reuse of the Table.pCheck field
by VIEWs with named columns.  Problem discovered by OSS-Fuzz.

FossilOrigin-Name: 019dd3d5ba4a596c4ec3b5f0de8402c72196af0faca9138edbc0f1f4957cae60
2017-03-17 03:21:14 +00:00
dan f5da7dbb07 If the user has not set it explicitly, set the "PRAGMA synchronous" setting to
SQLITE_DEFAULT_SYNCHRONOUS when a database connection changes from wal to
rollback journal mode.

FossilOrigin-Name: 78030c0f52aa39fb2ab32c75c56e6bcefe6382b8df28b1909e3c911e42dbeca3
2017-03-16 18:14:39 +00:00
dan 116b56a2cc Fix a crash that could follow an OOM condition in the instr() SQL function.
FossilOrigin-Name: 6e59e903e4e956617bddef0b94e5cae02d724ac8145940b57ab5b0f628759736
2017-03-16 12:11:07 +00:00
dan c3becddb75 Fix a segfault that could occur following an OOM error in the
flattenSubquery() routine.

FossilOrigin-Name: c6dda3f752c184f441624c9993e77d5031063d79a0e177b6e25a9886514a742e
2017-03-13 14:30:40 +00:00
drh bbc0177460 In the OSSFuzz test module, invoke the progress handler much more frequently
so that timeouts are detected punctually even if the test script is running
opcodes that individually take a long time (for example, an OP_Function opcode
that invokes "randomblob(1.5e6)").

FossilOrigin-Name: f3b6959c04c4ef7b8ff03582b867012a869d52b4a90a0d7ab079ee4c21be5464
2017-03-13 13:45:29 +00:00
drh a6bf20b587 Fix an error in the SQLITE_MAX_MEMORY implementation resulting from a bad
merge.  Update the OSSFuzz interface so that it times out after running
the byte-code engine for 10 seconds.

FossilOrigin-Name: f8560c60d10c0365b33342ab05b5a953987b0471
2017-03-10 17:03:11 +00:00
drh fb546afb4d Remove the test/dbselftest.c program. In its place, add the ".selftest"
command to the CLI.  The new CLI version is .selftest is slightly different
in that it uses SHA3 hashing instead of SHA1, so the new is subtly 
incompatible with the old.

FossilOrigin-Name: f4fcd46f08ba59d2a3e772cad98383129f648386
2017-03-09 22:00:33 +00:00
drh f42d318002 In the CLI, avoid unnecessary identifier quoting in the ".dump" output.
Also add new ".dump" test cases.

FossilOrigin-Name: de65f907610a59e64cbf2214789c11f7117a86a6
2017-03-08 12:25:18 +00:00
drh e611f14471 Add the --preserve-rowids option to the ".dump" command in the CLI.
FossilOrigin-Name: c60aee24714a47ce12ee2a4dcefb9f55211d3761
2017-03-08 11:44:00 +00:00
drh 063d57039e Merge updates from trunk.
FossilOrigin-Name: 5f7fc79aa06ca9b79664c50c3c277c98a74ff9a0
2017-03-06 11:39:34 +00:00
drh 35a0925a23 Fix another corner-case for the 'start of ...' modifier in the date/time
functions.  Related to ticket [6097cb92745327a1].

FossilOrigin-Name: 8831f4393dda42b3434e7767968caea84bbca2af
2017-03-03 20:43:43 +00:00
dan 30741eb0d3 Fix a case introduced by [4cd2a967] where a corrupt database could cause a buffer overwrite.
FossilOrigin-Name: 5d0455fece514552ad7f283d56526f53d7c688bd
2017-03-03 20:02:53 +00:00
drh 9715f7f033 Fix a bug in the 'start of ...' date/time modifiers when they follow a
julian day number.  Fix for ticket [6097cb92745327a1].

FossilOrigin-Name: 081dbcfb6d82528cefecb36c4491fa6e1a790b17
2017-03-02 23:40:21 +00:00
dan cb1b0a693a When saving the state of an RBU update in the incremental-checkpoint phase,
sync the database file. Otherwise, if a power failure occurs and the RBU
update resumed following system recovery, the database may become corrupt.

FossilOrigin-Name: edee6a80e1cc7e6a2b8c3c7f76dd794fc8ab9a72
2017-03-02 14:51:47 +00:00
drh 8d990b34db Merge recent trunk enhancements.
FossilOrigin-Name: c60cdb47612c05c252613e50a8ac10635469fdfe
2017-03-02 13:22:04 +00:00
dan 9c58b63c18 Add an sqlite3_set_last_insert_rowid() method. Use it to work around fts4 and
fts5 modifying the last-insert-rowid unintuitively from within commit
processing.

FossilOrigin-Name: fe41bb5632a5d438acfd682809f1bd12315b970a
2017-02-27 14:52:48 +00:00
drh 114ce7a4b1 Merge integrity_check and other improvements from trunk.
FossilOrigin-Name: fe073905081b421405ca425ca03c5b8b0ff5f2c8
2017-02-22 19:49:54 +00:00
drh 8a284dcefe Enhance "PRAGMA integrity_check" so that it verifies CHECK constraints.
FossilOrigin-Name: 549bae0856004ff65b505175460abd598b30fe57
2017-02-22 14:15:37 +00:00
drh 5e98e838da The analyze_as_needed pragma now responds to table size growth and will
automatically rerun the analysis after each 10x size increase.

FossilOrigin-Name: bfbdd07409688fac4ccddbab3639745f6152e23d
2017-02-17 19:24:06 +00:00
drh a3928dd7be Set the TF_StatsUsed flag on tables when the query planner outcome is
affected by the sqlite_stat1 data.  Also, change the column names of the
"PRAGMA stats" command so that they are not keywords.

FossilOrigin-Name: fb2b8ae8310e4ea4b42354bbf36c3084a9d5c6d7
2017-02-17 15:26:36 +00:00
drh 7898bfff26 Fix a test case that was made to fail by the LIKE optimization enhancement
in check-in [158290c0ab] but which went unnoticed because test builds were
running with ICU enabled and ICU disables the LIKE optimization.

FossilOrigin-Name: 218b2bbb0de07288889f6762d4461ea8acd78969
2017-02-17 02:04:31 +00:00
drh 3a3b420abb Query planner optimization to detect empty tables in a join early and bail out
without doing excess work.

FossilOrigin-Name: 58797e9bafa95709e0f706a15f42f93b409e2db5
2017-02-15 22:36:15 +00:00
drh d2f92c26d5 More realistic lengths of string values in speedtest1 with --testset orm.
FossilOrigin-Name: e4731fd65f9698817690b741cc454f25e8e871e6
2017-02-14 16:30:13 +00:00
drh a829054049 Fix a testcase number on the ORM testset of speedtest1.
FossilOrigin-Name: 58b2f911eec2e3eb9944dd6d8573ff5c7bd43f70
2017-02-14 15:58:58 +00:00
drh a8207f488f Add the new "--testset orm" to the speedtest1 utility.
FossilOrigin-Name: 1836adc1d1f8e496ae0a07bf0fc933a19dc8fee5
2017-02-14 15:57:11 +00:00
drh 13ac46eea2 Ensure that indexed expressions with collating sequences are handled
correctly.  Proposed fix for ticket [eb703ba7b50c1a5].

FossilOrigin-Name: 9689d04b8250139e32078b2aa9748edcc6231bcd
2017-02-11 13:51:23 +00:00
drh 1c84bd4787 Enhance the LIKE optimization so that it works for arbitrary expressions on
the LHS as long as the pattern on the RHS does not begin with a digit or
a minus sign.

FossilOrigin-Name: 158290c0abafde67ee3f2363f0b6646887841df3
2017-02-10 21:37:57 +00:00
drh 2c338a9d9a Add the "," flag to printf().
FossilOrigin-Name: 064445b12f99f76e9a12957be97edd520ab3ae27
2017-02-10 19:38:36 +00:00
drh ec26ce3328 When generating the hash on the sqlite_master table in dbselftest, use an
ORDER BY clause, since the sqlite_master table is reordered by VACUUM.

FossilOrigin-Name: c8bfd99b96608a08f934f46b4e1a4d0f1cc69ea7
2017-02-07 21:44:40 +00:00
drh 134e527091 Fix harmless compiler warnings in dbfuzz.
FossilOrigin-Name: 61242267824135a9d5438ec15e3352a2f21dc2fc
2017-02-07 21:00:44 +00:00
drh b67e175448 Fix harmless compiler warnings in kvtest.c
FossilOrigin-Name: db6b39937dd9d6fcd5fcc582c8dd529caad755da
2017-02-07 20:57:00 +00:00
drh cbc65e5f4f The dbselftest utility now generates hashes in the selftest table with --init.
It also accepts multiple database files on the command-line.

FossilOrigin-Name: e68829c9bbc69bf4a0dc057e0a6e977f2fac79be
2017-02-07 20:51:38 +00:00
dan 18b20c981d Omit fts5fault1.test from the inmemory_journal permutation.
FossilOrigin-Name: cb1e83f9583bf93ce7583d9f5e97272e2d43cfb8
2017-02-07 19:36:14 +00:00
dan a7fc253d42 Update a test parameter in malloc5.test to account for the increase in default
lookaside buffer size.

FossilOrigin-Name: be82d5ae20ba62a165bdc28766a8dc8049abcac6
2017-02-07 19:23:51 +00:00
drh b9e9bc1de6 Add the initial version of the "dbselftest" utility program.
FossilOrigin-Name: 1fcac8365e0f7bcfd55442d718da6626c864d45a
2017-02-07 17:36:12 +00:00
dan 2e9dceb432 Update an error message in corruptC.test.
FossilOrigin-Name: 722e57fe61162a82b8001c7b1d3e06174caa90b9
2017-02-07 16:15:48 +00:00
dan 821fad51b4 Fix a test case to account for the fact that sqlite3_blob_reopen() now returns
SQLITE_IOERR_NOMEM instead of SQLITE_NOMEM if an OOM occurs in the VFS layer.

FossilOrigin-Name: e11cc52389f61f6421179281877b119c02286121
2017-02-07 14:22:39 +00:00
dan 809955b504 Fix a bug in kvtest causing "init --variance 0" runs to generate single byte
blob values only.

FossilOrigin-Name: 6b0276f968d3c6430076c6e540907cf840d0f398
2017-02-06 07:37:50 +00:00
dan ff677b20fc Allow sqlite3session_apply() to apply changesets to tables that have been
extended using ALTER TABLE ADD COLUMN.

FossilOrigin-Name: b20ff81ff9c8af500ea96e0ba9d34524220a89f1
2017-02-04 17:33:30 +00:00
drh 59a40db3d2 Improved tests for the carray() table-valued function.
FossilOrigin-Name: 83a099f139aba03edac19c890a0019e922032a25
2017-02-03 15:16:25 +00:00
dan f62154d4ac Changes so that the pre-update hook and the sessions module work with WITHOUT
ROWID tables.

FossilOrigin-Name: 964bdc27f8f1b1db2e5c0c2a65c8156614cbe087
2017-02-01 14:10:24 +00:00
drh 9dc7ad1d7e Add the "stat" command to kvtest.c. Also add the --variance option to the
"init" command.  Add the tool/kvtest-speed.sh script used for doing 
performance testing on key/value access patterns.

FossilOrigin-Name: b63deed600b1a457a6960ebad5645f4de9c56e5d
2017-01-31 15:29:05 +00:00
dan cb9a364390 Experimental change to invoke the preupdate hook when WITHOUT ROWID tables are
written.

FossilOrigin-Name: 856f8604c59c8fdd9bfb7d86fc0e212f091ab49a
2017-01-30 19:44:53 +00:00
dan f64ece143c Avoid redundant table b-tree cursor seeks in UPDATE statements that use the
two-pass strategy.

FossilOrigin-Name: dc555b1039c6930f6d15355c698ff917a85e8056
2017-01-28 19:45:34 +00:00
dan 50133dea28 Fix a problem causing the pre-update hook to be invoked by DROP TABLE
statements.

FossilOrigin-Name: fbb6bf1b69cfd581b4ffd778c344e3fbd9c9406f
2017-01-27 17:02:26 +00:00
drh 2b15f6e11b Enhancements to the kvtest utility program. Add the --jmode option.
Improved output formatting.

FossilOrigin-Name: 62a4851ccf88837d1c16dae8204f7f264e80e3c9
2017-01-26 01:54:39 +00:00