Commit Graph

18330 Commits

Author SHA1 Message Date
mistachkin 041343dea1 Fix typo in the Makefiles for MSVC.
FossilOrigin-Name: 17dd2f7314e7eb124e0a2a7a6cf475850e87fe3041e6ce1e1fd71b38d54852a8
2017-11-21 21:15:17 +00:00
mistachkin c6bc15a804 Fix compilation issue (C99-ism) in the shell seen with MSVC.
FossilOrigin-Name: 9cb47430553f00216e9b06e3d8226b903da536152fac80a5b6f615508c933252
2017-11-21 21:14:32 +00:00
dan 1671a4141b Update the omit-table-from-left-join optimization so that it can omit tables
from the middle of the join as well as the end.

FossilOrigin-Name: 0cd82ee9a8413cf127b5ca65770e3f363bd579941cd592298d3b0c27715583f3
2017-11-21 20:53:14 +00:00
dan 41203c6cf1 Update the omit-table-from-left-join optimization so that it can omit tables
from the middle of the join as well as the end.

FossilOrigin-Name: 618ca9fe53d8d2d7b4f368e6ee404d5fceeecac0d689f32ab62af8a6cbb37401
2017-11-21 19:22:45 +00:00
dan 62a83d262a Fix a problem preventing the planner from identifying scans that visit at most
one row in cases where that property is guaranteed by a unique, not-null,
non-IPK column that is the leftmost in its table.

FossilOrigin-Name: 7fdb1e2ac2040dc47800a224d33a5c95d55200c480d46fedec1e97fb4f089ef7
2017-11-20 15:46:10 +00:00
dan 17f188e3cf Fix a typo in a test script on this branch.
FossilOrigin-Name: bff5dcfd2b29ee4834258914410a5dee69ec2727dd254053e3ebaf5090937694
2017-11-20 15:45:03 +00:00
dan 75dbf68b5b Fix a problem preventing the planner from identifying scans that visit at most
one row in cases where that property is guaranteed by a unique, not-null,
non-IPK column that is the leftmost in its table.

FossilOrigin-Name: 299d7ca52fec32f04ffd2b8561dd4b839e891792162f8b00259368683436b02d
2017-11-20 14:40:03 +00:00
dan de7c4ec72c Enhance the log messages produced in some cases if database corruption is
encountered by an SQLITE_DEBUG build.

FossilOrigin-Name: ee840a7669dd462af072625232ea4238198c9b94e1873f361c45f3b0985456f3
2017-11-18 18:07:17 +00:00
dan eebf2f5747 Enhance the log messages produced in some cases if database corruption is
encountered by an SQLITE_DEBUG build.

FossilOrigin-Name: 23a3128083834b5fc80adf45448f7dc65587c52761fb3c9483b80313b369406f
2017-11-18 17:30:08 +00:00
drh 2410243e9d Improved fix for ticket [da78413751863] that does not require disabling the
query flattener as was done in [005d5b870625].  This also makes the code
generator for vector IN operators a little easier to understand.

FossilOrigin-Name: 723f1be3d4a905a6a16333f8ef3e1067dcd4944497b303033c49946fc37c780f
2017-11-17 21:01:04 +00:00
dan 6bcabfe1a3 Add some missing "finish_test" lines to the end of test scripts.
FossilOrigin-Name: c21406ab3281480d3eddca0cdf5aea3abc224425ee52c10eed3ff702a0ae5c26
2017-11-17 20:07:19 +00:00
drh 9b1ecb67c3 New assert() statements in the rowvalue IN expression processing.
FossilOrigin-Name: 00c328317473cee8fd7bd92c58409a356337b727cfa562bd8de59350d978769c
2017-11-17 17:32:40 +00:00
drh 7fc0ba0f4c Clarification of comments on sqlite3FindInIndex(). No changes to code.
FossilOrigin-Name: 071cabd23cd010180711a138f891a0e358031dd128532def4f62c5764651bace
2017-11-17 15:02:00 +00:00
dan 7775e4a2b4 Do not count temporary databases that have been attached using ATTACH when
figuring out if a master-journal file is required by a transaction.

FossilOrigin-Name: 93e012a317c8a4bfb84327616a597acabfcb24417197eefdccb8031bcf64e0c0
2017-11-17 13:21:12 +00:00
dan 6cbc5074e8 Avoid creating a master journal if all or all but one of the databases in the
transaction is a temp file.

FossilOrigin-Name: 355d1232fd7314723afaa8d6b8b73506b09cbba1113a88b10204ba89be993508
2017-11-17 08:20:10 +00:00
dan cda185d3a2 Ensure that empty space on pages is zeroed before they are written to disk.
This helps with compressed databases, and stops valgrind complaining about
uninitialized bytes and write().

