Commit Graph

13202 Commits

Author SHA1 Message Date
drh
00fa334a0b Add the "checksymbols" target to Makefile.in
FossilOrigin-Name: 5bd73dba5e278db81f7d728c75e3142c02d37ff7
2014-12-23 19:52:26 +00:00
drh
d477eee312 Rework the test/releasetest.tcl script so that it uses the autoconf makefile
instead of the test/releasetest.mk makefile.  Also add options like --dryrun
and --buildonly.  Omit the --makefile option and replace it with --srcdir
with the default computed relative to the releasetest.tcl script itself.

FossilOrigin-Name: 7c85e831153f9aef2afaf981d53db38a28091be5
2014-12-23 19:40:51 +00:00
drh
4a86d00162 Fix a typo in an evidence mark on a test script. No changes to code.
FossilOrigin-Name: a08b0c7512287ce5ae3fffe02c092d0eb25b3a25
2014-12-22 22:02:20 +00:00
drh
3da9c04712 Redefine the way PRAGMA data_version works: It continues to change when
any other connection commits, including shared-cache connections, but does not
change if the local connection commits.

FossilOrigin-Name: 7a97826f33460f3b4f3890c9cf97116c3355eeda
2014-12-22 18:41:21 +00:00
drh
dd31b4e709 Fixes to the README.md file. No changes to code.
FossilOrigin-Name: ef4b734d1ff3dbb9c802c60dc1384033fdfd87e5
2014-12-21 11:56:02 +00:00
mistachkin
d9d812fc38 Support manually disabling overlapped file I/O for Windows sub-platforms other than Windows CE.
FossilOrigin-Name: b9330b887cc8bed2b6b3e6c1b269788e08ccf50d
2014-12-20 22:21:49 +00:00
mistachkin
cd54bab6fe Minor fixes and enhancements to the SQLITE_ENABLE_API_ARMOR functionality.
FossilOrigin-Name: cb3e4219ac9560d2773b85453aafda54b7c9346f
2014-12-20 21:14:14 +00:00
drh
59871fe748 Add the "PRAGMA data_version" command for checking to see if a database has
been modified.

FossilOrigin-Name: de50f25ce3226fa4929b8236c72c88b739859d5f
2014-12-20 14:50:28 +00:00
drh
d7107b3852 Update the PRAGMA data_version command so that it reponse to changes made
by a shared-cache database connection, and also to changes made by the same
database connection.  Add test cases to verify the new behavior.

FossilOrigin-Name: 44ee538374940c50198949f2cbb9213ba2375b6a
2014-12-20 14:34:02 +00:00
mistachkin
129a752bad Merge updates from trunk.
FossilOrigin-Name: 555fb71f6c479936446c2ce75b1b120a9a121f49
2014-12-19 22:20:27 +00:00
drh
0d339e44a0 Adding test cases for the "PRAGMA data_version" command.
FossilOrigin-Name: c5fb7d6a106d46f10e71abe3a6d4243b21ed02a5
2014-12-19 20:27:02 +00:00
drh
9161856495 Experimental "PRAGMA data_version" command for detecting when another process
has changed the database file.

FossilOrigin-Name: 43db1f44bce5a0ee50197b95ab0d844540b69d86
2014-12-19 19:28:02 +00:00
drh
8e755e7e19 Simplify the implementation of the "header-value" pragmas (schema_version,
user_version, freelist_count, and application_id) by making them more
table-driven.

