Commit Graph

16225 Commits

Author SHA1 Message Date
drh
4bf7d21f56 Clarification of the pagerFlushOnCommit() logic.
FossilOrigin-Name: 3401d9dcdbec390564574e8d2972c944c204e025
2016-05-13 12:12:38 +00:00
drh
935c4d8484 Fix pager_end_transaction() to ensure that a ROLLBACK does not clobber
unwritten pages in a TEMP file pcache.

FossilOrigin-Name: 9495d33879221c1821331dc72c61a6a3d182f526
2016-05-13 11:50:00 +00:00
drh
7aeb216a19 Additional debugging and tracing logic for pcache.c, turned off by default
using an "#if 0".

FossilOrigin-Name: 32a62e3bd46cf58586617d3f8b1a971c91df205e
2016-05-13 04:24:25 +00:00
drh
5f65ff277d Disable ALWAYS and NEVER when compiled with SQLITE_MUTATION_TEST.
FossilOrigin-Name: 24d9fbc1d0f99b90577ecd6edcd3bc1abc76633f
2016-05-12 19:17:09 +00:00
drh
a7a45973e9 Simplification of the sqlite3FaultSim() call inside of
sqlite3PagerCommitPhaseOne().

FossilOrigin-Name: 1b0f4cc362cda1dc175aa363ae4e612b7d1164c3
2016-05-12 19:05:35 +00:00
drh
d22f5099b5 Add an assert in pager.c to confirm that pPager->tempFile is always true
for in-memory databases.

FossilOrigin-Name: 3fd71092063bf1d30e03cf2497ea9c57b3ec82eb
2016-05-12 18:38:45 +00:00
dan
82c0447701 Add extra OPTIMIZATION-IF-FALSE comments where required to pcache.c.
FossilOrigin-Name: 9d55b8f541de43deb82d460d32005fd62f5430b2
2016-05-12 17:06:04 +00:00
drh
91ef8ad42c For in-memory databases, it does not matter if pcache entries are marked
"clean" or "writable".

FossilOrigin-Name: 06c1e27ca868f247f8c27b03eb19aac004f28650
2016-05-12 12:08:48 +00:00
drh
42bee5f4d6 Remove an unnecessary call to sqlite3PcacheMakeClean() inside of the ROLLBACK
logic.

FossilOrigin-Name: 0dc50d9915cd88916229ca5c3834de82fa16f017
2016-05-12 12:01:20 +00:00
dan
613723d9fd Add a missing OPTIMIZATION-IF-FALSE comment to pcache.c.
FossilOrigin-Name: bc202e5b418d5a57bfc766883c4417c94829d96e
2016-05-12 09:48:23 +00:00
drh
72e6a39907 For in-memory databases, it does not matter if pcache entries are marked
"clean" or "writable".

FossilOrigin-Name: ad601c7962a60a11699cf31f1faee09b95d5c710
2016-05-11 23:54:14 +00:00
dan
401907e3ff Remove a redundant condition from pcache.c. Add an OPTIMIZATION-IF-TRUE comment to another condition that requires it.
FossilOrigin-Name: 3bfd2621d13b4f842f3af6d35519653f4eb8cad7
2016-05-11 20:03:23 +00:00
dan
b2ef900ade Remove some a small amount of redundant code related to PCache.pSynced from pcache.c.
FossilOrigin-Name: 9cc8cad78fdfe044ad6726ebfe6909c1e242fa55
2016-05-11 15:41:15 +00:00
drh
a37e0cfb22 Do not reset the page cache when a rollback journal truncate fails, as doing
so can cause loss of information for an in-memory TEMP file.

FossilOrigin-Name: 345ce1c9f64f2a424663b4dfcbe4586d9df7bff6
2016-05-11 12:47:46 +00:00
drh
65c6420335 Always truncate, rather than persist, the rollback journal of a TEMP database.
FossilOrigin-Name: 42fb6f1e99a6c31889819a0302679d598dc0ab1b
2016-05-11 11:04:17 +00:00
drh
5c8e092804 Add pcache tracing macros. Off by default. Requires changing an "#if 0"
and recompiling to enable.

FossilOrigin-Name: d9313d19c75a62f558b3df6b15595b15bbfa0b62
2016-05-11 10:57:04 +00:00
dan
78d1c90567 Add another test case to temptable3.test.
FossilOrigin-Name: 223640243efc52c14bb2bb540833a2a624eaa41a
2016-05-10 20:16:43 +00:00
drh
d12bc6022b Fix a problem in sqlite3PagerMovepage() when working on a temp table for which
pages have been spilled.

