]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
16 years agoChange "... myfunction() { ... }" to "... myfunction(void) { ... }" in a few pla
danielk1977 [Tue, 7 Apr 2009 11:21:28 +0000 (11:21 +0000)] 
Change "... myfunction() { ... }" to "... myfunction(void) { ... }" in a few pla
ces. Ticket #3783. (CVS 6462)

FossilOrigin-Name: 6f79e6ae0d30948db4ba26bb5b448c15c470464f

16 years agoHave OP_IdxRowid handle the case where the index entry it is reading from is deleted...
danielk1977 [Tue, 7 Apr 2009 09:16:56 +0000 (09:16 +0000)] 
Have OP_IdxRowid handle the case where the index entry it is reading from is deleted. (CVS 6461)

FossilOrigin-Name: cdad29b582ca832f6a717d8a6e3f3bca424e84a4

16 years agoCompile fixes and improvements for vxwork: fixed deadlock in semClose,
chw [Tue, 7 Apr 2009 05:35:03 +0000 (05:35 +0000)] 
Compile fixes and improvements for vxwork: fixed deadlock in semClose,
detect if fcntl is usable, fall back to named semaphores if not. (CVS 6460)

FossilOrigin-Name: efd0682b7e78acc4242cf257fc246350fc29b5c8

16 years agoRemove an unused test for EXPLAIN-mode in the PRAGMA processing. (CVS 6459)
drh [Tue, 7 Apr 2009 00:49:16 +0000 (00:49 +0000)] 
Remove an unused test for EXPLAIN-mode in the PRAGMA processing. (CVS 6459)

FossilOrigin-Name: 909683b3428784ce91d222ccf887033d86250bd5

16 years agoAlways enable WHERE-tracing on a test build.
drh [Tue, 7 Apr 2009 00:43:28 +0000 (00:43 +0000)] 
Always enable WHERE-tracing on a test build.
Oops - accidentally included a debugging change to pragma.c in
this check-in.  The real fix for the pragma problem is in the
following checking. (CVS 6458)

FossilOrigin-Name: 567cf90b038a37da93d02954ef8f9f435dcc9a38

16 years agoIt is OK for a unix file descriptor to be zero. It just can't be negative.
drh [Tue, 7 Apr 2009 00:35:20 +0000 (00:35 +0000)] 
It is OK for a unix file descriptor to be zero.  It just can't be negative.
Adjust an assert accordingly.  Ticket #3781. (CVS 6457)

FossilOrigin-Name: 47aa7eb0e047e30bbf09cb08c1e48c61f8d9861c

16 years agoTest cases and minor code changes to increase coverage of btree.c. (CVS 6456)
danielk1977 [Mon, 6 Apr 2009 17:50:03 +0000 (17:50 +0000)] 
Test cases and minor code changes to increase coverage of btree.c. (CVS 6456)

FossilOrigin-Name: def3a016914f683818b5f013ec4efecbb8fd4c0d

16 years agoUpdates and clarification to the documentation of the sqlite3_temp_directory
drh [Mon, 6 Apr 2009 15:55:03 +0000 (15:55 +0000)] 
Updates and clarification to the documentation of the sqlite3_temp_directory
global variable.  No changes to code. (CVS 6455)

FossilOrigin-Name: aea99c572a69a00b709f0de816ea16488d899375

16 years agoAllow "default" to be a keyword used by PRAGMA statements. (CVS 6454)
drh [Mon, 6 Apr 2009 14:16:43 +0000 (14:16 +0000)] 
Allow "default" to be a keyword used by PRAGMA statements. (CVS 6454)

FossilOrigin-Name: ed99d2d97f11784dda0f61f8e7d0eb5ca1bca371

16 years agoMake sure the reverse_unordered_selects pragma works even on unindexed
drh [Mon, 6 Apr 2009 12:26:57 +0000 (12:26 +0000)] 
Make sure the reverse_unordered_selects pragma works even on unindexed
tables that are queried without a WHERE clause (CVS 6453)

FossilOrigin-Name: d8c6b28a734fccbbbd567d98ffa7e6557280f737

16 years agoCheck-in (6450) introduced the possibility of calling memset() with a
drh [Mon, 6 Apr 2009 11:11:42 +0000 (11:11 +0000)] 
Check-in (6450) introduced the possibility of calling memset() with a
negative 3rd argument.  This fixes that bug.  Ticket #3777. (CVS 6452)

FossilOrigin-Name: 8ca612c42e0de3ef5b2f92d80a56db1bef34b1c6

16 years agoFix a segfault in Lemon that occurs if the input grammar does not define
drh [Sun, 5 Apr 2009 15:18:02 +0000 (15:18 +0000)] 
Fix a segfault in Lemon that occurs if the input grammar does not define
a type for tokens.  This does not effect SQLite since the SQLite grammar
does define a type for tokens. (CVS 6451)

FossilOrigin-Name: 4424aee958b2e764a61141b5c66c063e36ed5aae

