Commit Graph

13185 Commits

Author SHA1 Message Date
drh
58cca03ce5 Enhanced "stress2" testing in the threadtest3.c test program.
FossilOrigin-Name: ae43539e62e76676a3daf561b629a1b9b4e2d2c9
2014-12-16 00:20:07 +00:00
drh
7efa426ee9 Make sure the sqlite3BtreeCount() routine does not leave index cursors in an
inconsistent state, as doing so might result in an assertion fault inside
of sqlite3BtreeKey() called from saveAllCursors() if content is deleted out
from under the statement that issued the sqlite3BtreeCount() call.

FossilOrigin-Name: 5b1b697040116048e464b3ebab8395fe088e389a
2014-12-16 00:08:31 +00:00
dan
1ee46c01b4 Changes to threadtest3 so that "stress2" is more similar to the SDS stress test.
FossilOrigin-Name: 5648af96d8e2521c5b0cca19f1358374d032394d
2014-12-15 20:49:26 +00:00
dan
9af10620ec Add new test file e_walauto.test.
FossilOrigin-Name: 62ef45140cdbff5eeb8bef506db8b78ced3ace94
2014-12-15 16:27:12 +00:00
dan
d44b786ff6 Fix errors in threadtest3 tests caused by earlier tests neglecting to close database handles.
FossilOrigin-Name: 1d44f1b1a9fefeb2449892775c59765c46784eb1
2014-12-15 08:46:17 +00:00
dan
053542d72a Further enhancements to threadtest3 stress tests.
FossilOrigin-Name: ba772cff602ca7c3c0c91451e701f52a872e7a14
2014-12-13 17:41:48 +00:00
drh
9bd3cc4681 Add extra tests to threadtest4.c. Fix a benign data race accessing the
text encoding using ENC(db).

FossilOrigin-Name: d7bb7ea4ab97ad26f4c84c9b8dc2827010093803
2014-12-12 23:17:54 +00:00
dan
0420954606 Add extra tests to threadtest3.
FossilOrigin-Name: f6bf86f907cbff31bed3cbfc922c10c973575498
2014-12-12 16:39:38 +00:00
drh
ef15c6e9e6 Add new tests to the threadtest4.c program. Fix a long-standing data race
in WAL mode for shared-cache.

FossilOrigin-Name: d8d3e6d04cbb9e3033ad8613e3dbd4ad0b01765a
2014-12-12 01:27:17 +00:00
drh
2ea0bafae2 Remove the KeyInfo cache (for now - perhaps we will add it back in later - or
maybe not since it provides negligible benefit but adds a lot of complexity
and thread-safety risk).  Add a mutex to ATTACH to deal with a data race.

FossilOrigin-Name: 03c443eaf24413d6faaa91a33575d9dfd3528b5c
2014-12-12 00:52:10 +00:00
drh
5942b01611 Make sure the Btree mutex is held when setting the locking mode and the
secure delete flag when attaching a shared-cache database.

FossilOrigin-Name: 6bef7ede2bbf0a51729e1943b0b0c895cb57c718
2014-12-12 00:40:58 +00:00
drh
5f5c1a0186 Merge the cell overflow page number cache thread race fix from trunk.
FossilOrigin-Name: cefad47ec2ad58d7ecd58bab9a261e4d5816cd69
2014-12-12 00:26:59 +00:00
drh
18b67f3f0d Fix a bug in the threadtest4.c program. Remove the keyinfo cache as it provides
minimal performance improvements, and then only at SQL preparation time, not
at runtime, and it has problems with data races in shared-cache mode.  We might
later add the keyinfo cache back but only enable it when shared-cache mode
is off.

