Commit Graph

7771 Commits

Author SHA1 Message Date
drh
05f69dd388 Candidate fix for a pager bug associated with sqlite3PagerMovepage().
FossilOrigin-Name: 8c046eb6d16682d5e755624deb4f76f57350b9c9
2010-04-09 15:34:06 +00:00
drh
6498f0bb2e Avoid unnecessary calls to sqlite3_step() with null prepared statements
while parsing the schema.

FossilOrigin-Name: ae04d2d15d3d96f607adb394a631d96cd4cf2c1d
2010-04-09 09:14:05 +00:00
drh
9e48165b07 Fix a typo in a comment. No changes to code.
FossilOrigin-Name: 332cb55113a621456c6522830585434146c388e7
2010-04-08 17:35:34 +00:00
drh
f12cde5637 Fix code coverage problems in where.c.
FossilOrigin-Name: b04a52824971e8880e4bf0d9862db4eef8b607ab
2010-04-08 17:28:00 +00:00
drh
c71b5f34c9 Additional automatic index tests.
FossilOrigin-Name: 99d8e325e9eb8905631b06676206e6412f386d08
2010-04-08 16:30:38 +00:00
drh
7caba669a6 New test cases for automatic indices. New testcase() macros associated
with column-used bitmasks.

FossilOrigin-Name: e1aa48ace7e43c3805278120b8228ee597e2cee7
2010-04-08 15:01:44 +00:00
drh
8bd5412b90 Fix the computation of the number of rows in a table during automatic
index generation.

FossilOrigin-Name: edeab06a5010c82491a6cc9393cf2a35a7622ac5
2010-04-08 15:00:59 +00:00
drh
67ae0cb231 Fix an integer overflow bug in the automatic index logic. The bug was
detected by the testcase() macros added in the previous check-in.  Also
add some more testcase() macros, since this issue points up their importance.

FossilOrigin-Name: af97b4881a8f010055cde672634141d7ed6898fc
2010-04-08 14:38:51 +00:00
drh
52ff8ea605 Add testcase() macros to the automatic index logic to insure that boundary
cases are tested.

FossilOrigin-Name: 7286547847721b8f5f64bc2e7dc236652b1ae985
2010-04-08 14:15:56 +00:00
drh
9d6caca80d Make sure F_OK, R_OK, and W_OK are defined in test_demovfs.c. Define them manually
if they are not.  This is necessary to get the module to compile on some systems.

FossilOrigin-Name: 7c8afc3272fa91e2b5685b009eb674dbc1b5920d
2010-04-08 11:35:18 +00:00
drh
5c56f70199 Merge automatic index changes into the trunk.
FossilOrigin-Name: bf7b8d863665870a38f0b2335cc71de856a515b4
2010-04-08 01:16:19 +00:00
drh
0013e72edf When constructing automatic indices do not include the same column more than
once.

FossilOrigin-Name: d067d9f7a9138e026c1018361127e34385928657
2010-04-08 00:40:15 +00:00
drh
5a8aedab2d Pull over the latest changes from the trunk.
FossilOrigin-Name: e388fe8be878c80ef0bfd1699a7268cdb22cb3c6
2010-04-07 20:32:18 +00:00
drh
d14133e3f4 When rolling back a savepoint to the beginning of the transaction, make sure
to initialize the database size in the btree layer correctly even if the
database size field of the header is zeroed.

FossilOrigin-Name: a3540c6acf2bb6bdd44c101b63f17ca85e6b68ed
2010-04-07 20:29:56 +00:00
drh
3c379b0101 Add an interface to the SQLITE_STMTSTATUS_AUTOINDEX status information
to the TCL bindings.  Add some simple automatic index test cases.

FossilOrigin-Name: 1f40441204d9a912b1d6b67ff6ff9e17146c7abd
2010-04-07 19:31:59 +00:00
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
drh
ba726f4939 Do create, open, or initialize the rollback journal until something actually
needs to be written into the journal.  That way, expensive filesystem
operations are avoided if the transaction ends up being a no-op.

FossilOrigin-Name: b78e58ae1570ab4d66a69db445a752c6456038a0
2010-03-19 15:48:13 +00:00
dan
3b6f4c06ac Rewrite a couple of queries used internally by FTS3 to take advantage of the "SELECT max(x) FROM ..." optimization.
FossilOrigin-Name: b7e42ae77443b33e0ab83265064830594094dc7c
2010-03-19 06:59:19 +00:00
drh
71663ad0c1 Mark internal routines as "static" in FTS3.
Ticket [b1552d0fa7].

FossilOrigin-Name: 39b34ac4a7bd06144b3630c0ad71bad0615418b6
2010-03-18 16:34:44 +00:00
drh
3a3dd3ac8d Improved error message when the right-hand operand of MATCH in FTS3 is
not a valid search expression.  Ticket [170872f1c3].

FossilOrigin-Name: bea9258643edfeb98ebf59d93fa18a14e4221fea
2010-03-15 20:53:01 +00:00
drh
9396a41e6e Fix FTS3 so that it does not run illegal SQL and cause a spurious log
message.  Ticket [42d45a693e6].

FossilOrigin-Name: f186b6a61909be1d65b76a6fbaa42f57bbd0d1e5
2010-03-15 19:27:55 +00:00
drh
ed37690afd Store the database size in pages in bytes 28..31 of the header. Currently
this is for forensic use only, but it might be used in the future.

FossilOrigin-Name: 59f75bba028e1107ed41d447c27aef31a6656b68
2010-03-13 02:15:49 +00:00
drh
107b56e86d Add assert()s to mem2.c (activated by SQLITE_MEMDEBUG) which verify that
memory alloctions that might have come from lookaside are always freed
using a lookaside-aware free routine.

FossilOrigin-Name: c2af2164cf7b279ebb3e08201561348be6e765df
2010-03-12 16:32:53 +00:00
drh
735b9cbb96 Move the ctime.c source module near the beginning of the list of files
inserted into the amalgamation so that #defines that are overridden in
other modules will not effect the values returned by
sqlite3_compiletime_used().

FossilOrigin-Name: bb591802fff5a99ae504509e812bb34e762eaef0
2010-03-10 23:13:53 +00:00
drh
63da089314 Add the SQLITE_DBSTATUS_CACHE_SIZE verb for sqlite3_db_status(). The
highwater mark does not yet work on this verb.

FossilOrigin-Name: 418c6d8113bc337556b0d47acfd6a7d865d1121f
2010-03-10 21:42:07 +00:00
drh
9f8da32662 Remove the "experimental" markings on most interfaces that have been around
for multiple releases.