FossilOrigin-Name: 5ffec5db33137251090d45e2ca7e3e7823e3215ae89822d905923424ceba2ac2
2017-11-16 20:48:47 +00:00
drh 3dbb4acf07 Add a missing "finish_test" to the end of the stmtvtab1.test script.
FossilOrigin-Name: e0b5c0585e8530bd516b340093a46d8e358a731facb78da22d3208633c852804
2017-11-16 19:04:33 +00:00
drh ef302e8a67 Futher improvements to the .testctrl interface in the shell.
FossilOrigin-Name: 1ca3b8cce93e83fabe35c22cb726b8ce0883e0448afa3301ad0b53073055fa8d
2017-11-15 19:14:08 +00:00
drh 35f51a4460 UI improvements on the .testctrl dot-command in the shell.
FossilOrigin-Name: 5d66219c4706e11a9c2a1290224e7c17b19f74657e8239accfb4c6f6be6af9b5
2017-11-15 17:07:22 +00:00
drh 8c0833fb21 In the parse tree, combine LIMIT and OFFSET into a single expression rooted
on a TK_LIMIT node, for a small code size reduction and performance increase,
and a reduction in code complexity.

FossilOrigin-Name: 3925facd942c9df663f9b29b1e6f94f6be14af8c2b99eb691bfc836b4c220826
2017-11-14 23:48:23 +00:00
drh 65efeaca83 Add the ability to read from read-only WAL-mode database files as long as
the -wal and -shm files are present on disk.

FossilOrigin-Name: 00ec95fcd02bb415dabd7f25fee24856d45d6916c18b2728e97e9bb9b8322ba3
2017-11-14 19:34:22 +00:00
dan 219a3e0b32 Fix the SQLITE_ENABLE_UPDATE_DELETE_LIMIT functionality so that it works with views and WITHOUT ROWID tables.
FossilOrigin-Name: dae4a97a483bee1e6ac0271ddd28a0dffcebf7522edaf12eb5e0eba5fc62516a
2017-11-14 17:06:37 +00:00
drh 8b17ac1919 Improvement to a comment. No changes to code.
FossilOrigin-Name: 486949fc03706e0056439b52ce60931ea4ce0a65e391da7f6287fe13862de251
2017-11-14 03:42:52 +00:00
drh 2e9b0923ac Remove some branches in walTryBeginRead() that were
added by check-in [ce5d13c2de] but became unreachable with the addition
of logic in check-in [18b26843] that enabled read-only clients to parse
the WAL file into a heap-memory WAL-index, thus guaranteeing that the 
WAL-index header is always available.

FossilOrigin-Name: 9c6b38b9a96c11bdf9db4ea025720a4f49dcb723fa2e2776edc8453bce85c7e3
2017-11-13 05:51:37 +00:00
drh c05a063c68 In wal.c: improved comments, new assert() and testcase() macros, and
replace some magic numbers with appropriate symbolic constants.

FossilOrigin-Name: 13ec8a77a47aa471af587459f4094da0d06674c5960f0d34777bcb3d38bc413b
2017-11-11 20:11:01 +00:00
drh 870655bb9e Further comment improvements in wal.c. No code changes.
FossilOrigin-Name: 346388007de585083dc67ad865b91db7c7d7b78c10a06f8bb7c48767c326c47e
2017-11-11 13:30:44 +00:00
dan 3b61ebb8de Omit some extra code from non-SQLITE_ENABLE_UPDATE_DELETE_LIMIT builds.
FossilOrigin-Name: 72be33f9c84de3ec4afc40549482417456ca82c1d16b473dc034b144055271e5
2017-11-10 20:13:14 +00:00
drh 85bc6df2f1 Improved comments and variable names in the read-only WAL logic.
FossilOrigin-Name: d3c25740eec9a2a41c29e6e488fcf6587c1fb821147a442c29439b25a92154a5
2017-11-10 20:00:50 +00:00
dan dc32b448d3 Add further tests for the code on this branch.
FossilOrigin-Name: f8c4e33f4813e0c909064406b5cc17e2d465d8a48a50ede1d356b39479d3d669
2017-11-10 17:47:54 +00:00
dan ca3e3c3f1a Fix a problem involving "DELETE/UPDATE...LIMIT" statements that use an INDEXED
BY clause.

FossilOrigin-Name: 09f94c2c8199b0d23a45cc062ca9561f9e5ddfcba117100e41889ce199d21bdb
2017-11-10 16:14:26 +00:00
dan 26caf5bef1 Fix a problem with (DELETE...LIMIT) statements against WITHOUT ROWID tables
with a single column PK.