16 years agoAdditional code to make sure and to assert that memory allocations have
drh [Sun, 5 Apr 2009 12:22:08 +0000 (12:22 +0000)] 
Additional code to make sure and to assert that memory allocations have
8-byte alignment.  Ticket #3777. (CVS 6450)

FossilOrigin-Name: 208382e032134d9c78fe1cfcb98ce9defb4e3e26

16 years agoAllow the journal_size_limit to be larger than 2147483647 bytes. (CVS 6449)
drh [Sat, 4 Apr 2009 16:02:32 +0000 (16:02 +0000)] 
Allow the journal_size_limit to be larger than 2147483647 bytes. (CVS 6449)

FossilOrigin-Name: 81931259611ef10de731ea0e38cee92eb8629733

16 years agoAllow the journal_mode for in-memory databases to be either OFF or MEMORY,
drh [Sat, 4 Apr 2009 15:53:47 +0000 (15:53 +0000)] 
Allow the journal_mode for in-memory databases to be either OFF or MEMORY,
not just MEMORY. (CVS 6448)

FossilOrigin-Name: 11c77f4c2c2beee5267ea6e2f1a4bb845531b42c

16 years agoClarify the meanings of the SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags
drh [Sat, 4 Apr 2009 14:04:58 +0000 (14:04 +0000)] 
Clarify the meanings of the SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags
passed into the xSync method of the VFS.  Comment changes only - no changes
to code. (CVS 6447)

FossilOrigin-Name: c47aeb37a1c054a8e0444b95e29cb332599af2d8

16 years agoRemove a blank line in sqlite.h.in that was preventing the
drh [Fri, 3 Apr 2009 12:12:58 +0000 (12:12 +0000)] 
Remove a blank line in sqlite.h.in that was preventing the
SQLITE_LOCKED_SHAREDCACHE constant appears in the automatically-generated
documentation.  Ticket #3775. (CVS 6446)

FossilOrigin-Name: 65f9d3b948cd6ed4728ab49833b9f2fca96563a2

16 years agoUse integer rather than floating point compuations in converting from julian
drh [Fri, 3 Apr 2009 12:04:36 +0000 (12:04 +0000)] 
Use integer rather than floating point compuations in converting from julian
day number to unix-time to avoid round-off errors on Borland compilers.
Ticket #3769. (CVS 6445)

FossilOrigin-Name: c26f97bd857f3ddb15e63216cdd4a00e06d8eac8

16 years agoFix the PRAGMA parser so that it can accept negative numbers in parentheses,
drh [Fri, 3 Apr 2009 01:43:57 +0000 (01:43 +0000)] 
Fix the PRAGMA parser so that it can accept negative numbers in parentheses,
like the syntax diagrams say it should be able to. (CVS 6444)

FossilOrigin-Name: 286e83178ddcd2efe2888697bcf8cc95ccdef880

16 years agoMake sure count(*) works on the sqlite_master table of an empty database.
drh [Thu, 2 Apr 2009 20:27:28 +0000 (20:27 +0000)] 
Make sure count(*) works on the sqlite_master table of an empty database.
Ticket #3774. (CVS 6443)

FossilOrigin-Name: e0c1a780f5a356c48b2a4cc66fab988fe441722f

16 years agoMake sure the VACUUM statement locks down the page_size and auto_vacuum
drh [Thu, 2 Apr 2009 20:16:58 +0000 (20:16 +0000)] 
Make sure the VACUUM statement locks down the page_size and auto_vacuum
modes after it runs.  Otherwise, pragmas might change these settings on
a populated database, resulting in problems. (CVS 6442)

FossilOrigin-Name: 85e6a4740d6db731c8c35a331031c346e9189c27

16 years agoFix the sqlite3_prepare() family of interfaces so that they zero the *ppStmt
drh [Thu, 2 Apr 2009 18:32:26 +0000 (18:32 +0000)] 
Fix the sqlite3_prepare() family of interfaces so that they zero the *ppStmt
value even on an SQLITE_MISUSE return.  Make it clear in the documentation
that the ppStmt parameter cannot be zero. (CVS 6441)

FossilOrigin-Name: 23bf9f266559603e37b2703715eaf8ef5af6bb17

16 years agoFix a problem causing the BtShared.isPending flag to be cleared to early. Also covera...
danielk1977 [Thu, 2 Apr 2009 18:28:08 +0000 (18:28 +0000)] 
Fix a problem causing the BtShared.isPending flag to be cleared to early. Also coverage improvements for btree.c. (CVS 6440)

FossilOrigin-Name: 8f1423445b29a5f52ed907de6db82128a96ebfe2

16 years agoEnsure the required VerifyCookie/Transaction/TableLock opcodes are added for "x
danielk1977 [Thu, 2 Apr 2009 17:23:32 +0000 (17:23 +0000)] 
Ensure the required VerifyCookie/Transaction/TableLock opcodes are added for "x
IN (SELECT c FROM t)" expressions. Ticket #3771. (CVS 6439)

FossilOrigin-Name: 058a2f20930d7707c03c3c27db8e761d5657ee46