FossilOrigin-Name: d670e8bd51c794e2d7ea365ca553c2b74cf5a3a3
2010-03-10 20:06:37 +00:00
drh
c92271c549 Fix typo in a comment in the sqliteInt.h. No changes to code.
FossilOrigin-Name: 1716821ddb992fd6d1330604d4f59586bf056b00
2010-03-10 14:06:35 +00:00
drh
1d2b77944d Version 3.6.22
FossilOrigin-Name: 4ae453ea7be69018d8c16eb8dabe05617397dc4d
2010-03-09 19:31:43 +00:00
shaneh
942179f37a Fix a test script issue affecting the TCL backup tests under Windows.
FossilOrigin-Name: 20c400e73a9b6586b97de61da0d9f3d9a01dbebc
2010-03-09 15:10:30 +00:00
shaneh
6d8096e675 Version 3.6.23 release candidate 4
FossilOrigin-Name: 3445eda0295940e00c33cc87aedaf586fa1b1b63
2010-03-09 14:41:57 +00:00
shaneh
1da207e676 Minor changes to silence compiler warnings on various MSVC builds.
FossilOrigin-Name: 115c978b6bbc110119a1b2f178cc30b33aaa27ef
2010-03-09 14:41:12 +00:00
drh
ed6adb447f Version 3.6.23 release candidate 3
FossilOrigin-Name: 747baea5c32f9a5de4b46a1fd1b24bd509c9a85e
2010-03-09 13:12:40 +00:00
drh
0b2f8ba965 Check-in [87a6a9970b] did not completely disable FTS4. This check-in aims
to finish the job.

FossilOrigin-Name: 0259b6299e435b3c3a7ca33df8c38c8a5dc84a61
2010-03-09 13:02:09 +00:00
drh
c7594fc635 Version 3.6.23 release candidate 2
FossilOrigin-Name: 73f4d292dc66ac41456f2ebddada82c7f5633431
2010-03-09 12:35:50 +00:00
drh
40d238e09f Disable FTS4 (which is incomplete and not ready for publication) to prevent
accidental use.

FossilOrigin-Name: 87a6a9970b8cea25fc5f8ff03d87762dd1166899
2010-03-09 12:35:21 +00:00
drh
e396bfe6fd Version 3.6.23 release candidate 1
FossilOrigin-Name: 30e9f966e7bc517f69796828026c8b23337c356b
2010-03-09 05:01:49 +00:00
drh
3517324ddc Add NEVER and assert macros and explanatory comments for unreachable
conditions.

FossilOrigin-Name: ffb6596e6c80e284c1542b03f2c7bbfce0bd87d9
2010-03-08 21:40:13 +00:00
dan
3b4aae569a Correct an assert() in mem2.c (test code only).
FossilOrigin-Name: 1a88e31b03e090732243a70bec082b32ecf77c43
2010-03-08 15:17:53 +00:00
dan
01d3856428 Do not run the stmt.test script as part of the inmemory_journal permutation.
FossilOrigin-Name: 049cadf92bca5645a6f398eb83940344643fcacf
2010-03-08 10:32:38 +00:00
drh
29391c5b49 Make sure the dbFileVers field in the Pager object is properly initialized
even if there is an I/O error while reading its content off of disk.

FossilOrigin-Name: 81ff698f62c8133818a3db1997ae7427705da23f
2010-03-05 20:17:45 +00:00
dan
5fea90762a Change a condition in sqlite3VdbeMemShallowCopy() to avoid accessing an unitialized variable (doing so was not dangerous, but caused a valgrind error).
FossilOrigin-Name: 4793c381c6ff4e4d25433298be30028721a9cb67
2010-03-05 18:46:12 +00:00
dan
89374d2309 Fix a one byte buffer overread in fts3.
FossilOrigin-Name: 6e3e014af91601ed1f3a9cbe23f7c4260a4d177f
2010-03-05 17:27:01 +00:00
dan
b7dca7d733 Modify the vdbe so that the comparison operator opcodes do not modify the data type of operands. Fix for [aa92c76cd4].
FossilOrigin-Name: 8858042fa1449516a2c7dbb991dca3eb6c5794cb
2010-03-05 16:32:12 +00:00
drh
f8b4d8c682 Adjustments to #ifdefs so that the #include of <sys/mount.h> is not included
twice, because that confuses the amalgamation builder.

FossilOrigin-Name: 27413fc8dd52b754b4be9344a66bb9e0d752d48e
2010-03-05 13:53:22 +00:00
drh
84a2bf67d8 Adjust some #ifdefs so that the build works on Mac both with and without
SQLITE_ENABLE_LOCKING_STYLE.

FossilOrigin-Name: 0cc981f1ccc2c99b87eb968590ad18b2d3ebf37b
2010-03-05 13:41:06 +00:00
dan
60d4a30453 Fix for [9abd6aa831]. Do not overread a buffer used for an %q or %w conversion with a precision specifier.
FossilOrigin-Name: 5e472896e02eed05c6c0886a48acd0bdc7a38731
2010-03-04 17:58:45 +00:00
drh
69ef70362a Fix an uninitialized variable in printf when compiling with
SQLITE_OMIT_FLOATING_POINT.

FossilOrigin-Name: 14ad62b9a54dba5c5a2d4a994bcd4be6ab6e711f
2010-03-04 17:11:31 +00:00
drh
c05a9a8a57 Suppress harmless compiler warnings.
FossilOrigin-Name: fc2c63ac78ba7d48fe3232f88093e980ea34eaa9
2010-03-04 16:12:34 +00:00
drh
a64fa9123e Increase the maximum length of an sqlite3_log() result string. Provide more
details on the statement abort log message.

FossilOrigin-Name: 5322d1df5ba981001d248b7fb2ee02281e4f9723
2010-03-04 00:53:32 +00:00
drh
ccd0489baa Pull the latest Lemon updates from the lemon-update-2010 branch into
the trunk.

FossilOrigin-Name: 84d760bfc1d219fda99901061bb5db2cafe9eb1d
2010-03-03 22:43:37 +00:00
drh
7c0c460fff Modify the sqlite3_log() interface and implementation so that it never
uses dynamic memory allocation - to avoid deadlocking when called while
holding the memory allocator mutex.