FossilOrigin-Name: da27a09d1d991583b59997f6cc67efa28ffd9d6a
2014-12-19 18:49:55 +00:00
dan
1ac5fed3a7 Experimental opimizations to speed up FK constraint CASCADE and SET NULL action processing.
FossilOrigin-Name: 8c5dd6cc259e0cdaaddaa52ccfa96fee6b166906
2014-12-17 15:03:50 +00:00
dan
d457271130 Fix some comments in fkey.c. Add tests to fkey8.test.
FossilOrigin-Name: 210cb2a6aaf780365064a26c0c99926bd6346e19
2014-12-17 14:38:45 +00:00
dan
0466883300 Experimental opimizations to speed up FK constraint CASCADE and SET NULL action processing.
FossilOrigin-Name: 35a20a5f22245c70faa51965951e8cc011defa93
2014-12-16 20:13:30 +00:00
drh
e8d1777a2d Fix the e_walauto.test script so that it works on windows.
FossilOrigin-Name: 7d092ebb6724c3c0fdc05dc94ca767d158933fb5
2014-12-16 12:46:38 +00:00
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
drh
1d32488037 Performance enhancement for single-table queries with many OR-connected
WHERE clause terms and multiple indexes with the same left-most columns.

FossilOrigin-Name: 1461d543ac8a3e4a54405067893146c74576bb4e
2014-12-04 20:24:50 +00:00
drh
72673a24e2 If a table is the right operand of a LEFT JOIN, then any column of that
table can be NULL even if that column as a NOT NULL constraint.
Fix for ticket [6f2222d550f5b0ee7ed].

FossilOrigin-Name: 6f6fcbe4736b9468a495c684d5eebc8bfe5c566a
2014-12-04 16:27:17 +00:00
drh
d8922052b2 Clarification of the meaning of the second parameter to the busy-handler
callback.  No changes to code.

FossilOrigin-Name: 1e2bc484f8e7766a493bfeab04d82e50f37217b8
2014-12-04 15:02:03 +00:00
drh
063970a15f Fix comment typos reported on the mailing list. No changes to code.
FossilOrigin-Name: 93a71c9f058b58d11187293a1e8d5324d0911880
2014-12-04 14:01:39 +00:00
drh
a25165fa68 Add an implementation mark and fix a comment describing the OP_Checkpoint
opcode.

FossilOrigin-Name: 7475b90c558157802b036162376fceacc1b9ab4a
2014-12-04 04:50:59 +00:00
drh
dd90d7ee81 Add evidence marks and assert()s used as evidence for checkpoint requirements.
FossilOrigin-Name: b2da8afc7657266fbe8e683c6e50fe18216cbcf3
2014-12-03 19:25:41 +00:00
drh
86e166a778 Fix over-length comment lines in sqlite.h.in. No changes to code.
FossilOrigin-Name: cbd357fd8c25c9c6043063710a3e2a89ff8b4575
2014-12-03 19:08:00 +00:00
drh
bb9a378df3 Simplify the sqlite3_wal_checkpoint() documentation. Add some source code
evidence marks.

FossilOrigin-Name: 026c44ff2c092b14faa19985dd46873aeb8727dc
2014-12-03 18:32:47 +00:00
drh
5b875311a3 Futher tweaks to the sqlite3_wal_checkpoint_v2() documentation.
FossilOrigin-Name: 7d284d047b0677fb4532df5aae06f5bad997f5e9
2014-12-03 16:30:27 +00:00
drh
2d2e7bfeff Updates to the documentation for sqlite3_wal_checkpoint_v2() and related
interfaces, including adding many requirements marks.

FossilOrigin-Name: 1e212d9899387344fd62c7b6fbcc59ea885b6d7c
2014-12-03 15:50:09 +00:00
drh
2f89546001 Add support for SQLITE_CHECKPOINT_TRUNCATE.
FossilOrigin-Name: edda2b9e7a15ed486de81b10dd9bacd39c571d3f
2014-12-02 20:51:52 +00:00
dan
0fe8c1b967 When attempting to restart a wal file, make any required calls to sqlite3_randomness() before waiting on or checking for wal file readers. This restores the behaviour exhibited by the trunk.
FossilOrigin-Name: 6ee08769f0ffbb3d620c66b89180ece7782dc820
2014-12-02 19:35:09 +00:00
dan
f26a1549ac Add the SQLITE_CHECKPOINT_TRUNCATE option.
FossilOrigin-Name: 8e20a43419e46b6b9d1f60ec7ea420bbfb3ef358
2014-12-02 19:04:54 +00:00
drh
1fd2d7d471 Convert two unreachable branches into assert() statements.
FossilOrigin-Name: 61b31e771430f490fc2c4cef55046debc4a5f4f5
2014-12-02 16:16:47 +00:00
drh
9b5444af6c Work around overzealous NULL pointer checking in memcpy() and memset() for
some systems.

