Commit Graph

7656 Commits

Author SHA1 Message Date
drh c633908199 Wrap all automatic index changes inside SQLITE_OMIT_AUTOMATIC_INDEX. Add
the automatic_index PRAGMA to turn it on and off.

FossilOrigin-Name: a811a47fbe4f757a7ab575ae5a0f65177a3f07c0
2010-04-07 16:54:58 +00:00
drh 4139c99eba Make sure that all automatic indices are covering indices. Otherwise, the
table and index might be used together in a query but the table could get
out of sync with the automatic index through out-of-band changes.

FossilOrigin-Name: 2364313142668b3d0ad144447b4862709be929cd
2010-04-07 14:59:45 +00:00
drh 2a6a7eeba5 Enhance comments on the SrcList object definition to better explain the
operation of the SrcList.a[].colUsed field.  No changes to code.

FossilOrigin-Name: c0f67ea131c3e237e46311b1a3dcb3febf2ea036
2010-04-07 14:33:07 +00:00
drh ab5cd70ae5 Fix the trace output of the OP_Function opcode to show the correct
register numbers.

FossilOrigin-Name: 064c283eee82c5053e84058a0e1908e468da6ce3
2010-04-07 14:32:11 +00:00
dan 0a7a9155a4 Add file test_demovfs.c, containing a simple VFS implementation that demonstrates how writes to the journal file may be safely buffered by the VFS layer to improve performance on some embedded systems.
FossilOrigin-Name: af3b72d94a1b6513f02402af3ada5fb5dd390151
2010-04-07 07:57:38 +00:00
drh a21a64dd0c Veryquick.test is now working. The SQLITE_STMTSTATUS_AUTOINDEX counter
added.

FossilOrigin-Name: abbf16e5e7895971710fb3a8fd9c782fc1218a77
2010-04-06 22:33:55 +00:00
drh 75bb9f5a5b Runs quicktest without hitting an assert now. Some tests get unexpected
results still and there is a memory leak.

FossilOrigin-Name: a8224448cc305258a59a9023e6604783dda73e45
2010-04-06 18:51:42 +00:00
drh 424aab88ca Progress toward getting automatic indices to work. Still failing in corner
cases.

FossilOrigin-Name: ac6d0fba78eb9dcd69372e128d4a039aaff4b417
2010-04-06 18:28:20 +00:00
drh 8b307fbfa0 Automatically generate transient indices for tables in joins that would
otherwise have to use a full table scan.

FossilOrigin-Name: 1b2a04125f964e14f3fb90171c5ab86a0641d1c9
2010-04-06 15:57:05 +00:00
drh 25d3adbb6a Minor comment changes to the OP_OpenEphemeral header. No changes to code.
FossilOrigin-Name: 8e1d7ef47f643503aa823d9986a931a83c63648b
2010-04-05 15:11:08 +00:00
drh 8d83c0fdd5 Silently abandon a rollback if the journal has been truncated.
FossilOrigin-Name: 7626f6c9ea04d1a5690dd11bb13e8c3c04e3b0f5
2010-04-03 13:08:09 +00:00
drh 34e2b837d5 Check for a failure in the call to sqlite3PagerPagecount() from within
sqlite3PagerWrite().  (Error discovered by valgrind.)

FossilOrigin-Name: d64d181c79aee3501be6f7eb8c11ab2cc9a8d63c
2010-04-02 13:25:22 +00:00
drh a378c566d2 Take care to avoid a buffer over-read when adding a KEYINFO structure
to the P4 parameter of an opcode.

FossilOrigin-Name: 937b931a7cdad6874638158ed6a9ab6356b0bd0c
2010-04-02 12:55:38 +00:00
drh c2a4bab462 If the size of the database according to the header is larger than the
actual database file size, report that the database is corrupt.

FossilOrigin-Name: 8eb1f2443f2712920452b7ed3fb835c7f3221191
2010-04-02 12:46:45 +00:00
drh cce75d3343 Pager changes for code coverage testing.
FossilOrigin-Name: b04a45ea9714e7a35372b5d6a58868b307d10502
2010-04-02 03:38:59 +00:00
drh 4d077f9255 Disable the corruptE.test script when ENABLE_OVERSIZE_CELL_CHECK is on.
FossilOrigin-Name: 1dc4f9fe9b83467ba014e759b93f6caa2925e4d2
2010-04-01 18:33:14 +00:00
drh 43377f5ad5 Zero the filesize-in-header word for bigfile.tcl. Remove bigfile.tcl from
the journaltest permutation.