FossilOrigin-Name: 28d1bc98d60319b10af427072037a0121bc76259
2010-03-03 22:25:18 +00:00
icculus
7b429aa6a8 Fixed compiler warning on Visual Studio.
FossilOrigin-Name: 83495128c820e963c70d11c3196f81d8cf01f867
2010-03-03 17:09:01 +00:00
icculus
d286fa6691 Whoops, that shouldn't have been in the merge. Removed buggy code.
FossilOrigin-Name: 643728003218c9841425dffb6fe506763859fd37
2010-03-03 17:06:32 +00:00
icculus
d49c1aa7a9 Use Strsafe() instead of strdup(). Fixes Visual Studio complaining.
FossilOrigin-Name: 89d8f98ea6d4d8bf871e08a8d8d1f0d2fd11aec1
2010-03-03 17:00:15 +00:00
icculus
05ac70ee0a Merged trunk to lemon-update-2010 branch.
FossilOrigin-Name: 88b466bae47d006c48eff42ab271f05ff56d5ed1
2010-03-03 16:54:58 +00:00
dan
3bbe761c9b Fix some extra instances of the constants addressed by [83e47ca006].
FossilOrigin-Name: 0354ab279f0ea9915a14d1ed972b4aa6b5a27fd1
2010-03-03 16:02:05 +00:00
drh
0b2864cb34 Factor out constant expressions in sqlite3GetVarint() to work around
nuisance warning messages from the RVT compiler.

FossilOrigin-Name: 83e47ca0069de259e98798d84d88301a5b4b6d2e
2010-03-03 15:18:38 +00:00
dan
0f831771c3 Modify the command line tool to disable all mutexes. The command line tool is single-threaded.
FossilOrigin-Name: 00e5679047a0a96dc4396aae5e061909faf3b81d
2010-03-03 07:23:12 +00:00
drh
2ec050c5b1 When TEMP files are in memory, also put the massive TEMP file used by
the VACUUM command in memory.

FossilOrigin-Name: 9daf4e7d07769f25b3a579d80e7fada4e52344b1
2010-03-02 23:34:54 +00:00
drh
8bb76d39a0 Rename the sqlite_compile_option_*() SQL functions to sqlite_compileoption_*()
for consistency with the C/C++ interface.

FossilOrigin-Name: dd4962aa34c4dd118d2cb15465384636eacc64d5
2010-02-26 16:37:47 +00:00
drh
71caabf0cc Remove the compile_option pragma (retaining compile_options - with an "s").
Updates to documentation.

FossilOrigin-Name: 733778df996a2dda7c31ff7b544cb6f9a6ed4c97
2010-02-26 15:39:24 +00:00
dan
2ed11e7b18 Avoid a buffer overwrite that can occur with a corrupt database if secure-delete is enabled.
FossilOrigin-Name: 7bdb1e05faceddbb0b8e3efee7d070ad8c4611a3
2010-02-26 15:09:19 +00:00
drh
383d30f483 Avoid incorrect compiler warnings by doing a couple of needless
variable initializations.

FossilOrigin-Name: 8f29490da62df07ea922b03cab52b6edd2669edb
2010-02-26 13:07:37 +00:00
drh
0d06d98980 Increase the version number to 3.6.23 in preparation for the next release.
FossilOrigin-Name: b5835d3e3d7f3fbf04431f9afe27dfef7b7f23c9
2010-02-26 12:58:50 +00:00
shaneh
84f4b2f237 Minor changes to silence some compiler warnings with MSVC.
FossilOrigin-Name: 4927c62d6214d93e582bf1266215ed3519630c15
2010-02-26 01:46:54 +00:00
drh
e294da02ba Fix to the database connection validity checker. Other test coverage
enhancements.

FossilOrigin-Name: 0f6291bbbd31673e2a65f38c7fc364c33719d25e
2010-02-25 23:44:15 +00:00
drh
bee8065e37 Test coverage enhancements. Additional documentation detail on the new
sqlite3_log() interface.

FossilOrigin-Name: d986e9289388fd72257b26cb2f9c972177255cd4
2010-02-25 21:27:58 +00:00
dan
887d4b2b43 Add experimental fix for corruption detection problem. This may well be revised yet.
FossilOrigin-Name: 1cc4be7ebc463921827e61da724f0de946c061f6
2010-02-25 12:09:16 +00:00
shaneh
88ba618ee7 Fixed numbering of a few tests; minor tweaks on others.
Added a couple new tests to stress previous simplifications.

FossilOrigin-Name: 9b18dfd19e825b09c1d246c826e179b9892308df
2010-02-25 18:07:59 +00:00
drh
264a2d4de1 Minor simplifications to the compile-time option reporting functions and
pragmas to facilitate coverage testing.

FossilOrigin-Name: 633d874783a94f923ff8240f9153764033d37a89
2010-02-25 15:28:41 +00:00
drh
4611d925a9 Expire pragma statements when reset, even if they were not run to completion.
FossilOrigin-Name: 78351d289bba83e536b64666c566b7bfc57351da
2010-02-25 14:47:01 +00:00
drh
5e767c5793 Make sure the ON clause of a LEFT JOIN does not cause an index to be
used to speed access to a table to the left of the join.
Ticket [ebdbadade5]

FossilOrigin-Name: f0ae251abb9e8a8793f46a30b79b2ce541cf14d5
2010-02-25 04:15:47 +00:00
drh
af46dc12f7 Add testcase() macros beside each sqlite3_log() call to make sure it is
tested with both logging enable and disabled.

FossilOrigin-Name: 1168763d2cd96acfa0488198e8bc82f0c4fa35a3
2010-02-24 21:44:07 +00:00
shaneh
915c8bdbbd Changes to compile time option diags to report values for some defines.
Added test cases to TCL test suite (ctime.test).

FossilOrigin-Name: dd480f62afa56ff85c2dd57ee7a16eee427e823f
2010-02-24 19:36:10 +00:00
drh
cda455b7ff Add a sqlite3_log() call on anonymous constraint failures.
Fix the output of test cases having to do with improved reprepare reporting.
Fix the VACUUM command to report more helpful error messages when things go
wrong.

FossilOrigin-Name: 69a493182fd77bec91598516ee42c11a6db1d039
2010-02-24 19:23:56 +00:00
drh
7823006011 Fix an incorrect ALWAYS() macro in vdbeapi.c. Fix the output of a few
test cases that changed due to better error propagation out of reprepare.