FossilOrigin-Name: 0d04f380e1bd17104b3cf76b64d0cfc79a726606
2014-12-02 13:46:53 +00:00
drh
ac5649a985 Remove the ill-designed "-end" option from the command-line shell. Instead,
allow multiple SQL or dot-commands as command-line arguments.  Any -cmd
commands are processed first, followed by other command-line arguments, for
backwards compatibility.

FossilOrigin-Name: 24fa2e9832daaa5d68ee28a00c56c55f97a4da9e
2014-11-28 13:35:03 +00:00
drh
cb7fe0ab9c Add the -end option to the command-line shell, which forces it to exit after
reading prior command-line options (presumably including one or more -cmd
options) and without reading standard input.

FossilOrigin-Name: b59397b1f1e32c478b5fa96659cd4300177d39f7
2014-11-28 11:54:44 +00:00
dan
d89b834f54 Fix a buffer overread during compilation of CREATE VIRTUAL TABLE statements that featured an explicit database name but no virtual table arguments. For example, "CREATE VIRTUAL TABLE main.ft USING fts4".
FossilOrigin-Name: f095cde579e7417306e11b5c1d2dd90b6bb547d5
2014-11-27 11:36:36 +00:00
drh
3f2d22e1a3 More test cases for the balancer.
FossilOrigin-Name: 358ea818f7ea5aa55bafaf4057e9fc7a5fd77c11
2014-11-27 04:23:19 +00:00
drh
5ab63775dd Fix a problem in the new b-tree balancer that was causing corruption of
the fragmentation count.

FossilOrigin-Name: f242394e079dd185aad90f2aee902a5edf27e150
2014-11-27 03:46:04 +00:00
dan
0a79238b39 Fix an integer overflow bug in vdbesort.c.
FossilOrigin-Name: 623827192532f08b68bc0eb9ed1449e173361f0c
2014-11-25 18:59:55 +00:00
drh
0da10d3289 Always reinitialized the Index.bUnordered and Index.noSkipscan flags before
rereading the sqlite_stat1 table, even if SQLITE_ENABLE_STAT4 is defined.

FossilOrigin-Name: 1e1221fc4823a6bb6fc5d2408732e27aca585de9
2014-11-22 21:37:00 +00:00
drh
ab4624d005 Fix an error in the comments from the previous check-in.
FossilOrigin-Name: 9660ce541837ccd8df415641a922274e093056aa
2014-11-22 19:52:10 +00:00
drh
7a1bca7e74 Deploy heuristics (well-commented) to better estimate how much unindexed terms
in the WHERE clause filter the number of output rows from a single table.

FossilOrigin-Name: 221659945c3f78d3b6789bfe8fdeb8d3ee1fa038
2014-11-22 18:50:44 +00:00
drh
a3898250d4 Remove a redundant test case (probably a copy/paste error). Add an assert()
to where.c to ensure that automatic indexes do not have there output row 
counts adjusted downward by supplementary constraints.

FossilOrigin-Name: eea47933493c85a85247ad383bd148b06f627d04
2014-11-22 12:22:13 +00:00
drh
643091f071 Fix a typo in a requirements mark on the abs() SQL function.
FossilOrigin-Name: b1e6c02f8b9a2afaa12ac15a33e3f698c3be27d6
2014-11-20 23:21:23 +00:00
drh
2d8233157d Fix a benign test error on PRAGMA collation_list
introduced by a recent checkin.