FossilOrigin-Name: b7489f9451628c68f1dfc1d457fc161a0921c631
2014-12-12 00:20:37 +00:00
drh
1e57430e63 Add the threadtest4.c test program. Not yet working.
FossilOrigin-Name: ec3a74469ca2f0f3fb7d82a05fdac7500354e78f
2014-12-11 19:29:42 +00:00
dan
857536623a Fix a race condition to do with very large index keys in shared-cache mode.
FossilOrigin-Name: fc157dd7f18c94b7ae5f155e1b4a5d7714b7da8c
2014-12-11 16:38:18 +00:00
drh
0a3520c0f4 Fix a typo in the documentation for sqlite3_threadsafe().
FossilOrigin-Name: 258e747bb7e3a2bc46f932cc2b06c2689d43aeb0
2014-12-11 15:27:04 +00:00
mistachkin
dd11f2d930 Update a comment.
FossilOrigin-Name: e0e102a0bd9d07bccdb1feb95767cb81fb57c29f
2014-12-11 04:49:46 +00:00
mistachkin
44b99f7e2e Rename a structure member to improve code clarity.
FossilOrigin-Name: d48eda16ef8a84a93de9c6f38f794aceb4a6ba0d
2014-12-11 03:29:14 +00:00
mistachkin
44ca920625 Remove an unused structure member.
FossilOrigin-Name: d8404340cb01af440feebd19d291eb7198cfa576
2014-12-11 03:25:05 +00:00
mistachkin
f1f84a6ec1 Further simplify shell mode changes.
FossilOrigin-Name: cf9c6e7eea4cab073e608e6fefdd24be87a8abeb
2014-12-11 03:20:58 +00:00
mistachkin
e0d6885f17 Simplify and cleanup the implementation of the new ASCII mode for the shell.
FossilOrigin-Name: 66a28f7abaeaf1ebe6e43d856af88ac64b1ff230
2014-12-11 03:12:33 +00:00
mistachkin
31868243e2 Merge updates from trunk.
FossilOrigin-Name: 5b5d3e4d0d158594c0db05ddbf4d926b65825042
2014-12-11 02:28:42 +00:00
dan
1f03b86523 Fix a typo causing a test error in e_walhook.test.
FossilOrigin-Name: d9f916ba09f1a61684b4d59548ab6cf71cdb6a37
2014-12-10 20:57:20 +00:00
dan
6e45e0c8d7 Add new test file e_walhook.test.
FossilOrigin-Name: 2eb6d3e4fbe388ef28e4b7b846e9e8a4361517a4
2014-12-10 20:29:49 +00:00
mistachkin
684ec98fe3 Revise mutex handling by the sqlite3_win32_reset_heap() function.
FossilOrigin-Name: eacb3b7baa910e84f984b8e45695a2a2f5a4c861
2014-12-10 17:34:48 +00:00
drh
6f7febffa2 Fix typos in the documentation for sqlite3_table_column_metadata().
No changes to code.

FossilOrigin-Name: 3528f8dd39acace8eeb7337994c8617313f4b04b
2014-12-10 04:58:43 +00:00
drh
45d1b20639 Fix the sqlite3_table_column_metadata() routine so that it gives the correct
answer for the "rowid" column in a WITHOUT ROWID table.  Enhance it so that
it can be used to check for the existence of a table by setting the column
name parameter to NULL.  The routine is now included in the build by
default, even without the SQLITE_ENABLE_COLUMN_METADATA compile-time option.

FossilOrigin-Name: cf9be419a16156a9814e1378bb49b780de977343
2014-12-09 22:24:42 +00:00
dan
9778bd7292 Add extra tests to e_walckpt.test.
FossilOrigin-Name: 84f9581019961efa31297f8be48427b17bcca857
2014-12-09 20:13:40 +00:00
drh
80cdfd199b Lower the default SQLITE_SORTER_PMASZ value back to 10, where it has been for
the past couple of releases.  Applications that need a larger value can set
one.

FossilOrigin-Name: 1ba8911c18f2fe34c20dc42f25a8f3c1c798fa7a
2014-12-09 19:16:41 +00:00
drh
8c3026ecf3 Make the sqlite3_table_column_metadata() interface available by default and
without requiring the SQLITE_ENABLE_COLUMN_METADATA compile-time option.
Other sqlite3_column_* interfaces that have a run-time penalty even if they
are unused still require the SQLITE_ENABLE_COLUMN_METADATA option at
compile-time.

FossilOrigin-Name: 4f7549ff924b8ed8f90fc447cd4be11421453984
2014-12-09 19:07:29 +00:00
drh
f5471925c9 Add the SQLITE_REVERSE_UNORDERED_SELECTS compile-time option that causes the
"PRAGMA reverse_unordered_selects" setting to be on by default.

FossilOrigin-Name: 75a803e694d2c4e67579f45d54a0aaf120411a6e
2014-12-09 15:12:11 +00:00
drh
b11c3f22b8 Increase the default minimum PMA size for multi-threaded sorting from 10x
the page size to 250x the page size.  Provide the SQLITE_SORTER_PMASZ
compile-time option to change this default.