FossilOrigin-Name: a8c984c1d6cb6e2fc95a07eb32befeea122e8ed3
2010-02-24 18:40:39 +00:00
drh
31caa42afd Remove an unused variable from rtree.
FossilOrigin-Name: 8e60d3995a1ea940de9751dd3bbd7ef41b0bb00a
2010-02-24 18:25:58 +00:00
drh
a6129fa79a Enhancements to the way errors are reported up when an automatic
statement reprepare fails.

FossilOrigin-Name: 1a6d4bb130382564093b6370818ae4a7633f4074
2010-02-24 17:15:19 +00:00
drh
5a29d9cbc5 Fix an assertion fault that occurs when two different virtual tables are
used in a single UPDATE statement.
Ticket [d2f02d37f52b].

FossilOrigin-Name: ff61e0fd802c46c2d84c4b0c0bc8a0f34959bb25
2010-02-24 15:10:14 +00:00
drh
78e0fcf914 Fix the stmt.test test script so that it works with SQLITE_TEMP_STORE=3.
FossilOrigin-Name: 8bf710ce6dfab0e6fd4de7d6d3157008cc70d192
2010-02-23 21:08:40 +00:00
drh
380083ce18 Merge the compile-time option introspection interfaces into the trunk.
FossilOrigin-Name: 9f429434c0404f03a3e5c6741b769afe98a5c6c9
2010-02-23 20:32:15 +00:00
drh
413c3d36a2 Continuing improvements to error reporting and the sqlite3_log() routine.
FossilOrigin-Name: edea3bb740ddd096a46e00678b59d465bb1e2903
2010-02-23 20:11:56 +00:00
shaneh
dc97a8cdc1 Refactored compile time option diagnostic support to use strings identifiers instead of bitmask.
FossilOrigin-Name: 76a0294ab4208a0858a13bab0858e1bc1448b651
2010-02-23 20:08:35 +00:00
dan
39547b418b Fix a segfault that can occur if a malloc fails in ATTACH in shared-cache mode.
FossilOrigin-Name: e37137376a2b23062e2625b5285299b33630b326
2010-02-23 11:05:26 +00:00
drh
9978c97ec5 Remove the obsolete sqlite3SafetyOn() mechanism. Add additional logging
output for CORRUPT, and CANTOPEN errors.

FossilOrigin-Name: 7c4cca6d1a23a6d1591b62f58c3716a944969947
2010-02-23 17:36:32 +00:00
dan
440ac39bc0 Fix a segfault that can occur if a malloc fails in ATTACH in shared-cache mode.
FossilOrigin-Name: 875f8fa32708b8dbf314fd7056fac2fefdacfa36
2010-02-23 10:56:15 +00:00
shaneh
ca07b9df47 Removed checking of some compile options from the sqlite3_compileopts() API.
FossilOrigin-Name: 833da702ff9bd99d62640756d80e094256efff5c
2010-02-23 05:17:51 +00:00
shaneh
bdea6d1368 Test new api to report which options (defines) were used to compile SQLite.
FossilOrigin-Name: 84c9756993caf82710a0905ed1987d144bc764fd
2010-02-23 04:19:54 +00:00
drh
127f9d75e2 Add the ".log" command to the shell. This shows that some errors are logged
multiple times and other errors are never logged at all.

FossilOrigin-Name: 6d910245ad0097521cf1619449cc3d202137b8b8
2010-02-23 01:47:00 +00:00
drh
5bd1d051e8 Remove the ".genfkey" command from the shell. We've had foreign-key support
in the core since 3.6.19.  Anyone who still needs the simulated foreign-key
triggers can always generate them with an older version of the shell.

FossilOrigin-Name: c4401fc93b66c5339422d7e765a4a32b1ef96bdb
2010-02-23 01:01:58 +00:00
drh
4ec84f35e2 Fix an assertion-fault/segfault problem that comes up when trying to
VACUUM an auto-vacuumed database with a large schema. 
Ticket [da1151f97df244].

FossilOrigin-Name: 86d50ce57feb78440956192e37a03686ffa1e196
2010-02-22 23:17:42 +00:00
drh
a0f3509606 Merge in the massive clean-up and ANSI-fication of Lemon carried out
by Ryan Gordon.  There are no functional changes to SQLite itself - Lemon
still generates exactly the same parsing automaton from exactly the same
grammar.

FossilOrigin-Name: 1e8b842039cc06b57a321226633c55b94eb8dcd7
2010-02-22 19:37:44 +00:00
drh
a756466349 Log all error messages if logging is enabled.
FossilOrigin-Name: a8076aede33c07e9a2aaa05be8a888f37b45e41c
2010-02-22 19:32:31 +00:00
shaneh
195475d839 Changes to pragma integrity_check to check rowid order. Tests of same in corruptE.test.
FossilOrigin-Name: cae47c5b09cb122689bcb020a66ce14982cc4aa8
2010-02-19 04:28:08 +00:00
drh
3f28070109 Add a new, experimental logging interface designed to aid in debugging of
deeply embedded projects that use SQLite.