FossilOrigin-Name: 332cc9591d05508ac9cb56fde2b82e20e0342d1f
2014-11-20 23:11:30 +00:00
drh
341eca7f68 Updates to requirements tags on the mutex documentation.
FossilOrigin-Name: fcf8b7e4c6c3893e2004a28dc9f0f677907b4ba9
2014-11-20 23:03:42 +00:00
drh
5e3b49bc42 Add requirements marks on the built-in collating functions.
FossilOrigin-Name: 4b608b62ac8d4eafdb76192b3b5db272332a4bfd
2014-11-20 19:22:26 +00:00
drh
fdab02635c Ensure that when the number of cells on a page drops to zero that the freelist
and fragment counter are both cleared.  Also add evidence marks corresponding
to file-format documentation.

FossilOrigin-Name: ef9fbc08b0a047042deeb2d6007d67028fefb9e2
2014-11-20 15:30:50 +00:00
drh
1b40e63f9b Fix the encoding of some integers to use the minimum amount of space:
-128, -32768, -8388608, -217483648, and -140737488355328.

FossilOrigin-Name: 2d7c8da5f16e64eaa7b0c2d66898682ea3d102a0
2014-11-20 02:58:10 +00:00
drh
654858d7f4 Add some requirements marks to the record formatting logic. Comment changes
only - the code is unaltered.

FossilOrigin-Name: 9a9627e178a67bbfc85366aaea900e674d22fb53
2014-11-20 02:18:14 +00:00
drh
113762a284 Add new requirements marks associated with the file format documentation.
No changes to code.

FossilOrigin-Name: 6d00bcca6ed1903fb17275752cab71c14392355b
2014-11-19 16:36:25 +00:00
drh
42a7b4bac9 Completely remove an assert() that had previously been commented out.
FossilOrigin-Name: 89b3c1c4555c98c633089b21cdd2a1a3a1e751eb
2014-11-19 14:31:12 +00:00
drh
664f85dd59 Add an ALWAYS on an always-true branch in wal.c.
Fix the ANALYZE command so that it resets the "unordered" and "noskipscan"
flags on indices when reloading the sqlite_stat1 table.

FossilOrigin-Name: 9ed97a85feee6593faefa2b54cc4cf9a60f515f9
2014-11-19 14:05:41 +00:00
drh
fead4ed8f3 Adding the "noskipscan" token to an sqlite_stat1.stat field prevents
an index for being used with the skip-scan algorithm.

FossilOrigin-Name: 4461bf045d8eecf98478035efcdba3f41c709bc5
2014-11-18 21:54:31 +00:00
drh
36ff0bf684 Allow an automatic index to be used if the only uses of declared indexes for
the same loop use the skip-scan algorithm.

FossilOrigin-Name: c52f7971e90cac1058d6b66c9e334cbc8607def3
2014-11-18 21:45:35 +00:00
drh
64b600ff13 Merge in all the other ROLLBACK fixes from the branch-3.8.7 branch.
I don't know why I was doing them one-by-one.

FossilOrigin-Name: 296b0c7397790ceadbdb330959e962f6491abc3e
2014-11-18 20:49:30 +00:00
drh
bea3b976a9 Fix a bug in the sqlite3TripAllCursors() routine that prevents it from
reporting errors.  It is unknown at this time whether or not this omission can
result in any incorrect result in an actual query.