16 years agoFix a couple of harmless nuisance warnings. (CVS 6438)
drh [Thu, 2 Apr 2009 17:22:41 +0000 (17:22 +0000)] 
Fix a couple of harmless nuisance warnings. (CVS 6438)

FossilOrigin-Name: 53dac0a455b9a822f710c257711e8d319060cf84

16 years agoDisable the query flattening optimization when the subquery is a compound
drh [Thu, 2 Apr 2009 16:59:47 +0000 (16:59 +0000)] 
Disable the query flattening optimization when the subquery is a compound
query with an ORDER BY clause.  Ticket #3773 shows why that combination
does not work. (CVS 6437)

FossilOrigin-Name: 23f90d50737a36ebd17152dd4667948ce7049967

16 years agoChange the way that the random() SQL function prevents the maximum
drh [Thu, 2 Apr 2009 14:05:21 +0000 (14:05 +0000)] 
Change the way that the random() SQL function prevents the maximum
negative integer so that it is testable. (CVS 6436)

FossilOrigin-Name: 995f2b9b1031fadc85e179701536b9dd4153654b

16 years agoUse ALWAYS and NEVER macros on unchangeable conditions within func.c. (CVS 6435)
drh [Thu, 2 Apr 2009 13:36:37 +0000 (13:36 +0000)] 
Use ALWAYS and NEVER macros on unchangeable conditions within func.c. (CVS 6435)

FossilOrigin-Name: eb65e64e7ed5edbe506365971d4d81ea037098d3

16 years agoIn the built-in SQL function implementations, improve some comments, fix
drh [Thu, 2 Apr 2009 10:16:17 +0000 (10:16 +0000)] 
In the built-in SQL function implementations, improve some comments, fix
an off-by-one error in detecting over-size strings, and add testcase()
macros to verify that boundary values have been tested. (CVS 6434)

FossilOrigin-Name: 868a487f5fd7c795e04a08de36a85ba1e06bc8c6

16 years agoEnforce the run-time sqlite3_limit() length limit on zeroblob(), not just
drh [Thu, 2 Apr 2009 09:07:12 +0000 (09:07 +0000)] 
Enforce the run-time sqlite3_limit() length limit on zeroblob(), not just
the compile-time SQLITE_MAX_LENGTH limit. (CVS 6433)

FossilOrigin-Name: a04f9e7959325da18f66a1aa4ead1c50993807cb

16 years agoIncrease test coverage of bitvec.c slightly. Fix the line length on a
drh [Wed, 1 Apr 2009 23:49:04 +0000 (23:49 +0000)] 
Increase test coverage of bitvec.c slightly.  Fix the line length on a
comment in bitvec.c. (CVS 6432)

FossilOrigin-Name: ca3aa3ba7d751be1c2bcd100a203cd9c794a6cef

16 years agoMark untestable branches of memjournal.c as such. Reduce the size of a
drh [Wed, 1 Apr 2009 23:09:43 +0000 (23:09 +0000)] 
Mark untestable branches of memjournal.c as such.  Reduce the size of a
single block allocation to a power of two.  Reenable the inmemory_journal
permutation test. (CVS 6431)

FossilOrigin-Name: 05c182a5db9fa96f2d588dd884ce77916b0e60e4

16 years agoFix the strftime() function so that the %s format can handle dates outside
drh [Wed, 1 Apr 2009 20:44:13 +0000 (20:44 +0000)] 
Fix the strftime() function so that the %s format can handle dates outside
of the range of 1901 to 2038.  Ticket #3769. (CVS 6430)

FossilOrigin-Name: a95b843a9251ca9f9a23e8b67c2126f4c297a534

16 years agoChange an unreachable error condition test to an assert() in rowset.c. (CVS 6429)
drh [Wed, 1 Apr 2009 19:35:55 +0000 (19:35 +0000)] 
Change an unreachable error condition test to an assert() in rowset.c. (CVS 6429)

FossilOrigin-Name: 36115e4073528f03253dd94fadf3954522c0dfb9

16 years agoRemove an unreachable branch from lockBtree(). Add comments. (CVS 6428)
danielk1977 [Wed, 1 Apr 2009 19:07:03 +0000 (19:07 +0000)] 
Remove an unreachable branch from lockBtree(). Add comments. (CVS 6428)

FossilOrigin-Name: 859792958b4d4a3623d68526ff773f778bdf3f0d

16 years agoFix a bug in the sqlite3Utf16ByteLen() function so that it computes the
drh [Wed, 1 Apr 2009 18:40:32 +0000 (18:40 +0000)] 
Fix a bug in the sqlite3Utf16ByteLen() function so that it computes the
correct length even for strings that contain surrogate pairs.
Ticket #3766. (CVS 6427)

FossilOrigin-Name: 766bb7e59c28884e40ce13e3fc55c870d06d7e34

16 years agoTest that two database connections that use different VFS implementations may not...
danielk1977 [Wed, 1 Apr 2009 18:25:54 +0000 (18:25 +0000)] 
Test that two database connections that use different VFS implementations may not share a cache. (CVS 6426)

FossilOrigin-Name: 3a92c95644ead7c4728ffec1ec70676663518188