FossilOrigin-Name: 103321e37ae46eacfad4e127d13477ad5dd02bab
2010-02-18 18:45:09 +00:00
dan
da730f6eb4 Allow statements like "REPLACE INTO tbl(rowid) VALUES(...)" to run without a statement journal as long as there are no triggers, foreign keys or indexes.
FossilOrigin-Name: 0e4225804010cb0e3f254e2dbffc4fe0e7d982ce
2010-02-18 08:19:19 +00:00
icculus
866bf1e6a2 Repore error if the grammar has multiple %type lines for the same nonterminal.
FossilOrigin-Name: 721f33e7221c5fc907e9e293ac3242843f4fcfb7
2010-02-17 20:31:32 +00:00
icculus
d0d97b09c6 Fixed % formatting in some printf-style strings.
FossilOrigin-Name: f96add898f096cfc1e435c625ce74093d790b3c7
2010-02-17 20:22:10 +00:00
icculus
10163b7d82 Corrected error message (cut-and-paste bug).
FossilOrigin-Name: b3839f2aad00844c578d496c40481a39c018e4f6
2010-02-17 20:19:50 +00:00
shaneh
ad9f9f6693 Consistent use of #ifdef for SQLITE_HAS_CODEC to avoid confusion.
FossilOrigin-Name: 34a3413a5318050254b246ad859c91c134516a32
2010-02-17 17:48:46 +00:00
icculus
a3191195af Removed unused variables.
FossilOrigin-Name: ca570a02f5c5215098050de4eb551b2dcd11b1fd
2010-02-17 05:40:34 +00:00
shaneh
147e176aff Avoid using the internal printf routine for round(x,y) in the common case where y==0.
FossilOrigin-Name: d76ad8b3c494ffb4e670da0e92a1f8dbf7f48daf
2010-02-17 04:19:27 +00:00
shaneh
35c1a793ce More rounding tests.
FossilOrigin-Name: 3863638b8cd8d41cf4abf8b0d618892de845e91f
2010-02-17 03:57:58 +00:00
shaneh
030ea31797 Remove duplicated assignment in realloc.
FossilOrigin-Name: c419955df0ad0507ecb3869786d48458366d4e8f
2010-02-16 22:06:30 +00:00
shaneh
4a0b43caad Added additional rounding tests.
FossilOrigin-Name: b8ee76bc1fd355110149bd9135dd31a5724c2ac6
2010-02-16 22:00:35 +00:00
icculus
8e15802812 Removed %expect directive, on drh's advice.
FossilOrigin-Name: b43ac3309e77dc8ea2952bf62da6eaad5aef6653
2010-02-16 16:09:03 +00:00
icculus
15a2cec1ed Patched to compile. Accidentally removed va_list declaration.
FossilOrigin-Name: 673d470c0c14106da05461d355a0c09e5f62851d
2010-02-16 16:07:28 +00:00
dan
2b0ef4725f Change a C++ style comment in os_unix.c to use normal C style commenting.
FossilOrigin-Name: 7a1933097f2a95bd495c1621fca99e8952a1b25a
2010-02-16 12:18:47 +00:00
dan
5dcb3937b6 Fix for [e9a9fde1f4]. When opening an existing rtree, determine the node size by inspecting the root node of the r-tree structure (instead of assuming it is a function of the page-size).
FossilOrigin-Name: ebc9433fddf78ef7b4237686951d8d79c1c98f03
2010-02-16 10:59:40 +00:00
drh
9a6ffc845b Fix the ALTER TABLE RENAME command so that it converts FOREIGN KEY constraints
in ATTACH-ed and in TEMP tables as well as in the main database.
Ticket [13336e9c3c8c3f].

FossilOrigin-Name: ab197d0aaf18016ac2dd3674f49bea5f1556451c
2010-02-15 18:03:20 +00:00
drh
622d288790 When creating a trigger on a main database table when there is a TEMP table
with the same name, make sure the trigger is bound to the main table.
Ticket [985771e11612].

FossilOrigin-Name: ec914af32675e472694270d46f3ba2214eb2fe90
2010-02-15 16:54:55 +00:00
drh
a8c62df904 Fix a compiler warning in shell.c. Updates to comments in trigger.c.
FossilOrigin-Name: c727601eecd85a26dbd4fc36823d77bec34da3c3
2010-02-15 15:47:18 +00:00
drh
2d8d7cebe1 Fix a typo in the documentation for the OP_OpenPseudo opcode.
FossilOrigin-Name: 9acfb0694059c80b2efc08a60232d4be91575c32
2010-02-15 15:17:05 +00:00
icculus
1c11f74a8a Removed the 80-char line formatting for ErrorMsg(), on dhr's suggestion.
FossilOrigin-Name: 132ea4e5d7f69fc307904f5086a72d8532e5aac6
2010-02-15 00:01:04 +00:00
icculus
9e44cf1a03 Make Lemon able to compile as C++ code.
FossilOrigin-Name: 75a1060b29eb4122487152b068e7d1073eb0ccab
2010-02-14 17:14:22 +00:00
icculus
d191282111 Added option to not clip error output.
This is useful for IDEs and other tools that benefit from full path
information, so they can jump directly to the error line in the source code.

FossilOrigin-Name: 90602030d18152a934644db119a291aa38fe3fd4
2010-02-14 05:42:46 +00:00
icculus
f5ad824071 Delete output files if this is a failed run.
Otherwise, the fail will stop a Makefile from progressing, but if you
immediately run the build again, Make will think the output files are up to
date, since they are newer (albeit incomplete/incorrect).

FossilOrigin-Name: e38c08d9cdeb0476ac1a77cd3f29f547a8205835
2010-02-14 05:34:42 +00:00
icculus
42585cf73a Added %expect directive, to consider a certain number of conflicts "correct."
This has the side effect of changing the process exit code to never overflow.

FossilOrigin-Name: d8bab8cf0bc3fbd4c489c31a65d724dda2944d83
2010-02-14 05:19:56 +00:00
icculus
3e143bdfaf Added -T option, to specify a template filename on the command line.
The default is still "lempar.c", though.

FossilOrigin-Name: e6cbe1e5ee80db282a41951b805b7bd8b13adf28
2010-02-14 00:48:49 +00:00
shaneh
1f4222f84c Merged tracing and initialization changes from mutex_unix.c.
FossilOrigin-Name: 942aa1f6a91655356cc32a8185cb447331d405dc
2010-02-13 02:31:09 +00:00
drh
af034ed685 Enhancements to the secure_delete pragma to make it easier to use.
FossilOrigin-Name: 2bb38bb96ff6b9fb91dd1cf214041cf113ac5508
2010-02-12 19:46:26 +00:00
drh
5b47efa662 All the secure-delete setting to be changed at run-time using a pragma.
The SQLITE_SECURE_DELETE compile-time option determines the default setting.

FossilOrigin-Name: f72f8a870a0fc98a9f2b564ffafe7946bbce506e
2010-02-12 18:18:39 +00:00
dan
56f2996b48 Fix a segfault in fts3 that may occur if the snippet, offsets or matchinfo functions are used in a query that does not contain a MATCH clause.
FossilOrigin-Name: 14ab536a96f81595ab8c3dcd4b72075f1a827c8b
2010-02-10 05:33:17 +00:00
drh
309e6555a5 Make sure file descriptors are closed before unlinking in VxWorks.
FossilOrigin-Name: f64b81f13de4875343c752e7183bf61032dc9594
2010-02-05 18:00:26 +00:00
shaneh
6885de360d Avoid truncating non-in-memory sub-journals when releasing a savepoint for a small performance improvement.
FossilOrigin-Name: 27dc5b1c52eaa5f99cf44ee31204f62598fbf011
2010-02-05 16:28:00 +00:00
drh
6658cd9a74 Remove the use of 64-bit math in the offset computations of
the OP_Column opcode for a small performance improvement.