FossilOrigin-Name: 2896f2640ab3e102ee248d20fb68c497817524eb
2014-11-18 20:22:05 +00:00
drh
58f95c43ad Update a couple of test cases to account for the fact that ROLLBACK does not always abort all running SELECT statements.
FossilOrigin-Name: abccda769a3f6b755c3bf70b5fb31a5e16718ef3
2014-11-18 20:16:27 +00:00
drh
bb8f925294 Increment the version number to 3.8.7.2
FossilOrigin-Name: 945a9e687fdfee5f7103d85d131024e85d594ac3
2014-11-18 12:28:52 +00:00
drh
4429c20b86 Add an ALWAYS() to an always-true conditional in the WAL rollback logic.
FossilOrigin-Name: c5eae8a60d474131fbfa4d0c2b459005267e8be4
2014-11-18 02:44:32 +00:00
drh
c5352b996a Remove code from sqlite3BtreeKeySize() made unreachable by the previous
check-in.

FossilOrigin-Name: 57c4aa988c8eda3cc513c1e5df5804d88bee99a0
2014-11-17 20:33:07 +00:00
dan
756d3b3e9d Avoid calling sqlite3BtreeKeysize() on a b-tree cursor in SKIPNEXT or SKIPPREV state.
FossilOrigin-Name: 2f2ecb994889acb783616acb7307f8fed962d213
2014-11-17 19:44:44 +00:00
dan
2b8669a9da Avoid calling sqlite3BtreeKeysize() on a b-tree cursor in SKIPNEXT or SKIPPREV state.
FossilOrigin-Name: 54e7d3fcb1ab21c03ffef1af93ae029a2901098a
2014-11-17 19:42:48 +00:00
drh
d816e00d13 Improved comments on the BtCursor.skipNext field. No changes to code.
FossilOrigin-Name: e956e7db057d1112badf5e0671cea95201385b44
2014-11-17 19:25:15 +00:00
drh
77b1deec40 When a SELECT statement is terminated by a ROLLBACK TO operation, make the
error message be "abort due to ROLLBACK" rather than 
"callback requested query abort".

FossilOrigin-Name: 34fc4a082c192830e48f643549c04a4f91912b8b
2014-11-17 17:13:06 +00:00
drh
13835c41e8 Fix a bug in the sqlite3TripAllCursors() routine that prevents it from
reporting errors.  It is unknown at this time whether or not this omission can
result in any incorrect result in an actual query.

FossilOrigin-Name: 42588207ff5451cb785c394633e1ab631fb82f01
2014-11-17 15:32:47 +00:00
dan
302f583aa4 Update a couple of test cases to account for the fact that ROLLBACK does not always abort all running SELECT statements.
FossilOrigin-Name: eba171e980fa4491dfee9d7e4df50c87a0ebbf87
2014-11-17 15:22:08 +00:00
drh
f9df2fbdcd Adding the "noskipscan" token to an sqlite_stat1.stat field prevents an
index for being used with the skip-scan algorithm.