FossilOrigin-Name: b05340fe3cd5f1676a55023228dc8d1a92de5936
2014-12-09 14:42:49 +00:00
mistachkin
0fbd7350a1 Fix harmless compiler warning.
FossilOrigin-Name: e97b7a8b4df784d148fefb9554da0f511e351d9f
2014-12-09 04:26:56 +00:00
dan
785a38f066 Add extra tests to e_walckpt.test.
FossilOrigin-Name: d6832aa24c8d93b4532a651b86605bd0a0d0aa78
2014-12-08 20:29:23 +00:00
dan
0235a0331f Add missing mutex calls around a call to sqlite3SchemaGet() within sqlite3_open().
FossilOrigin-Name: 45415899545767888d36dcc0bafaf0ef415d94c2
2014-12-08 20:20:16 +00:00
drh
b88c7b550c Add a missing mutex around calls to clear the KeyInfo cache when closing
a database connection.

FossilOrigin-Name: 7047ce32a234484b8ba15311e6560aa74ff692c9
2014-12-08 18:08:45 +00:00
dan
8f1eb8a1cb Avoid accessing a single uninitialized byte when moving a rare 3-byte cell from an internal page to a leaf. This was not actually causing a problem, just a valgrind warning.
FossilOrigin-Name: 6aeece19a235344be2537e66a3fe08b1febfb5a0
2014-12-06 14:56:49 +00:00
drh
d52d52be80 Fix a (harmless) uninitialized variable reference in b-tree balancing for
auto-vacuumed tables with overflow pages.

FossilOrigin-Name: dd1dd4451f468599f7a0c2f7b5ee6125db3bb152
2014-12-06 02:05:44 +00:00
drh
cd934c3d2c Avoid a potential NULL pointer deference in the sqlite3_stmt_scanstatus()
logic.

FossilOrigin-Name: 42d44adc13d52b8dd571c9375eb48298123d5a60
2014-12-05 21:18:19 +00:00
dan
5cca94ea71 Fix a buffer overread that might occur in analyze.c if SQLITE_ENABLE_STAT4 was defined.
FossilOrigin-Name: c1ae1268b9023a771fda98f26bf451c6066fe70b
2014-12-05 21:04:26 +00:00
dan
2928d32791 Add new test file e_walckpt.test. Still some tests to come.
FossilOrigin-Name: e4db3db3a65ecfd4069a40d436aa7a5512d61a30
2014-12-05 20:46:19 +00:00
drh
fe32daaeaa Make sure the WhereTerm objects are fully zeroed when they are allocated.
FossilOrigin-Name: fdb667335c2250239a66143aec4235325dec8274
2014-12-05 19:50:58 +00:00
drh
ebdb81dd45 The KeyInfo cache must be cleared before closing the btree, not after.
Revised fix for ticket [e4a18565a36884b00edf].

FossilOrigin-Name: 7ed3346e8c10dbf52fd44ab69900699d4f7ad3fd
2014-12-05 15:31:33 +00:00
drh
318dc0b425 When closing a (shared-cache) database connection, be sure to clear out
all KeyInfo objects cached on Index objects. 
Fix for ticket [e4a18565a36884b00edf].

FossilOrigin-Name: adca7688de20ff40d8ddf2107dfaf92af3873b83
2014-12-05 14:44:57 +00:00
drh
351064b452 Improved comment on the sharedB.test test script.
FossilOrigin-Name: 71f589e3f82a07513425e212072f32748c0732d4
2014-12-05 14:34:30 +00:00
drh
a895a4d22c Test case demonstrating the problem described by
ticket [e4a18565a36884b00edf].

FossilOrigin-Name: ffea3e905adc108d2dc37f5d6da2024f0389f176
2014-12-05 14:07:53 +00:00
drh
ffc8f3e201 When closing a (shared-cache) database connection, be sure to clear out all
KeyInfo objects cached on Index objects.
Proposed fix for ticket [e4a18565a36884b00edf].

FossilOrigin-Name: 651ed97de13234be60a1138a98b06d308449a791
2014-12-05 05:38:02 +00:00
drh
2c3abeb8c3 Fix compiler warnings.
FossilOrigin-Name: e9955c0e14d13ba1411f013acb4979958dae2516
2014-12-05 00:32:09 +00:00
drh
5de7d966bd Fix the autoconf and MSVC makefiles, which have been broken for nearly a
month.  :-(

FossilOrigin-Name: 520c2b838da8b230487c8c66f3ba8e5daa1ca886
2014-12-05 00:17:39 +00:00
drh
dea7d70d1b Make sure that a DISTINCT query with an ORDER BY works correctly even if
it uses a descending index.  Fix for ticket [c5ea805691bfc4204b1cb9e].

FossilOrigin-Name: 0d3aef97ebddf422b8bdcbc5878970c6129e3f54
2014-12-04 21:54:58 +00:00