FossilOrigin-Name: 61a2c8d4d64c28119e9f06eb42f9c0437ba7a7bd
2010-02-05 14:12:53 +00:00
drh
a963896796 Fix a performance glitch that appears for large transactions.
FossilOrigin-Name: 26cb1df73504d5d883cf0967e57b46aa062d0b00
2010-02-04 17:38:31 +00:00
drh
b4a1fed2ea Add a new full-text search variant that tracks the total number of documents
and document sizes, to make ranking search results easier.  Currently
called FTS4.

FossilOrigin-Name: 1b6e6094c88214e02c9e3638932997ac20bfe413
2010-02-03 19:55:13 +00:00
drh
0ae0bfd486 Fix a C++-ism that snuck into sqlite3_finalize().
FossilOrigin-Name: fb96f2a2c63a061a90733448c4af14384893d409
2010-01-31 15:14:37 +00:00
drh
7c9c98684c If an OOM occurs while setting the page size for the TEMP database, be sure
that error gets reported back out to the interface layer.

FossilOrigin-Name: 6487e70a1e18bb01ee692e250b41c8652e34a87c
2010-01-31 14:18:21 +00:00
shaneh
959dda6d94 Tweaks for consistency to the SEE and CEROD API declarations in sqlite3.h.
FossilOrigin-Name: 299f74567b1b97a1fdc0a620ef382cfd24941809
2010-01-28 19:56:27 +00:00
drh
10a76c90e4 Make the TEMP file tables use the page size set for the main database.
Ticket [b80eeab588c4].  
Also copy over the changes from apple-osx check-in [7c3bede3f2].

FossilOrigin-Name: 5dcfb0c9e420d27e54a299b3991b98776651a507
2010-01-26 01:25:26 +00:00
dan
d3789b98a7 Fix two similar problems in fts3 that meant that an OOM error could cause a memory leak.
FossilOrigin-Name: 701ef64b3dbf45e52043e79e528002bd4b7a21e2
2010-01-22 15:48:18 +00:00
drh
5cb7434c72 Fix a segfault that can occur when the LHS of a LIKE operator has an
undefined collating sequence.  Ticket [1258875e07553].

FossilOrigin-Name: a82e6b4585b9ddba581204976cd5ea8704339185
2010-01-21 23:11:24 +00:00
drh
4b5db5ac9c Redesign the string to numeric value caster so that it is more likely to
work on unusual floating point hardware.

FossilOrigin-Name: 8bb1104c6f02c88eb09ed345890be71dee099485
2010-01-21 01:53:07 +00:00
dan
14d4cc4356 Fix a problem with handling OOM errors in fts3.
FossilOrigin-Name: f9c54e95ecf1c36c4750bb151e91d81c1d1bd596
2010-01-20 14:25:37 +00:00
drh
7ed97b9de9 Move the Apple OS-X VFS changes into the trunk.
FossilOrigin-Name: 571594bfbe89d9949bdb8b07712e96d0a3467c6e
2010-01-20 13:07:21 +00:00
drh
87f5c5f16e Manually copy over the rebustness fixes from the apple-osx branch.
FossilOrigin-Name: 095c74ea6260096f6a600fdc0edccf7ea24aace4
2010-01-20 01:20:56 +00:00
shaneh
b7977c5539 Fix a problem with the CLI where not all SQL commands were being echoed.
Added tests of same to tools/shell2.test.  Ticket [eb620916be].

FossilOrigin-Name: 7080ae3bc3828168483ac23d5b8976d67ea5089e
2010-01-18 18:17:10 +00:00
dan
1d0f43f0ae Fix test numbering in fts3snippet.test.
FossilOrigin-Name: 34f6854685f00158bc536dd53ac5bc20e19fe071
2010-01-15 17:33:49 +00:00
dan
3996a06236 Add coverage tests for fts3_snippet.c. Also fixes related to the same.
FossilOrigin-Name: 5e9d8ccae9731f380527463ef87ddcd216b4b721
2010-01-15 17:25:52 +00:00
dan
0153c35db5 Add a test to e_fts3.test for the matchinfo example in fts3.html.
FossilOrigin-Name: e5336edc55313afac11ea085257cb6e75a0287a7
2010-01-14 11:45:03 +00:00
dan
ceafa47b41 Fix some matchinfo related test problems in fts3rnd.test.
FossilOrigin-Name: da7abe05887d1ad52552d8ce3a153a0a76f96c5a
2010-01-14 11:17:05 +00:00
drh
a2460e0730 Comment cleanup in sqliteInt.h.
FossilOrigin-Name: 67c3aea563e019083f0ed87b57982a0379637d4f
2010-01-14 00:39:26 +00:00
drh
85c8f291e3 Make the sqlite3IsNaN() function a macro that evaluates to FALSE when
compiled with SQLITE_OMIT_FLOATING_POINT.

FossilOrigin-Name: 56f232d562bc239103a5afd2e64c4b926a20de08
2010-01-13 17:39:53 +00:00
drh
90038f8b07 When SQLITE_OMIT_FLOATING_POINT is defined, the floating-point formats in
the sqlite3_*printf() functions should pull an int64 off of the parameter
list and ignore it.

FossilOrigin-Name: 3fd6f9ad06b786116ca18c1e812363d30cd3060e
2010-01-13 16:43:27 +00:00
drh
c5a7b51c69 When SQLITE_OMIT_FLOATING_POINT is defined, make sure the result of a
mathematical operation is always tagged as an integer.

FossilOrigin-Name: e12da0d316fcc34a75554d59fe6d11d9f0e059e2
2010-01-13 16:25:42 +00:00
drh
52d14521fa Make the doubleToInt64() routine a pass-through when using OMIT_FLOATING_POINT.
FossilOrigin-Name: 417167182efaa1da74008952137de3e00c23494e
2010-01-13 15:15:40 +00:00
dan
33d58bcee9 Add tests to backup.test to verify that SQLite behaves as expected when the source database is modified mid-backup.
FossilOrigin-Name: 985d3bec07430536485056bcd2ae0471791601ed
2010-01-13 14:08:01 +00:00
drh
44dbca83c7 Comment out unused code when SQLITE_OMIT_FLOATING_POINT is selected.
Added testcase() macros to boundary conditions in util.c routines.

FossilOrigin-Name: dfc6595d347ea87923a857778b68751103f535d2
2010-01-13 04:22:20 +00:00
drh
7ec5ea942e Make the sqlite3_result_double() interface work the same as
sqlite3_result_int64() when SQLITE_OMIT_FLOATING_POINT is defined.

FossilOrigin-Name: 61df5986600b6c9e6d5c42efc0067a27fe54251f
2010-01-13 00:04:13 +00:00
drh
6a9c64b363 Make sure internal queries are well ordered, even when the
reverse_unordered_selects pragma is in effect.
Ticket [eb942c64a157].