FossilOrigin-Name: 00fe09505792cd0d104b2da9d040f023e30fa871
2014-11-15 19:08:13 +00:00
dan
70273d0bab Consider using an automatic-index for a scan even if there exists a possible skip-scan that uses one or more "=" operators.
FossilOrigin-Name: 93642a65ef3d53ece322ffd85233b68fc9a86c9d
2014-11-14 19:34:20 +00:00
drh
0a9d9d566e Do not automatically remove the DISTINCT keyword from "a IN (SELECT DISTINCT ...)" expressions. Fix for [db87229497].
FossilOrigin-Name: 98457a57d642b35917eb9ad8f70065e273aad206
2014-11-14 15:42:23 +00:00
dan
dd715f7c57 Do not automatically remove the DISTINCT keyword from "a IN (SELECT DISTINCT ...)" expressions. Fix for [db87229497].
FossilOrigin-Name: 55e453aadbb676dda07f0fa537d39ce184ef636c
2014-11-14 15:28:33 +00:00
dan
8ac1a67eff Modify the documentation for sqlite3_backup_init() to indicate that it will fail if there is already a read or read-write transaction open on the destination database.
FossilOrigin-Name: ef03a203351a6002e2b1075139717e4234c816cd
2014-11-13 14:30:56 +00:00
dan
fad01993b7 Have calls to sqlite3_backup_init() fail if there is already a read or read-write transaction open on the destination database.
FossilOrigin-Name: 169b5505498c0a7ee2b5dbb2ba13c41dfaa7c62f
2014-11-13 14:18:25 +00:00
drh
6f9c5669e2 When a transaction or savepoint rollback occurs, save the positions of all open read-cursors so that they can be restored following the rollback operation. Cherry-pick of check-in [dd03a2802f3f27]
FossilOrigin-Name: 402780a9c8df9e7ea898bdca49c1191042fe387a
2014-11-13 13:42:39 +00:00
dan
d7b06909ad Add further tests for rollback operations in the presence of ongoing selects.
FossilOrigin-Name: eaf3aae014f59c8d37aa20aa31d54cf13f9e86fc
2014-11-12 17:45:37 +00:00
dan
8023104252 When a transaction or savepoint rollback occurs, save the positions of all open read-cursors so that they can be restored following the rollback operation.
FossilOrigin-Name: dd03a2802f3f276525f3cef9a93f825dd8606626
2014-11-12 14:56:02 +00:00
drh
5a2c8c885c Fix the %c format character in sqlite3VXPrintf() so that it correctly handles precisions larger than 70.
FossilOrigin-Name: 839a6df9f98b90fb593534a62145d9c913540bae
2014-11-12 14:12:28 +00:00
drh
51a205410c Make sure that NULL results from OP_Column are fully and completely NULL and do not have the MEM_Ephem bit set. Fix for ticket [094d39a4c95ee4].
FossilOrigin-Name: e1017745e183f5d7429ce787ec2feef946a24f0f
2014-11-12 14:07:28 +00:00
drh
85fabf1444 This is a cherry-pick of version [b5df5ac052].
FossilOrigin-Name: d4b2d5d066891e06f2bf4337902b44b000fa9fd2
2014-11-11 22:55:26 +00:00
mistachkin
bfa395d085 Remove some calls to the 'breakpoint' test command.
FossilOrigin-Name: 1412fcc480799ecbd68d44dd18d5bad40e20ccf1
2014-11-11 19:07:56 +00:00
dan
2d8e3caa2e Add tests for sqlite3_blob_bytes().
FossilOrigin-Name: a066a3832a7c6de65c3016e77e49ac00e09db749
2014-11-11 16:11:04 +00:00
drh
949d43a5fd Permit read operations to continue after a ROLLBACK as long as the schema
does not change.

FossilOrigin-Name: b5df5ac0529f7b0d1e880a7f4a307e7d77b7fa6c
2014-11-11 14:59:31 +00:00
dan
43f4066e10 Add new test file e_blobclose.test, containing tests for sqlite3_blob_close().
FossilOrigin-Name: 5a1eac2419b1462e6f21595a3fff26d9cc49d203
2014-11-11 12:20:35 +00:00
drh
47b7fc7843 Experimental changes that permit read operations to continue after a
ROLLBACK, as long as the schema is unchanged.

FossilOrigin-Name: fa6e6a9ae276cad60e9a4abc1bc23cf2809ea786
2014-11-11 01:33:57 +00:00
drh
de58f4fe7f New test cases for deleting content out from under a SELECT statement.
FossilOrigin-Name: 8289c3e9b47f7c2a606a88839f6bf615f8904ac2
2014-11-10 19:16:59 +00:00
dan
923c4b35be Add test file e_blobwrite.test, containing tests for the sqlite3_blob_write() interface.
FossilOrigin-Name: 1df77e5f1bd82de4dc92fe28359c3e56ab3f9ed4
2014-11-10 17:53:03 +00:00
drh
1728bcb07f Add the eval() SQL function extension in ext/misc/eval.c.
FossilOrigin-Name: 27cf665b957f2c0ced403e3032099e80c295598f
2014-11-10 16:49:56 +00:00
drh
4ace5362c2 Shorten over-length source code lines in shell.c.
FossilOrigin-Name: 7f3819f6422badd344c1264b0cd2f2c7afe077df
2014-11-10 14:42:28 +00:00
dan
b391b94431 Add new test file e_blobopen.test, containing tests for sqlite3_blob_open().
FossilOrigin-Name: ecbccd0e594d22b3ae7fabc8037951dc49570bc3
2014-11-07 14:41:11 +00:00
drh
97d3898335 Fix another harmless comment typo.
FossilOrigin-Name: b45bc80bb16f07192d84fd14433bb724a84d4146
2014-11-07 14:37:32 +00:00
drh
9a06d30bb5 In the ".scanstats on" output from the shell, round the estRows value to
the nearest integer, rather than rounding toward zero.