FossilOrigin-Name: 35477a3dcceadf5dade8e036d5a2ce91b9ca83c4b85d309db233bdbcf538b1cc
2017-11-10 15:42:21 +00:00
mistachkin aca84e6a8b Fix harmless compiler warning seen with MSVC.
FossilOrigin-Name: 3711ef2366af8fefccaaa0a6ee520ce6bc9c74a4fe0666f0a85ef96be46e02d3
2017-11-10 12:41:21 +00:00
mistachkin 0e026f403b Avoid superfluous SHM unlock call in the Win32 VFS.
FossilOrigin-Name: 5a384be6979b783d1f3af2ac6307e7e731c415d052f9405f04c0216f59414633
2017-11-09 23:24:29 +00:00
mistachkin 10813713ba Cleanup superfluous whitespace changes.
FossilOrigin-Name: a2908e2c88f7a30638a7e791fc7ad0325b663097c12cecd1f4726b0d60a9a3ed
2017-11-09 22:25:58 +00:00
mistachkin 7b7f224c62 Revise and vastly simplify the Win32 SHM file locking semantics, allowing all new tests to pass.
FossilOrigin-Name: d0997b0f5bc9a9869684e39a17a01c430d6383c8b31d6c00ea17a5eac15bc6f0
2017-11-09 22:23:50 +00:00
mistachkin 95a05aae67 Add an assert() in the Win32 VFS.
FossilOrigin-Name: 22e58330461736ca22d6f4d7eab897a3597de2e7434a6f4a474f0f0d7f964281
2017-11-09 20:37:37 +00:00
dan e941877806 Enhance walro2.test to better ensure that readonly_shm clients are not using
invalid *-shm files.

FossilOrigin-Name: ff630b66714b20c09888ead0a45f344d63e0d9a5208867d6266e74f79187076c
2017-11-09 20:34:35 +00:00
mistachkin bcb416a9ff Get read-only SHM file tests passing on Win32.
FossilOrigin-Name: abef05353554e72f4d08aff562b87ff8530e8537a79e58d831205ea8c46eed07
2017-11-09 20:02:44 +00:00
dan b3c16b899b Add SQLITE_ENABLE_UPDATE_DELETE_LIMIT for views and WITHOUT ROWID tables.
FossilOrigin-Name: 584b88aaf89ab30cb51185396b7b50c6ecba286add023a26ab41d865b9c605ce
2017-11-09 19:53:06 +00:00
mistachkin 9f4aad446b Further corrections to read-only SHM file handling on Win32.
FossilOrigin-Name: 43c311701bdf1202918cd46fa6133a11458e0ef8ddb09e46290a231083f395ce
2017-11-09 18:53:51 +00:00
mistachkin a515065649 Corrections to Win32 lock detection for SHM files.
FossilOrigin-Name: 3a91be975daee65c3e1199855613066015d5df8ad44ababdef31d1c698b5e746
2017-11-09 18:21:51 +00:00
mistachkin 8a6fa5d41c Corrections to the Win32 porting changes on this branch.
FossilOrigin-Name: 0b26a5a26d700e20eea5ebbd620af0af6f2d61c652cfca5b8563267588cb2be6
2017-11-09 17:29:18 +00:00
mistachkin 4a9ff91852 Make it possible to use OSTRACE for multi-process testing.
FossilOrigin-Name: 0a7d416c4c43632725dc89cda8667cd9726b5152ee4692e4d0c9e2031e60cfb4
2017-11-09 17:29:04 +00:00
mistachkin 4ff8431fd1 Initial work on porting the changes on this branch to Win32.
FossilOrigin-Name: 3738bfd0c0eadb10eea58954af5052cb6ce164059f3aacfe65d7da6a400c63c7
2017-11-09 16:30:55 +00:00
drh 2fba394c97 Disallow ORDER BY and LIMIT on UPDATE and DELETE of views and WITHOUT ROWID
tables.  This is a temporary fix for ticket [d4beea1633f1b88f] until a better
solution can be found.

FossilOrigin-Name: 62fe56b59270d9d7372b1bb8a53788a40d20d0f111fe38c61dd6269848592c70
2017-11-09 03:55:09 +00:00
drh 9214c1efe8 Extra comments on the sqlite3OsShmMap() call in walBeginUnlocked(). No
changes to code.

FossilOrigin-Name: 033ee92bf4d5dc57f5cb8fd02d1154ae06f2d3261d214e7191a82c70c8ffebf7
2017-11-08 19:26:27 +00:00
drh 7316960cec Turns out that SQLITE_READONLY_CANTLOCK is an historical name that must
be preserved.  So make a new SQLITE_READLOCK_CANTINIT name instead.

FossilOrigin-Name: 04974a8b5c0e6748216226006ca9125529c8bb2a7a9df4641217eb1413426a14
2017-11-08 17:51:10 +00:00
drh 7e45e3a5d7 Change the name of SQLITE_READONLY_CANTLOCK to SQLITE_READONLY_CANTINIT.
FossilOrigin-Name: 6d7f94faa7e6de62f82bc6cac019508a9c1ffd6fa1d14f52fa93e9c06afdd32f
2017-11-08 17:32:12 +00:00
dan 3e846cb81f Fix a problem causing LSM to add unnecessary padding to empty segments in
compressed databases.

FossilOrigin-Name: 1bc2d04645c5239ba9a30a13f6fb3c8cc46461c864e7927012bc0ad305eb705e
2017-11-08 11:14:53 +00:00
drh 592eca1fda Improved comments used for documentation of sqlite3_vfs. No changes
to code.

FossilOrigin-Name: db8f22d069b1725f16b208c96c0c47b6ab0e30236feeac43cca4217ef80316b8
2017-11-08 02:50:09 +00:00