16 years agoRemove the unused SQLITE_Vtab flag. (CVS 6425)
danielk1977 [Wed, 1 Apr 2009 18:03:00 +0000 (18:03 +0000)] 
Remove the unused SQLITE_Vtab flag. (CVS 6425)

FossilOrigin-Name: fdd78962fcb988edfb4147394045fc5d3944c620

16 years agoIn pageReinit() in btree.c, only reinitialize a page if there are one or more referen...
danielk1977 [Wed, 1 Apr 2009 17:13:51 +0000 (17:13 +0000)] 
In pageReinit() in btree.c, only reinitialize a page if there are one or more references to it, not including the transient reference held by pager.c. This was always the intent. (CVS 6424)

FossilOrigin-Name: 0c5a7d1117cfb322d1c89da89e8887b0bb091602

16 years agoRemove dead code from the UTF conversion routines. Fix a bug in
drh [Wed, 1 Apr 2009 16:33:37 +0000 (16:33 +0000)] 
Remove dead code from the UTF conversion routines.  Fix a bug in
sqlite3_prepare16_v2() in which an out-of-memory error fails to
set the statement return pointer to NULL. (CVS 6423)

FossilOrigin-Name: 94e2f815ebb38981a2226d8aed9f3731f8833f7c

16 years agoRemove an unreachable branch from allocateSpace() in btree.c. Add comments and assert...
danielk1977 [Wed, 1 Apr 2009 16:25:32 +0000 (16:25 +0000)] 
Remove an unreachable branch from allocateSpace() in btree.c. Add comments and asserts to the same function. (CVS 6422)

FossilOrigin-Name: f8e15a542df67fd9dc1c91c7d9e1c4df59acb82b

16 years agoAdd some assert() statements to querySharedCacheTableLock(). (CVS 6421)
danielk1977 [Wed, 1 Apr 2009 09:41:54 +0000 (09:41 +0000)] 
Add some assert() statements to querySharedCacheTableLock(). (CVS 6421)

FossilOrigin-Name: 3e3b5e861aeff2e4ef568c422236fdf7fa22bed3

16 years agoadd a sanity check to make sure the configure script and VERSION file are always...
vapier [Wed, 1 Apr 2009 07:38:31 +0000 (07:38 +0000)] 
add a sanity check to make sure the configure script and VERSION file are always in sync (CVS 6420)

FossilOrigin-Name: 1b9da6d73f603e66d078463c3571dda86ceedfb3

16 years agoupdate configure script so it has proper VERSION in it (CVS 6419)
vapier [Tue, 31 Mar 2009 23:29:15 +0000 (23:29 +0000)] 
update configure script so it has proper VERSION in it (CVS 6419)

FossilOrigin-Name: ce683cbd329eab45abb6f97f677f560b0fd1cdb6

16 years agoVersion 3.6.12 (CVS 6418)
drh [Tue, 31 Mar 2009 13:16:55 +0000 (13:16 +0000)] 
Version 3.6.12 (CVS 6418)

FossilOrigin-Name: 0db862a23aa4aae949d5cd90ad395a7f073d7fb8

16 years agoFix compiler warnings from gcc and MSVC; Correct typo in select.c; (CVS 6417)
shane [Tue, 31 Mar 2009 03:41:56 +0000 (03:41 +0000)] 
Fix compiler warnings from gcc and MSVC; Correct typo in select.c; (CVS 6417)

FossilOrigin-Name: 768514179a63783c4e70b931d1697403c04bedf5

16 years agoMake sure a ROLLBACK that follows an incremental vacuum works. Ticket #3761. (CVS...
drh [Tue, 31 Mar 2009 02:54:40 +0000 (02:54 +0000)] 
Make sure a ROLLBACK that follows an incremental vacuum works.  Ticket #3761. (CVS 6416)

FossilOrigin-Name: 8c1d0c6ad9646816eb8ca15b7df4e79b9b1b59ee

16 years agoRemove two unused lines from pcache.c. (CVS 6415)
drh [Tue, 31 Mar 2009 01:32:18 +0000 (01:32 +0000)] 
Remove two unused lines from pcache.c. (CVS 6415)

FossilOrigin-Name: d5cab05c9ecbc5cb5e9ed658a55c35434717e969

16 years agoAdded a test case for ticket #3672. (CVS 6414)
drh [Tue, 31 Mar 2009 00:50:35 +0000 (00:50 +0000)] 
Added a test case for ticket #3672. (CVS 6414)

FossilOrigin-Name: 7f40576dd76cb67f5248739a0ef1fbe496a3b42a

16 years agoFix a case where a pointer map page was not being journalled before a file truncation...
danielk1977 [Mon, 30 Mar 2009 18:50:04 +0000 (18:50 +0000)] 
Fix a case where a pointer map page was not being journalled before a file truncation that occurs as part of an incremental vacuum. (CVS 6413)

FossilOrigin-Name: c5890935a0247090162feda73cfea85012317050