FossilOrigin-Name: 20cf8811caf705b482be100baecb3ef72aee2d5a
2016-05-10 20:03:08 +00:00
drh
3791c9c288 Fixes to requirements marks. No changes to code.
FossilOrigin-Name: 79ecd0ef20c12198e950a730871444a980a0f1b2
2016-05-09 23:11:47 +00:00
drh
83561932a5 Enhancements to test/sort5.test so that it works with SEE.
FossilOrigin-Name: 8a39c8ee49e6e80c83613546cf328801c80b7c4d
2016-05-09 22:35:06 +00:00
drh
f52a697e04 Remove some forgotten debugging lines from test/sort5.test.
FossilOrigin-Name: f5875489810101c13a7917bde86e6a23b088e386
2016-05-09 22:32:18 +00:00
dan
ba1079ba2a Update a comment in fts5.h. No changes to code.
FossilOrigin-Name: 14e53d0e2f62d82ae1d64a72fd9711548e3bf5ea
2016-05-09 19:03:42 +00:00
dan
170b66493d Fix the FTS5 xQueryPhrase() API function so that it recognizes column filters.
FossilOrigin-Name: 48505cde05d74748454dc135d4ec25954ecf020e
2016-05-09 18:05:44 +00:00
drh
e8da01c189 Make the sqlite3DeleteTable() routine smaller and faster.
FossilOrigin-Name: d75140b851a34a5eb66041e294e421628efbc5ba
2016-05-07 12:15:34 +00:00
drh
3eead27022 Fix typo in the intpkey-17.2 test.
FossilOrigin-Name: a45fda657d987f5c923d141584841a6c62dfb504
2016-05-07 12:15:15 +00:00
drh
f09c48233a Simplification to the logic used to decide between OP_Seek and OP_NotExists.
Use OP_NotExists for both DELETE and UPDATE.

FossilOrigin-Name: 3a695263183303e3f64eb2320752d0fdef53eaf2
2016-05-06 20:23:12 +00:00
drh
a3fd75d426 Corrections to comments on the whereScanInit() interface.
FossilOrigin-Name: ab7ab415d19524f6c3901e474d3a154f55d28530
2016-05-06 18:47:23 +00:00
drh
87f8f1ac69 For DELETE operations, make sure that seeks on the main table are not
deferred, since if they are and none of the indexes reference columns of
the table, the seek might never occur until the OP_Delete opcode, which is
too late.  Fix for ticket [16c9801ceba49].

FossilOrigin-Name: 93a2bace5704f7ecad56541a6b3e06a88f7f393f
2016-05-06 16:49:54 +00:00
dan
39332fb0f7 Fix an error in main.mk causing testfixture to use individual fts5 source code files instead of fts5.c.
FossilOrigin-Name: 933a1c818c1d1ccec8680e1ba87f2cbe37cc9f7d
2016-05-06 16:30:34 +00:00
drh
bcf6884afd In the WHERE generator, when building code for a DELETE operation, make sure
that seeks to the main table are not deferred.
This is a better fix for the [16c9801ceba49] bug than the previous.

FossilOrigin-Name: 150dd09ebd7b17234a79e1811a0fae8b0a7a40d5
2016-05-06 16:06:59 +00:00
dan
d49c6930b1 Fix a bug in sqlite_analyzer causing it report (slightly) incorrect values for the number of entries in indexes or WITHOUT ROWID tables.
FossilOrigin-Name: dc37750d4e87d0c529785adceeebd838b8f8591d
2016-05-06 15:16:02 +00:00
drh
70077d1733 Do not scan indexes that have the integer primary key as their left-most
column.  This fixes the crash of ticket [16c9801ceba] but it seems like
the wrong fix.  More investigation needed.

FossilOrigin-Name: 50312273ffaf1bd4bfdc73865fa0b19166968429
2016-05-06 11:31:10 +00:00
drh
ad5a9d715f Renumber internal constants in the printf() implemention for a small
performance improvement.