FossilOrigin-Name: 63610c71ca629de5e81950bc3c2ee6014e67853b
2010-04-01 16:15:56 +00:00
drh 45b355dc4f Do not journal the content of freelist leaf pages. This restores an
optimization that was accidently undone by check-in [12f7346c13] on
[2009-01-20].

FossilOrigin-Name: b1e7a1a677e1c2a6c2ab83a67070605465a3e495
2010-04-01 13:41:10 +00:00
drh 9afb1abe42 Remove a NEVER in sqlite3PagerPagecount() that can in fact be true.
FossilOrigin-Name: 8f00533782a0eae5613caaf86608384cb702fc51
2010-04-01 02:47:01 +00:00
drh 1f5b467f13 Restore the size information in the BtShared structure when a transaction
rolls back.

FossilOrigin-Name: 802aeb30c9baf4059fa84f4693f290f80d3a4085
2010-04-01 02:22:19 +00:00
drh a792dc5c4a Make sure an OOM error on sqlite3PagerPagecount() is detected and reported
out to the interface.

FossilOrigin-Name: 8aecf302a5aac66e43a8cc6c4e0d917f74e9e0de
2010-03-31 23:20:04 +00:00
drh 8d8626fe2b Report corruption if a database contains a reference that is out of range
according to the filesize-in-header database size.

FossilOrigin-Name: a91db0b1cd0b0fbadc5c8fe2eb8863629b411d87
2010-03-31 20:29:06 +00:00
drh afc266a76a Clarification of the implementation of SQLITE_STMTSTATUS_FULLSCAN_STEP.
No logical code changes - just commenting and layout changes to improve
readability.

FossilOrigin-Name: 06b9ca32255572a699dc51f46f848d0bf01255e1
2010-03-31 17:47:44 +00:00
dan 67a6a40cf9 Clear the column cache before populating aggregate accumulator registers. Fix fo
r [883034dcb5].

FossilOrigin-Name: ffc23409c7fb45dc5a8722fad26e26d207bb3213
2010-03-31 15:02:56 +00:00
drh d3d986d329 Documentation enhancements for the sqlite3_log() interface. No functional
changes to code.

FossilOrigin-Name: ba13a11108d7852c61f959cc8a5fc39c25202cae
2010-03-31 13:57:56 +00:00
drh 4b4580b701 Include shell.c and sqlite3.def in the amalgamation ZIP archive.
Ticket [e063139eb3f8]

FossilOrigin-Name: 0077ed5cf4e56eb81cfa850fc98e6b033708fc03
2010-03-31 11:52:57 +00:00
drh 97b59a56d2 Increase test coverage following the introduction of the new
filesize-in-header logic.

FossilOrigin-Name: dbc2c3c0144d2c76aec04f80892302c532947dc8
2010-03-31 02:31:33 +00:00
drh b1299158c7 Continuing refinements to the filesize-in-header enhancement.
FossilOrigin-Name: 79e22b95038c50b9b7f35e09262805ff6338b59b
2010-03-30 22:58:33 +00:00
drh bf59283ba2 Add a NEVER macro around a test in btree.c that can not longer be true.
FossilOrigin-Name: c117f99236a009778bb7878da464918554391f0a
2010-03-30 15:51:12 +00:00
dan 7ba4597135 Do not crash when compiling an "INSERT INTO tbl DEFAULT VALUES" when tbl has either BEFORE or INSTEAD OF triggers attached to it. Ticket [f3162063fd].
FossilOrigin-Name: ca359a3e8048bd11605c41c4b48134c0343e543b
2010-03-30 12:40:32 +00:00
drh d454214ddd Change an #if into an #ifdef.
FossilOrigin-Name: 371bab5d6534860ce908e52129c64a49946be33a
2010-03-30 11:57:01 +00:00
drh 4b11b0897a Pull the experimental file-size-in-header changes into the trunk.
FossilOrigin-Name: 0092b36c7bbd04bf3826de7805e8a14739390f31
2010-03-29 21:22:00 +00:00
drh 25a80ad0b1 The btree layer now tracks when a database is empty at the start of a
transaction and rolls back to that state.

FossilOrigin-Name: 01ef6c1944507c188a83a434ff00e98ad767f744
2010-03-29 21:13:12 +00:00
drh 5e0ccc216d Fix issues with the io.test script. There is still a problem with a
ROLLBACK TO not working on an initially empty database files.  And much
more testing is needed.