16 years agoAdd a comment to the pageReinit() routine explaining why the return code from
drh [Mon, 30 Mar 2009 17:19:48 +0000 (17:19 +0000)] 
Add a comment to the pageReinit() routine explaining why the return code from
sqlite3BtreeInitPage() is ignored.  Comment change only - no changes to code. (CVS 6412)

FossilOrigin-Name: 10f605be8c92ff94625a0da0e23b2ffd55ec7509

16 years agoModify integrity-check to prevent a buffer overread when dealing with a corrupted...
danielk1977 [Mon, 30 Mar 2009 13:53:43 +0000 (13:53 +0000)] 
Modify integrity-check to prevent a buffer overread when dealing with a corrupted database. (CVS 6411)

FossilOrigin-Name: 3c9097f19adae071a12e1114f64993d0c1da1163

16 years agoMake sure recursive calls to winOpen() preserve the pVfs pointer.
drh [Mon, 30 Mar 2009 13:04:17 +0000 (13:04 +0000)] 
Make sure recursive calls to winOpen() preserve the pVfs pointer.
Fault found while testing a mingw build in VMWare. (CVS 6410)

FossilOrigin-Name: 18b44f0df3d75689fb5cee20120eb3c6ae5882b3

16 years agoAvoid calls to newer TCL interfaces in the test logic. This helps the
drh [Mon, 30 Mar 2009 12:56:52 +0000 (12:56 +0000)] 
Avoid calls to newer TCL interfaces in the test logic.  This helps the
TCL test harness compile without warnings and link when using older versions
of the TCL library. (CVS 6409)

FossilOrigin-Name: 1ad176375746d680225d7ecddca54bc281b1556d

16 years agoAvoid all use of the "LL" suffix for long-long integer literals.
drh [Mon, 30 Mar 2009 12:42:45 +0000 (12:42 +0000)] 
Avoid all use of the "LL" suffix for long-long integer literals.
Ticket #3759. (CVS 6408)

FossilOrigin-Name: 7ef36935424013a1b211906620954a97ffe08de7

16 years agoDisplay a warning that the notify2-3 test sometimes fails on single-core
drh [Mon, 30 Mar 2009 11:59:30 +0000 (11:59 +0000)] 
Display a warning that the notify2-3 test sometimes fails on single-core
machines. (CVS 6407)

FossilOrigin-Name: ab7c718dec56859c51bfb0b1c1d70a7c84feffd1

16 years agoAnother change related to (6401) and (6402): When an attempt to unlock a file fails...
danielk1977 [Mon, 30 Mar 2009 07:39:35 +0000 (07:39 +0000)] 
Another change related to (6401) and (6402): When an attempt to unlock a file fails in os_unix.c, close all files held open waiting for the unlock event anyway.
 This prevents a file-descriptor leak when testing IO errors. (CVS 6406)

FossilOrigin-Name: 50fbcdea045f7d4266d9afa721616c720564aa93

16 years agoAdd a comment to the doubleToInt64() routine that explains why returning
drh [Sun, 29 Mar 2009 15:12:09 +0000 (15:12 +0000)] 
Add a comment to the doubleToInt64() routine that explains why returning
minInt is in fact correct when it seems like maxInt should be returned. (CVS 6405)

FossilOrigin-Name: 7f3be3608542bbc6ac7916e5c3a5436e5f0a552e

16 years agoTurn off the debugging macros in where.c - left on by mistake in the
drh [Sun, 29 Mar 2009 00:15:54 +0000 (00:15 +0000)] 
Turn off the debugging macros in where.c - left on by mistake in the
previous check-in. (CVS 6404)

FossilOrigin-Name: b601a57582051184baa37b807b1e18db93313e13

16 years agoImprovements to cost estimation for evaluating the IN operator.
drh [Sun, 29 Mar 2009 00:13:03 +0000 (00:13 +0000)] 
Improvements to cost estimation for evaluating the IN operator.
Ticket #3757. (CVS 6403)

FossilOrigin-Name: 0c438e813c411e8f9e92d6c7405fccb7a36e110a

16 years agoPrevious commit ((6401)) did not quite fix the problem. This should work
drh [Sat, 28 Mar 2009 23:47:10 +0000 (23:47 +0000)] 
Previous commit ((6401)) did not quite fix the problem.  This should work
better. (CVS 6402)

FossilOrigin-Name: 2e7d3cc9f04de1fe7ef95cd5736dbc409c209cef

16 years agoIn the unix-backend, when simulating an I/O error on an unlock operation,
drh [Sat, 28 Mar 2009 23:23:02 +0000 (23:23 +0000)] 
In the unix-backend, when simulating an I/O error on an unlock operation,
still mark the connection as unlocked to avoid a future assert(). (CVS 6401)

FossilOrigin-Name: fb35cff855e17771caee2a992e7b2b4105b94862

16 years agoThe test_async.c module must pass an unchanging filename to the underlying VFS. ...
drh [Sat, 28 Mar 2009 18:56:14 +0000 (18:56 +0000)] 
The test_async.c module must pass an unchanging filename to the underlying VFS. (CVS 6400)

FossilOrigin-Name: d1eeee21677a3dffdb4ee1182322007bf24ef03a