FossilOrigin-Name: 69d11447f4b1a8c536c3b6573d2a3419da870412
2016-05-05 11:53:12 +00:00
drh
4e80d5fcf1 Disable the session extension API if SQLITE_ENABLE_SESSION is not defined.
FossilOrigin-Name: 71af9ac165ac02272f4886f69bd9ab4770fd7bb6
2016-05-04 21:06:21 +00:00
mistachkin
9fe3fbbc35 Fix typo in comment. No changes to code.
FossilOrigin-Name: 6c43ba1c8753a4029e127078652f265c408a01c0
2016-05-04 19:04:20 +00:00
drh
91da707280 Only disable the one-pass DELETE optimization if the WHERE clause contains
a correlated subquery.  Uncorrelated subqueries are allowed.  This is a
refinement of check-in [3f221f592a9a1] that is the fix for
ticket [dc6ebeda9396087].

FossilOrigin-Name: aae389692a2ed2cc92151d51fb2cd5a16921c469
2016-05-04 14:45:30 +00:00
drh
582c080289 Portability enhancements to the configure script on the amalgamation tarball.
FossilOrigin-Name: 7184c4b8869ffc00944abdd8d2c521cb11ea5824
2016-05-04 14:20:15 +00:00
dan
c88ae52d86 Disable the PagerDontWrite() optimization for temp tables. It can cause database corruption if a page passed to PagerDontWrite() is dirty at the start of a transaction that is subsequently rolled back.
FossilOrigin-Name: 6341ab2ffef298ca16b323358afbea4a4c1fb0e1
2016-05-04 11:28:03 +00:00
mistachkin
12b35ea980 Minor style tweaks in the MSVC makefile.
FossilOrigin-Name: 1b43358f8979c4f18519e824e0d5f6ef2250107c
2016-05-03 19:40:54 +00:00
drh
799730bf81 The session extension is disabled by default. To enable it using
--enable-session on ./configure on unix and add SESSION=1 to the nmake
on Windows.  Or add -DSQLITE_ENABLE_SESSION and
-DSQLITE_ENABLE_PREUPDATE_HOOK to build manually.

FossilOrigin-Name: bcaa650e8796984b275eceba0ed477f360295d01
2016-05-03 14:57:07 +00:00
drh
5e18d40200 Turn the session extension off by default. Enable using --enable-session on
configure scripts, or using the SESSION=1 argument to nmake on Windows.

FossilOrigin-Name: e462cde2a50c39cc2f8d8624aada19280b8226eb
2016-05-03 13:14:18 +00:00
drh
48cd59a57d Avoid left-shifts of signed integers.
FossilOrigin-Name: 0715ce164333e27671efbec8796f238df98cc287
2016-05-03 00:04:55 +00:00
dan
39f98c52d0 Remove some randomness from test script temptable2.test.
FossilOrigin-Name: 5830cf72e9e870830d088399f1ccb03ed6522582
2016-05-02 19:05:05 +00:00
drh
b1c6995c58 Fix a test case in temptable2.test so that it works on systems that
lack a coherient cache (ex: OpenBSD) and thus do not support the
"PRAGMA mmap_size" command.

FossilOrigin-Name: 088cf83872f6477c3b297c58d6f8a5def7025daf
2016-05-02 16:59:49 +00:00
drh
cf7e7557b5 Fix harmless LLVM compiler warnings in the srcck1.c utility program used
during the build process.

FossilOrigin-Name: e4af967533f290862dfba1d9ef44d4c9ddd8a01b
2016-05-02 13:57:19 +00:00
drh
57a07ba9a9 Disable the multi-row one-pass DELETE optimization when the WHERE clause
contains a subquery.  Fix for ticket [dc6ebeda9396087].

FossilOrigin-Name: 3f221f592a9a19009076e568566c59801cd3fc32
2016-05-02 12:18:56 +00:00
drh
44aebff246 Improvements to the way the LIKE optimization is implemented, resulting in
slightly smaller and faster code that is easier to test.

FossilOrigin-Name: 54c63b329288729031f45b7778752552cd90e226
2016-05-02 10:25:42 +00:00
dan
40cf36ff17 Change the way tester.tcl handes $argv so that in "permutations.test <permutation> <filename>" <filename> may be the name of any file in the test/ directory.
FossilOrigin-Name: 820c57bb24ad3d8663ca512e4022268b940bb2ee
2016-04-30 19:23:10 +00:00
drh
2f55511dfa Remove an unnecessary branch from the OP_String8 opcode.
FossilOrigin-Name: 459a0b456da69112605b37adc9af27d79e35a4d7
2016-04-30 18:10:34 +00:00
drh
2e55b04da4 More bug fixes to Lemon identified by Kelvin Sherlock. None of these
have any impact on SQLite.

FossilOrigin-Name: 762bdc55f8878ee2ef65af2165a8e7fdbddf0160
2016-04-30 17:19:30 +00:00