FossilOrigin-Name: 09786e2a51817d572a01ae7f3621f03fd27fc363
2010-03-29 19:36:52 +00:00
drh dd3cd977cc Experimental changes that cause SQLite to use bytes 28..31 of the database
header to determine the database size, rather than using the actual database
size.  This allows database space to be preallocated.

FossilOrigin-Name: b844ac6fcb72595a71e5c5283ec461309a87ba79
2010-03-27 17:12:36 +00:00
dan c26c00495f Increase the estimated cost of using a virtual table as the outer loop of a join when there exists an ORDER BY clause that is not satisfied by the virtual table. Fix for [775b39dd3c].
FossilOrigin-Name: 9e075e70f0e2a1ad302d17150cd58f91669a97a6
2010-03-27 09:44:42 +00:00
shaneh 1141ae2463 Fix OOM error on ANALYZE with STAT2 enabled with zero-length data. Ticket [cbd054fa6b].
FossilOrigin-Name: c33b38b59f733494ca0bce3f59a669fe7ed76b9f
2010-03-26 01:54:33 +00:00
dan 6d3cb2fbae Fix for [9861b74ab9]. Correctly handle strings with zero tokens in the fts3 offsets() function.
FossilOrigin-Name: d37034f7fc46b83be681247fde97823736c994cc
2010-03-24 15:57:33 +00:00
drh 280799b4ff Attempt to suppress a warning from Borland Code Guard.
FossilOrigin-Name: be278979917336e7186d7830876180154b5280ba
2010-03-24 11:55:08 +00:00
drh 7bca0a3660 More commenting and documentation enhancements in FTS3.
FossilOrigin-Name: 892e286709c4a72aae364b85dd43bea525bb1b4d
2010-03-23 18:24:06 +00:00
drh d6291c9155 Fix up obsolete comments in FTS3 to conform to the latest nomenclature.
Add new comments to better explain FTS3 operation.

FossilOrigin-Name: 3e4a0082170155b5b779afd075a3ee650530ca68
2010-03-23 15:46:41 +00:00
drh 486ff4897e Close the auxiliary database db2 at the end of the crash8.test script.
FossilOrigin-Name: 0fbdc431e832200efd87efd68456d5906397a219
2010-03-23 15:29:49 +00:00
dan e07b606522 Add an extra test case for crash recovery.
FossilOrigin-Name: f2326dad4e47b2657be302e194970967960eb1c0
2010-03-22 17:38:11 +00:00
dan bb23e7f91b After a rollback that writes or truncates the database file, sync the database file before invalidating the journal contents.
FossilOrigin-Name: b21b911f233842357af9ccc14525bbd48a38edb1
2010-03-22 17:13:53 +00:00
drh acd63a5a62 Disable the "init.test" test script when compiled with SQLITE_THREADSAFE=0.
FossilOrigin-Name: ad68fa65bbd6b82e69fe8c36e4c459ea2ced0f8c
2010-03-22 15:47:38 +00:00
dan 98f0c3619f Change the formatting of the preprocessor macros surrounding the compileoption interface in sqlite.h.in. This is so the documentation produced by parsing this part of sqlite.h.in is formatted similarly to the docs for the deprecated interfaces (with the #ifndef visible on the webpage).
FossilOrigin-Name: 161958d11f2ef6ce4d7ba69afea03e0a6764cc1b
2010-03-22 04:32:13 +00:00
drh f3609eeba7 Put an ALWAYS() around a condition in pcache.c that must always be true in
the current implementation.

FossilOrigin-Name: 88810cd091b33f2c56f842e32cafbac5d34d7412
2010-03-19 19:23:51 +00:00
dan 3f0d9d3846 Have the xUpdate() method of the rtree module virtual table implementation set the *pRowid output variable when inserting a row. Fix for [dd3ba6063a].
FossilOrigin-Name: f31d22489d44701c89cb13c663dfa1a6cc04f900
2010-03-19 19:02:27 +00:00
drh f92a4e35c5 Store the SQLite version number of the last writer in bits 96..99 of the header.
FossilOrigin-Name: 146d4f5d3459235d8b2d27a5d77beb7645f75185
2010-03-19 16:55:47 +00:00
drh e9c2d34c5b Make sure the in-journal boolean vector is cleared and released when ending
a transaction.  This fixes an obscure problem with the previous check-in.

FossilOrigin-Name: 69d749d93d6565b848ce5c07f2738d144c6564bf
2010-03-19 16:52:53 +00:00