FossilOrigin-Name: 5700508535c35ac6b158b527e1d47e529e8e28ab
2014-11-07 13:52:44 +00:00
drh
86a11b8a6a Fix harmless typos in comments.
FossilOrigin-Name: 94c564da4c2cf5dffe58fdf7a180e9ba4cc3de69
2014-11-07 13:24:29 +00:00
drh
6137138ded Fix typo in sqlite3.h reported on the mailing list.
FossilOrigin-Name: 402703212a8488f8b571ce170b3b6c7374bd7daa
2014-11-07 11:39:16 +00:00
drh
8790b6e860 Update documentation on sqlite3_config() and add corresponding evidence marks.
FossilOrigin-Name: 360c8ca11c3315c8e08c7c52ff5468e3f723e562
2014-11-07 01:43:56 +00:00
drh
b1a6eada1d Added SQLITE_SCANSTAT_SELECTID. Change the value returned by
SQLITE_SCANSTAT_EST from sqlite3_int64 to double.  Enhanced the formatting
and display of scan statistics using the ".scanstats on" command in the
shell.

FossilOrigin-Name: 20c7614addb8494cd7f40263a50fa6f428cce1c7
2014-11-06 14:43:53 +00:00
drh
15f23c2cf0 Further improvements to the ".scanstats on" display in the shell. Be sure
to show the results of all subqueries even if there are gaps in the 
SELECTID values.  Add ".scanstats" to the ".help" output.

FossilOrigin-Name: ee922682bb7235dbcd23a22fcfdfa188f6d3228a
2014-11-06 12:46:16 +00:00
drh
179bac3a14 On the ".scanstats on" output in the shell, initialize the estimated count for
the first loop of each subquery to the actual loop count.

FossilOrigin-Name: d1c51c8455d5ce972a77720c2d56228646ced27c
2014-11-06 12:17:24 +00:00
drh
42f30bce11 Changes the formatting of ".scanstats on" in the shell so that the stats for
subqueries are grouped together and occur after the main query.

FossilOrigin-Name: eacbbd8849db9b023eff15ef1cb42ec941299433
2014-11-06 12:08:21 +00:00
drh
c6652b1efe Add the SQLITE_SCANSTAT_SELECTID metric. Use it to improve the
".stmtscan on" output in the shell.

FossilOrigin-Name: 64ad5761a841f71530d41565b9fbe9d19c2d6aff
2014-11-06 04:42:20 +00:00
drh
518140ed04 Change the SQLITE_SCANSTAT_EST parameter so that it returns a double for
the estimated number of output rows per loop, rather than a 64-bit integer.
Revise the output format for the ".scanstats on" in the shell to make use
of this new capability.

FossilOrigin-Name: f9684000665ae7ef6f89c3773612b8286b8f545a
2014-11-06 03:55:10 +00:00
drh
e1db0db899 Fixes to the Windows VFS to allow memory mapped files to work without WAL support.
FossilOrigin-Name: 272fddc14cc322655eeba670bc0f9fc30e5a804c
2014-11-05 21:34:56 +00:00