FossilOrigin-Name: 0209f17180065d9c213b6c437be1c3c40660665f
2010-01-12 23:54:14 +00:00
drh
2b1e690ff1 Fix the implementation of CURRENT_TIMESTAME and CURRENT_DATE when
SQLITE_OMIT_DATETIME_FUNCS is defined.

FossilOrigin-Name: eb98265b59db59965b468a7070739921da55efc4
2010-01-12 19:28:20 +00:00
dan
f596da5cc6 Update comments in fts3_snippet.c.
FossilOrigin-Name: dd9689b7c31861484f8d8062478ae73d3c940902
2010-01-12 17:57:30 +00:00
drh
13573c71d8 Use #ifdefs to disable unused code when SQLITE_OMIT_FLOATING_POINT is defined.
FossilOrigin-Name: 66bab8561926963a87f15ad559cba36545c9892c
2010-01-12 17:04:07 +00:00
drh
ab2f1f9560 Add a few documentation evidence comments to the built-in function
implementations.

FossilOrigin-Name: 8bd0f8147dbf75367243b3eecfb705da6e794ab7
2010-01-11 18:26:42 +00:00
dan
9a34020f05 Modify snippets code to run more efficiently. And to avoid a bug relating to snippets based on full-text queries that contain duplicate terms.
FossilOrigin-Name: a2b1183d9e9898d06d623b342bbb552e85a9b3f6
2010-01-11 12:00:47 +00:00
dan
1a54b8ecfa Fix handling of an OOM error in the fts3 offsets() function. Fix a couple of snippet related test cases in e_fts3.test.
FossilOrigin-Name: 14dc46a74aafe44c0bf7dffd26268395b2c5edb2
2010-01-09 07:33:54 +00:00
drh
819443e506 Update comments in fts3.c to more accurately describe the doclist format.
FossilOrigin-Name: e424a0307359fee6875424c10ecad1a10acfba0e
2010-01-08 23:01:32 +00:00
shaneh
0a7905295c Added option to dump pages.
FossilOrigin-Name: 08c545f03082421166a21274b39e07bb348c17e6
2010-01-08 04:50:22 +00:00
shaneh
d61fa23290 Minor tweaks to restore_jrnl.tcl utility script.
FossilOrigin-Name: b97aca1200d959a1e7c08dd4e9dbce4724342119
2010-01-07 22:02:34 +00:00
shaneh
ea6800c5c4 Small tool that attempts to repair a journal header.
FossilOrigin-Name: 05b18b5f6a38f513ff49656faada725eb44715b7
2010-01-07 21:49:48 +00:00
drh
1d9da70ad7 Fix the expression comparison logic to take the COLLATE operator into account.
Ticket [360c6073e197]

FossilOrigin-Name: 44bb1bfe5dedd8054ddd933941ee4112ed8d3b68
2010-01-07 15:17:02 +00:00
dan
93a696f61b Changes to test code so that testfixture compiles when OMIT_SHARED_CACHE and OMIT_UTF16 are defined.
FossilOrigin-Name: d6ee5ff6c815e3aadd92d331560b529394eae661
2010-01-07 11:27:30 +00:00
dan
3174598a64 Fixes to problems in FTS3 snippet() function found by th3 tests.
FossilOrigin-Name: 3b5ccd2682176929f4da8a3f39a7e8f58b179f18
2010-01-07 10:54:28 +00:00
drh
8dc3e8f3e6 Another attempt at fixing the table generator in lemon. Again, this does
not effect the SQLite grammar.

FossilOrigin-Name: e22c090f35b3a2bac64781d33aa1123ed765dbbf
2010-01-07 03:53:03 +00:00
dan
c06013dca7 Fix a segfault that can occur following an OOM in the FTS3 snippet() function
FossilOrigin-Name: c7e5966e3b031672f149d0b6e1f75f9bc40868fa
2010-01-06 18:36:27 +00:00
dan
b023b04fcb Change the fts3 snippet function to return (hopefully) more relevant snippets in less time.
FossilOrigin-Name: 8a208223a74d451f60d9cd707d63fb7d157d1737
2010-01-06 17:19:21 +00:00
drh
cf3e518506 Fix an issue with lemon generating incorrect grammars. This issue does
not effect SQLite.

FossilOrigin-Name: 077a6bee2dd4668a5b13c37aa7d4c052350ec782
2010-01-06 13:07:30 +00:00
drh
ac0e8fe946 Version 3.6.22 Release Candidate 2
FossilOrigin-Name: 28d0d7710761114a44a1a3a425a6883c661f06e7
2010-01-05 15:30:36 +00:00
shaneh
bb6b9878d7 Removed compiler warnings in MSVC.
FossilOrigin-Name: 4ecb4725b76042ac414caf90039d5d0a5f8f7068
2010-01-05 14:18:54 +00:00
drh
3918795951 Make sure new pages are zeroed even when loading a freelist page using the
noContent option.  This prevents a harmless valgrind warning.

FossilOrigin-Name: e47e213369a2652d7eb6bddd58617959e21ca82b
2010-01-05 13:40:35 +00:00
dan
4564cedd80 Fix a problem in the shell tool. In some cases sqlite3_errmsg() was being called before sqlite3_finalize(), causing error messages to be more generic than they should be.
FossilOrigin-Name: e5d07045fabe0803715cfb291aa9e971235cb08a
2010-01-05 04:59:56 +00:00
drh
10f864e8ef In the debugging memory allocator, initialize new memory allocations to
pseudo-randomness in an effort to find problems with memcmp() of structures
that have uninitialized pad bytes.

FossilOrigin-Name: 6462817b2f817a6105449b0ea3e1e336e42571d1
2010-01-05 03:30:15 +00:00
drh
9061ad10bc Fix a case in os_unix.c where two structures that might have uninitialized
padding bytes are compared using memcmp().

FossilOrigin-Name: e02f25560216c7c96c5e1c7e71a8531650b3a96f
2010-01-05 00:14:49 +00:00
drh
6070f7eed4 Version 3.6.22 Release Candidate 1
FossilOrigin-Name: 9d8ab0f1f5ea4f05a685ea6541f501532514e8c5
2010-01-04 13:30:15 +00:00
dan
a98af17af6 Add experimental implementation of FTS3 functions matchinfo() and snippet() (not enabled by default).
FossilOrigin-Name: 51f7ee844057086789dcfcdcba7daf45343cae62
2010-01-02 19:02:02 +00:00
drh
855787a1b3 Fix a bug in the new sqlite3_test_control case of the previous check-in.
FossilOrigin-Name: 3b77701bc854997346e9cc33fe64d00d4b6332bd
2010-01-02 03:46:43 +00:00
drh
0e857739c4 Add a new sqlite3_test_control() verb that facilitates testing that all
keywords are shown in the documentation.  (Two keywords were found to
be missing while testing the change.)