16 years agoFix thread related problems in test modules test_async.c and test_journal.c. (CVS...
danielk1977 [Sat, 28 Mar 2009 17:21:52 +0000 (17:21 +0000)] 
Fix thread related problems in test modules test_async.c and test_journal.c. (CVS 6399)

FossilOrigin-Name: 45df27a22d283871ed1de334fe3b74b0121d57a6

16 years agoBack out check-in (6380). Replace it with a proper fix to the
drh [Sat, 28 Mar 2009 15:04:24 +0000 (15:04 +0000)] 
Back out check-in (6380).  Replace it with a proper fix to the
xFullPathname method in the async VFS. (CVS 6398)

FossilOrigin-Name: 767a7f7b55456df404a7f8966a0c48318ddac120

16 years agoThe fix in (6395) was not correct. Fix #3756 a different way. (CVS 6397)
danielk1977 [Sat, 28 Mar 2009 10:54:22 +0000 (10:54 +0000)] 
The fix in (6395) was not correct. Fix #3756 a different way. (CVS 6397)

FossilOrigin-Name: 9278f7b1e1f2d0d4c2f8829ca801a769e512c2a6

16 years agoFix a couple of test script bugs. No changes to SQLite code. (CVS 6396)
danielk1977 [Sat, 28 Mar 2009 07:03:41 +0000 (07:03 +0000)] 
Fix a couple of test script bugs. No changes to SQLite code. (CVS 6396)

FossilOrigin-Name: c9fa329f54736de517cddaf747595c9eca931f32

16 years agoFix readDbPage() so that if an SQLITE_IOERR_SHORT_READ is encountered, the page conte...
danielk1977 [Sat, 28 Mar 2009 06:59:41 +0000 (06:59 +0000)] 
Fix readDbPage() so that if an SQLITE_IOERR_SHORT_READ is encountered, the page content is zeroed. Ticket #3756. (CVS 6395)

FossilOrigin-Name: 647e3b156e32e37debd60b0079fc5a52bdc9b8c8

16 years agoWhen "PRAGMA case_sensitive_like" is invoked, override all existing "LIKE" functions...
danielk1977 [Fri, 27 Mar 2009 15:26:03 +0000 (15:26 +0000)] 
When "PRAGMA case_sensitive_like" is invoked, override all existing "LIKE" functions, including UTF-16 versions. (CVS 6394)

FossilOrigin-Name: 1c6521e53b846eec2e046b1e9c04c60658b8e0e8

16 years agoFix another compiler warning in the test logic of tclsqlite.c. (CVS 6393)
drh [Fri, 27 Mar 2009 12:44:35 +0000 (12:44 +0000)] 
Fix another compiler warning in the test logic of tclsqlite.c. (CVS 6393)

FossilOrigin-Name: 47ffc4dca8f106d0da8cbc0a8ff7453016e9b40d

16 years agoFix some compiler warnings in test code. (CVS 6392)
drh [Fri, 27 Mar 2009 12:32:54 +0000 (12:32 +0000)] 
Fix some compiler warnings in test code. (CVS 6392)

FossilOrigin-Name: a43ecc9cb91ea8693e0fcce12c1bb5c5e4baf434

16 years agoFix an incompatibility between the test_async.c backend and change (6390). (CVS 6391)
danielk1977 [Fri, 27 Mar 2009 09:10:12 +0000 (09:10 +0000)] 
Fix an incompatibility between the test_async.c backend and change (6390). (CVS 6391)

FossilOrigin-Name: 6762625d29d5e0053afdad033fe54e2d9121046a

16 years agoCheck that the first byte of a potentially hot journal file is non-zero before beginn...
danielk1977 [Thu, 26 Mar 2009 17:13:06 +0000 (17:13 +0000)] 
Check that the first byte of a potentially hot journal file is non-zero before beginning hot-journal rollback. Fix for #3751 and #3745. (CVS 6390)

FossilOrigin-Name: 80241a050296067937d0b0529fdf0c347358f86c

16 years agoPrevent the tcl test suite from throwing an exception when a threadsafe SQLite is...
danielk1977 [Thu, 26 Mar 2009 14:48:07 +0000 (14:48 +0000)] 
Prevent the tcl test suite from throwing an exception when a threadsafe SQLite is linked against a non-threadsafe Tcl for testing. Print a warning instead. Ticket #3753. (CVS 6389)

FossilOrigin-Name: a22e7c818b2227a4c80ad84b299d11f365e3b17d

16 years agoAdded new tests of the scratch memory allocator for increased test coverage. (CVS...
drh [Thu, 26 Mar 2009 12:20:32 +0000 (12:20 +0000)] 
Added new tests of the scratch memory allocator for increased test coverage. (CVS 6388)

FossilOrigin-Name: e99e28efbbfff3e46eec0f90d566991de4406fd8

16 years agoEnsure that the test vfs in test_journal.c zeroes sqlite3_file.pMethods if an xOpen...
danielk1977 [Thu, 26 Mar 2009 11:49:11 +0000 (11:49 +0000)] 
Ensure that the test vfs in test_journal.c zeroes sqlite3_file.pMethods if an xOpen() call fails. Similar problem to that fixed by #6384. This was a problem with test code, not SQLite itself. (CVS 6387)

FossilOrigin-Name: 45ae830d5631afa5d994361f5122c2f0b6fbab4c

16 years agoRemove an unused parameter from sqlite3DequoteExpr. Fix another unrelated
drh [Wed, 25 Mar 2009 16:51:43 +0000 (16:51 +0000)] 
Remove an unused parameter from sqlite3DequoteExpr.  Fix another unrelated
and harmless compiler warning. (CVS 6386)

FossilOrigin-Name: 8589b0fcc51a32188386e442655fd91f421ca7f8

16 years agoFix a problem preventing sqlite3_extended_errcode() from working correctly. (CVS...
danielk1977 [Wed, 25 Mar 2009 15:43:08 +0000 (15:43 +0000)] 
Fix a problem preventing sqlite3_extended_errcode() from working correctly. (CVS 6385)

FossilOrigin-Name: de469c46f55bf772ab8a49a185dc1b87360a937f

16 years agoWhen a VFS.xOpen fails, make sure the pMethods pointer is zeroed on the
drh [Wed, 25 Mar 2009 14:24:41 +0000 (14:24 +0000)] 
When a VFS.xOpen fails, make sure the pMethods pointer is zeroed on the
sqlite3_file object so that subsequent xClose() operations against that
same file handler are no-ops.  Bug in the test_async.c module only - not
in the core library.  Ticket #3744. (CVS 6384)

FossilOrigin-Name: c32b454118f4b0cc615edb9b35f749db45f6b36d

16 years agoUse fdatasync() only on linux, unless -Dfdatasync=fdatasync is set at
drh [Wed, 25 Mar 2009 01:06:01 +0000 (01:06 +0000)] 
Use fdatasync() only on linux, unless -Dfdatasync=fdatasync is set at
compilation time. (CVS 6383)

FossilOrigin-Name: cbf2ca4cc41f1f710635b863db6e98074bd5e8bc

16 years agoChange OS_UNIX to SQLITE_OS_UNIX in test_thread.c. Modify notify2.test to
drh [Tue, 24 Mar 2009 18:42:16 +0000 (18:42 +0000)] 
Change OS_UNIX to SQLITE_OS_UNIX in test_thread.c.  Modify notify2.test to
print out its timings in addition to reporting success or failure. (CVS 6382)

FossilOrigin-Name: 940d72d2bae95ddd1aea9b63424179735f440296

16 years agoGet the OOM tester in async2.test working again. (CVS 6381)
drh [Tue, 24 Mar 2009 17:43:56 +0000 (17:43 +0000)] 
Get the OOM tester in async2.test working again. (CVS 6381)

FossilOrigin-Name: f398a2d1b0a731bbb600d0bb70ab79f1334ceda9

16 years agoAdjust the lock.test and lock3.test scripts so that they work with the
drh [Tue, 24 Mar 2009 16:55:43 +0000 (16:55 +0000)] 
Adjust the lock.test and lock3.test scripts so that they work with the
asynchronous VFS. (CVS 6380)

FossilOrigin-Name: 40df926b4606b3abe8c797bf17163f996bd03ad5

16 years agoInclude sqliteInt.h in test_async.c so that the asynchronous VFS tests
drh [Tue, 24 Mar 2009 16:27:09 +0000 (16:27 +0000)] 
Include sqliteInt.h in test_async.c so that the asynchronous VFS tests
will run even if SQLITE_OS_UNIX is not explicitly defined. (CVS 6379)

FossilOrigin-Name: 29b0d6a3fe519c71a92e2436d7c5860f3f0178ef

16 years agoNew assert()s added to verify that the Expr.token value is used correctly. Ticket...
drh [Tue, 24 Mar 2009 15:31:28 +0000 (15:31 +0000)] 
New assert()s added to verify that the Expr.token value is used correctly.  Ticket #3743. (CVS 6378)

FossilOrigin-Name: cf3d84ab73b7f519921a984f88bdad81996a3a82

16 years agoChanges to insure that lookaside memory allocations are never used to hold
drh [Tue, 24 Mar 2009 15:08:09 +0000 (15:08 +0000)] 
Changes to insure that lookaside memory allocations are never used to hold
schema content.
Ticket #3743. (CVS 6377)

FossilOrigin-Name: ea74d8dc62f5784089aa8ef098e97c505a79b176

16 years agoAdd a comment to prepare.c explaining why the lookaside buffer is disabled before...
danielk1977 [Tue, 24 Mar 2009 04:46:08 +0000 (04:46 +0000)] 
Add a comment to prepare.c explaining why the lookaside buffer is disabled before sqlite3_exec() is called to parse a schema statement. No code changes. (CVS 6376)

FossilOrigin-Name: 8ca6a665650c9683a202f3ced17b14f7c85624bf

16 years agoClarify the meaning of a comment. No changes to code. (CVS 6375)
drh [Mon, 23 Mar 2009 21:37:04 +0000 (21:37 +0000)] 
Clarify the meaning of a comment.  No changes to code. (CVS 6375)

FossilOrigin-Name: 7c2df04b52a40d5d1b744ad1097f7c12143d8c2c

16 years agoAdd asserts to make sure that database connection locks are held when
drh [Mon, 23 Mar 2009 17:49:14 +0000 (17:49 +0000)] 
Add asserts to make sure that database connection locks are held when
accessing the lookaside memory allocation buffers.  No defects were found. (CVS 6374)

FossilOrigin-Name: 8a9f3e66069146ad1b1bc2686567882dc87603a9

16 years agoFix an obscure race condition that can occur when multiple threads, shared cache...
danielk1977 [Mon, 23 Mar 2009 17:11:26 +0000 (17:11 +0000)] 
Fix an obscure race condition that can occur when multiple threads, shared cache and DDL statements are combined. Enhance notify2.test to test this scenario. (CVS 6373)

FossilOrigin-Name: 92ec5975123284aff3a69ee16c397d9e2a844c0b

16 years agoUse the ROUND8() macro to round an integer up to the nearest multiple of 8 and ROUNDD...
danielk1977 [Mon, 23 Mar 2009 04:33:32 +0000 (04:33 +0000)] 
Use the ROUND8() macro to round an integer up to the nearest multiple of 8 and ROUNDDOWN8() macro to round down to the nearest multiple of 8. This is a cosmetic change. (CVS 6372)

FossilOrigin-Name: db1d4d2f5083adf5438c7f387b115180800e7bd9

16 years agoFix compiler warning in MSVC. (CVS 6371)
shane [Mon, 23 Mar 2009 02:34:32 +0000 (02:34 +0000)] 
Fix compiler warning in MSVC. (CVS 6371)

FossilOrigin-Name: 83a4d5b3d7abe983c2be00a694cc7d4c4847f253

16 years agoAllow the keyword INDEXED to be used as the name of a table or index or
drh [Sun, 22 Mar 2009 20:36:18 +0000 (20:36 +0000)] 
Allow the keyword INDEXED to be used as the name of a table or index or
column - for backwards compatibility. (CVS 6370)

FossilOrigin-Name: 53149c9f5d5cfaba3374703cd3af92a9d4cf8718

16 years agoUpdate comments in build.c to conform to the latest implementation. (CVS 6369)
drh [Sat, 21 Mar 2009 16:19:26 +0000 (16:19 +0000)] 
Update comments in build.c to conform to the latest implementation. (CVS 6369)

FossilOrigin-Name: a915e8e0a429ab6a10536c45264a790c2d076461

16 years agoRig the unix backend to use fdatasync() by default, without having to set the
drh [Sat, 21 Mar 2009 14:56:52 +0000 (14:56 +0000)] 
Rig the unix backend to use fdatasync() by default, without having to set the
HAVE_FDATASYNC macro.  Systems that do not support fdatasync() can be compiled
using -Dfdatasync=fsync. (CVS 6368)

FossilOrigin-Name: a331562727be465874a66c2c1d15ee070f96f7e0

16 years agoOn unix, always use fdatasync() instead of fsync() when available, even if
drh [Sat, 21 Mar 2009 14:41:04 +0000 (14:41 +0000)] 
On unix, always use fdatasync() instead of fsync() when available, even if
the file size changes, since (we are told) fdatasync() will automatically
flush the inode when the file size changes. (CVS 6367)

FossilOrigin-Name: 0d6b11bcf67f86e5554806869d32338e5831833e

16 years agoAdd a test to try to hit the race-condition fixed by (6363). (CVS 6366)
danielk1977 [Fri, 20 Mar 2009 15:16:05 +0000 (15:16 +0000)] 
Add a test to try to hit the race-condition fixed by (6363). (CVS 6366)

FossilOrigin-Name: 4310411f5027dba18e017023e21cb09982e26752

16 years agoFix an assert failure introduced by (6355). (CVS 6365)
danielk1977 [Fri, 20 Mar 2009 14:42:11 +0000 (14:42 +0000)] 
Fix an assert failure introduced by (6355). (CVS 6365)

FossilOrigin-Name: a08324d16d1e9a4e7c1b294bc71fc939d173f826

16 years agoMake sure struct WhereClause is aligned on an 8-byte boundary. Fix for #3613, #3736...
danielk1977 [Fri, 20 Mar 2009 14:18:51 +0000 (14:18 +0000)] 
Make sure struct WhereClause is aligned on an 8-byte boundary. Fix for #3613, #3736. (CVS 6364)

FossilOrigin-Name: 093a0cf4adc8613f744c2ccdef61f0b30a46818c

16 years agoRename the unused MEM2 static mutex to OPEN and reuse it to serialize access
drh [Fri, 20 Mar 2009 13:15:30 +0000 (13:15 +0000)] 
Rename the unused MEM2 static mutex to OPEN and reuse it to serialize access
to the sqlite3BtreeOpen() routine to prevent a race condition on detection
of sharable caches.  Ticket #3735. (CVS 6363)

FossilOrigin-Name: 19fa5a29b97f017a9e176e48c848100299ba6920