FossilOrigin-Name: d3cdc4b12be7f1ed2249ad210482200868956d12
2010-01-02 03:21:35 +00:00
drh
c79c761f84 Add evidence marks associated with autoincrement.
FossilOrigin-Name: 0e918c54893c361fb005295847f89aadcbfae35d
2010-01-01 18:57:48 +00:00
drh
5cfa584831 Add comments and an assert() to help clarify the operation of the
sqlite3VdbeList() routine used to implement EXPLAIN.

FossilOrigin-Name: e1ccdb93d79a6f7b16f1f59cc3ad78f8d02eae84
2009-12-31 20:35:08 +00:00
shaneh
f33a7a8cef Minor changes to test scripts to support various SQLITE_OMIT options.
FossilOrigin-Name: 97f8a886b6314b044a0522a88f569798fdfb3ef9
2009-12-31 19:48:29 +00:00
shaneh
46aae3c0da Changes to remove warnings in MSVC build.
FossilOrigin-Name: 6cf76c2ae25d6e58926637ecd42eed6b300b1a25
2009-12-31 19:06:23 +00:00
drh
9ede952ab5 Change evidence marks to track requirement number changes in the foreign-key
documentation.

FossilOrigin-Name: 6b4fcd81e775ff4c5d7bc454378555cf73cf5772
2009-12-31 15:51:38 +00:00
drh
faceaf1ffd Change the version number to 3.6.22.
FossilOrigin-Name: 96919a46bbd63cb1794c8eb96b6ad23ecc09ba6b
2009-12-30 14:19:11 +00:00
drh
f49f352320 Adjustments to column cache handling in order to restore 100% branch
test coverage.

FossilOrigin-Name: cc6b959bc1f968e08eea1afd387201d70a0c1e80
2009-12-30 14:12:38 +00:00
drh
27ee406e2c Remove some code in the column cache that is no longer used. Replace it with
an assert().

FossilOrigin-Name: 1f890efb7863bd743b9f6ef841e0c0c4e67d76e1
2009-12-30 01:13:11 +00:00
drh
c82b7513bf Remove obsolete comment text from expr.c. No functional code changes.
FossilOrigin-Name: 84058be0beb799bc989d73a8d4cd8791ab709395
2009-12-30 00:12:39 +00:00
drh
25e978df92 Within the special new.* and old.* tables of a trigger, recognize all the
original table names even if those names overload the "rowid", "oid", or
"_rowid_" special names.  Ticket [34d2ae1c6d0].

FossilOrigin-Name: 1a0e5fa9f0ff792c678c99d49960601a0cef925b
2009-12-29 23:39:04 +00:00
dan
8718183ea5 Fix a bug triggered by optimizing an FTS3 table when there are no segments on disk but pending terms in the hash table.
FossilOrigin-Name: a3b50e4f80ca2dacc1f72435b8c72d55ffdb64e7
2009-12-29 10:32:36 +00:00
drh
b6da74ebd5 Immediately purge entries from the column cache when the associated register
undergoes an affinity change.  Ticket [eb5548a849].  Enhance the
SQLITE_TESTCTRL_OPTIMIZATIONS setting of sqlite3_test_control so that it
can disable the column cache for testing purposes, in an effort to prevent
future problems of a similar nature to this one.

FossilOrigin-Name: ea4e57e1c1b6663ceb12872e31a8503f6c14e3d8
2009-12-24 16:00:28 +00:00
drh
07096f68ae Move the query flattener turn-off from a pragma to an sqlite3_test_control()
call.  Make provisions (not yet implemented) to turn off other optimizers
using the same call.

FossilOrigin-Name: 4a97c623f4e190134de4b2ca406e311034a74797
2009-12-22 23:52:32 +00:00
dan
3540c1f7b8 Add the experimental FTS3 matchinfo() function. Provides details of the match that may be used for result ranking and other purposes.
FossilOrigin-Name: 37a1de02d1d8a34604f1bee896eaf579d4ba149a
2009-12-22 18:56:19 +00:00
drh
7b688ede64 Add a pragma to disable the query flattener - for use during testing.
FossilOrigin-Name: 1d8550e5c88db0ea76aea579c1a5bf99d48fbe43
2009-12-22 00:29:53 +00:00
dan
bf3e3a06cf Change many comments in e_fkey.test to include the full text of the corresponding statement in foreignkeys.html.
FossilOrigin-Name: 4b489ecb250ea0e80d5bf8806f07259e1107f8ad
2009-12-21 08:53:18 +00:00
dan
e61fc3b6a8 Fix a problem in FTS3 phrase queries. Add tests to check that it really is fixed.
FossilOrigin-Name: 956de051f43dfc2f178a7820981da4bf69927190
2009-12-20 15:00:19 +00:00
shaneh
c7d526e92b Modified statement machine in sqlite3_complete() to return 0 on empty string.
Added/updated tests for same.  Ticket 356c885b0b.

FossilOrigin-Name: 76eca7295cf7df4bef013af6c8c37251300cd383
2009-12-17 22:17:38 +00:00
shaneh
4e7b32f37f Fixed some TCL test cases to work if SQLITE_OMIT_TRIGGER is defined.
FossilOrigin-Name: 85e3c73497d72d09becf728efe81041277ca1730
2009-12-17 22:12:51 +00:00
shaneh
ca7dfda1d4 Updated and added new test cases for CLI.
FossilOrigin-Name: 29e3c8da1bd3971215036e5f5cfa5b25c6caa81f
2009-12-17 21:07:54 +00:00
shaneh
13b3602e1c In shell.c (CLI), modified local_getline() to remove '\r' as well as '\n' from end of lines.
FossilOrigin-Name: b1b48be1cf55f3179eab8824cf5fee8100518845
2009-12-17 21:07:15 +00:00
shaneh
d77f56efe5 Fix typo in comment of prepare.c.
FossilOrigin-Name: 333c3ffe6d4d2293d01958812b9c02b0bf9796a4
2009-12-17 21:05:42 +00:00