]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
13 years agoSimplification and performance tweaks in vdbeSorterMerge(). merge-sort
drh [Sat, 3 Sep 2011 16:42:38 +0000 (16:42 +0000)] 
Simplification and performance tweaks in vdbeSorterMerge().

FossilOrigin-Name: 99e34bdce4ccca15b79159b03b96787e7a7ff85b

13 years agoReduce the number of VdbeRecordUnpack() calls made in vdbesort.c.
dan [Sat, 3 Sep 2011 14:36:13 +0000 (14:36 +0000)] 
Reduce the number of VdbeRecordUnpack() calls made in vdbesort.c.

FossilOrigin-Name: 666c2c3cff51dac2ba5689b75705d99c3705673b

13 years agoThe build works again with -DSQLITE_OMIT_MERGE_SORT. The merge-sorter now
drh [Sat, 3 Sep 2011 00:17:51 +0000 (00:17 +0000)] 
The build works again with -DSQLITE_OMIT_MERGE_SORT.  The merge-sorter now
avoids spilling to disk (letting the in-memory linked list grow without
bound) if PRAGMA temp_store=3.

FossilOrigin-Name: 68e26c4487696d194ee85370380e4b0e56d206ee

13 years agoRemove some dead code. Fix a faulty assert(). Improve some variable names.
drh [Fri, 2 Sep 2011 21:42:33 +0000 (21:42 +0000)] 
Remove some dead code.  Fix a faulty assert().  Improve some variable names.

FossilOrigin-Name: a9a64592cf88580cb254fb0aac65a2f2085976ec

13 years agoCombine two malloc calls in vdbesort.c.
dan [Fri, 2 Sep 2011 18:03:16 +0000 (18:03 +0000)] 
Combine two malloc calls in vdbesort.c.

FossilOrigin-Name: cf48ad8353e28339d00f448bb729e10a7f2aad72

13 years agoReduce the number of malloc() calls made when creating an index on more than 2 columns.
dan [Fri, 2 Sep 2011 15:41:33 +0000 (15:41 +0000)] 
Reduce the number of malloc() calls made when creating an index on more than 2 columns.

FossilOrigin-Name: 065b0c9858da0ebb41722f3c56bdaf62f28b2f2c

13 years agoIf all data being sorted fits in memory, avoid writing any data out to temporary...
dan [Fri, 2 Sep 2011 11:45:31 +0000 (11:45 +0000)] 
If all data being sorted fits in memory, avoid writing any data out to temporary files in vdbesort.c.

FossilOrigin-Name: 71075673c625f243969c3f34c73f28f378924007

13 years agoInstead of a temporary b-tree, use a linked-list and merge-sort to sort records in...
dan [Fri, 2 Sep 2011 10:31:11 +0000 (10:31 +0000)] 
Instead of a temporary b-tree, use a linked-list and merge-sort to sort records in main memory in vdbesort.c.

FossilOrigin-Name: 7769fb988d9be0f2d8129aaac19620ac88f9b4a6

13 years agoUse OP_SorterOpen instead of OP_OpenEphemeral to implement GROUP BY.
drh [Thu, 1 Sep 2011 16:01:27 +0000 (16:01 +0000)] 
Use OP_SorterOpen instead of OP_OpenEphemeral to implement GROUP BY.

FossilOrigin-Name: ebf819aaa555bd79fddfc0a6f9827a2539095d6c

13 years agoExperimental code-generator changes to utilize new opcodes for sorting.
drh [Thu, 1 Sep 2011 15:32:47 +0000 (15:32 +0000)] 
Experimental code-generator changes to utilize new opcodes for sorting.

FossilOrigin-Name: bab2e560f6cb989c83a96aad60f666960ede7abe

13 years agoAvoid using uninitialized variables after failures in the merge sort code.
drh [Wed, 31 Aug 2011 23:57:22 +0000 (23:57 +0000)] 
Avoid using uninitialized variables after failures in the merge sort code.

FossilOrigin-Name: 2869ed28299b1c9f355ecc24635830f7f1249126

13 years agoFormerly, we enabled fdatasync() on linux only. But now we learn that
drh [Wed, 31 Aug 2011 21:01:55 +0000 (21:01 +0000)] 
Formerly, we enabled fdatasync() on linux only.  But now we learn that
fdatasync() is not supported on Android.  So we disable fdatasync() on
Linux too.  It can be reenabled at compile-time for those who really need it.

FossilOrigin-Name: 70b5b309568ac55565558d5456aca1e431cfd26b

13 years agoAdd the SQLITE_MAX_SCHEMA_RETRY compile-time option to the set of options
drh [Wed, 31 Aug 2011 20:47:50 +0000 (20:47 +0000)] 
Add the SQLITE_MAX_SCHEMA_RETRY compile-time option to the set of options
understood by "PRAGMA compile_options;" and by the
"sqlite_compileoption_used()" function.

FossilOrigin-Name: 1b124af40a8fa4d3094f24a9213096b66411b8f9

13 years agoThe server1.test script should only run if mutexes are functional.
drh [Wed, 31 Aug 2011 19:40:58 +0000 (19:40 +0000)] 
The server1.test script should only run if mutexes are functional.
Fix to the #ifdef change of check-in [9e6a4c1473].

FossilOrigin-Name: 6489848590db7088d965b7fa7feabc8c66e2e2b1

13 years agoAlways include the unixShm.id field, even when not debugging.
drh [Wed, 31 Aug 2011 18:35:34 +0000 (18:35 +0000)] 
Always include the unixShm.id field, even when not debugging.

FossilOrigin-Name: 07803476206b8cde60ccc320b9ccdc0d48a41d65

13 years agoOnly create the sqlite3OSTrace global variable if compiling with
drh [Wed, 31 Aug 2011 18:04:54 +0000 (18:04 +0000)] 
Only create the sqlite3OSTrace global variable if compiling with
SQLITE_TEST.

FossilOrigin-Name: 9e6a4c1473a4cb061a88f6a437a2828368b3ddc8

13 years agoBackslash escaping is not working right in tostr.awk on the latest ubuntu.
drh [Wed, 31 Aug 2011 17:46:50 +0000 (17:46 +0000)] 
Backslash escaping is not working right in tostr.awk on the latest ubuntu.
The easiest fix is to simply not use any backslashes in the spaceanal.tcl
script.

FossilOrigin-Name: df550066657cb41bad34ac8e722b8148ab7eabfb

13 years agoAdd checks to make sure cells in corrupt database files
drh [Wed, 31 Aug 2011 13:27:19 +0000 (13:27 +0000)] 
Add checks to make sure cells in corrupt database files
do not overflow a page when doing autovacuum.
Problem detected by valgrind.

FossilOrigin-Name: d0b347b412376d22e9f0770ac083dafb5e480dd0

13 years agoEnable the thread test logic to work with the SQLITE_HAS_CODEC compile-time
drh [Tue, 30 Aug 2011 19:52:32 +0000 (19:52 +0000)] 
Enable the thread test logic to work with the SQLITE_HAS_CODEC compile-time
option.

FossilOrigin-Name: 20ddfb4780b87953718f3a8e67b777dcff0e3b5e

13 years agoChange the build process so that it does not require the unix "sort"
drh [Tue, 30 Aug 2011 01:29:04 +0000 (01:29 +0000)] 
Change the build process so that it does not require the unix "sort"
command.  This avoids confusion between ms-sort and mingw-sort on
windows systems.

FossilOrigin-Name: f1bd5bbae505068d24bfd9cc6bab6a8b8940bad6

13 years agoMake sure SQLITE_FCNTL_SIZE_HINT a no-op if the chunk size is not greater than zero.
mistachkin [Tue, 30 Aug 2011 01:23:34 +0000 (01:23 +0000)] 
Make sure SQLITE_FCNTL_SIZE_HINT a no-op if the chunk size is not greater than zero.

FossilOrigin-Name: 88b763e8d73fafa1538b08af28b1c8b723b39c61

13 years agoFix a total unimportant file descriptor leak in lemon. This is to silence
drh [Tue, 30 Aug 2011 00:58:58 +0000 (00:58 +0000)] 
Fix a total unimportant file descriptor leak in lemon.  This is to silence
warning messages.

FossilOrigin-Name: e95cf2c576dda656c0f31eeec3d98e911b9003a1

13 years agoFix a buffer overrun in test logic. No impact on the core SQLite.
drh [Tue, 30 Aug 2011 00:53:50 +0000 (00:53 +0000)] 
Fix a buffer overrun in test logic.  No impact on the core SQLite.

FossilOrigin-Name: 49cd60e38bd8df9d736ced95e0ace6efea95ca7d

13 years agoFix a broken assert() statement in select.c.
dan [Mon, 29 Aug 2011 18:24:27 +0000 (18:24 +0000)] 
Fix a broken assert() statement in select.c.

FossilOrigin-Name: ad78ef2b3a20e3c3191fba232cbae70656210cf5

13 years agoBack out [05c9832e5f6eb] since it was causing a performance regression with
drh [Mon, 29 Aug 2011 11:56:14 +0000 (11:56 +0000)] 
Back out [05c9832e5f6eb] since it was causing a performance regression with
no obvious benefit.

FossilOrigin-Name: 639cc85a911454bffdcccb33f2976c683953ae64

13 years agoMerge performance enhancements into trunk.
drh [Mon, 29 Aug 2011 03:08:47 +0000 (03:08 +0000)] 
Merge performance enhancements into trunk.

FossilOrigin-Name: 5a00d24b279424d257781ec3f1227e72a5d56f57

13 years agoAbout a 1% overall performance improvement by using a macro to avoid
drh [Mon, 29 Aug 2011 02:49:41 +0000 (02:49 +0000)] 
About a 1% overall performance improvement by using a macro to avoid
no-op calls to sqlite3MemReleaseExternal().

FossilOrigin-Name: ff71d20a9ed129bd1785a3f7a777ce62098735b7

13 years agoSmall performance improvement to OP_Column.
drh [Mon, 29 Aug 2011 02:16:18 +0000 (02:16 +0000)] 
Small performance improvement to OP_Column.

FossilOrigin-Name: b6b73a747ad8d0f026074e41c2a4adc529ec2674

13 years agoAbout a 3% improvement in the performance of OP_Column.
drh [Sun, 28 Aug 2011 02:15:34 +0000 (02:15 +0000)] 
About a 3% improvement in the performance of OP_Column.

FossilOrigin-Name: edff9d4a995095e555fcc9aec4c56f4bcaa1557e

13 years agoCorrectly display P4_ADVANCE values on opcode traces. Mark an always-taken
drh [Sun, 28 Aug 2011 00:19:26 +0000 (00:19 +0000)] 
Correctly display P4_ADVANCE values on opcode traces.  Mark an always-taken
branch in OP_Column as such.

FossilOrigin-Name: 087dc96086fe4e45da93ab6a0d5dda34c932ce97

13 years agoExperimental changes to improve the performance of OP_Next.
dan [Sat, 27 Aug 2011 18:48:57 +0000 (18:48 +0000)] 
Experimental changes to improve the performance of OP_Next.

FossilOrigin-Name: 1a249845251199c00817893add300a1a654b4df9

13 years agoFix several harmless compiler warnings and a documentation bug.
drh [Fri, 26 Aug 2011 20:55:50 +0000 (20:55 +0000)] 
Fix several harmless compiler warnings and a documentation bug.

FossilOrigin-Name: 5454d0fe227b7c1f0e7715b6c08f97019628fc4c

13 years agoUpdate compiler error message regarding the choice of memory allocator defines.
mistachkin [Fri, 26 Aug 2011 11:25:02 +0000 (11:25 +0000)] 
Update compiler error message regarding the choice of memory allocator defines.

FossilOrigin-Name: 1dada5158215d1816edb69ff2610f9d2259ce19d

13 years agoMerge Win32 native heap support into trunk.
mistachkin [Fri, 26 Aug 2011 11:18:44 +0000 (11:18 +0000)] 
Merge Win32 native heap support into trunk.

FossilOrigin-Name: 5238a74987507f27af4080e2842f53e049b5b111

13 years agoIn the MSVC makefile, allow symbols to be enabled without NDEBUG defined. Also,... winNativeHeap
mistachkin [Fri, 26 Aug 2011 05:40:31 +0000 (05:40 +0000)] 
In the MSVC makefile, allow symbols to be enabled without NDEBUG defined.  Also, for the win32lock test, make sure the database is closed prior to shutdown.

FossilOrigin-Name: 5ed7633d41b99929309a7e13d37375a4fdae43b3

13 years agoDisable checking the winMemData structure signature when compiled with NDEBUG.
mistachkin [Fri, 26 Aug 2011 01:45:50 +0000 (01:45 +0000)] 
Disable checking the winMemData structure signature when compiled with NDEBUG.

FossilOrigin-Name: 50edc2f9141bd13277119afd129387029ebe5c01

13 years agoAllow the Win32 native heap flags to be overridden at compile-time.
mistachkin [Fri, 26 Aug 2011 01:32:24 +0000 (01:32 +0000)] 
Allow the Win32 native heap flags to be overridden at compile-time.

FossilOrigin-Name: 1c2ecec8e7320bc5b532b3107005fb7f0370f25c

13 years agoCreate a new pager type, PAGER_SORTER, for use in the external merge sort.
drh [Fri, 26 Aug 2011 00:34:45 +0000 (00:34 +0000)] 
Create a new pager type, PAGER_SORTER, for use in the external merge sort.
Such pagers are always held in memory but do report when they are under
memory pressure by calling pagerStress.

FossilOrigin-Name: c71d73201d950355862dd8d5de142c9673888755

13 years agoReorder some of the branches in backup.c in order to make the code
drh [Thu, 25 Aug 2011 20:18:47 +0000 (20:18 +0000)] 
Reorder some of the branches in backup.c in order to make the code
easier to test.

FossilOrigin-Name: 2c443d47ecee7b43a89f0a4bf299c46c66e3f80d

13 years agoReplace an assert() that a condition may not occur in backup.c with code to handle...
dan [Thu, 25 Aug 2011 19:28:47 +0000 (19:28 +0000)] 
Replace an assert() that a condition may not occur in backup.c with code to handle that condition, which can occur.

FossilOrigin-Name: 472c74b3452c5a07dfb006010441232b09599ad5

13 years agoFix harmless compiler warnings in test code. No changes to the core.
drh [Thu, 25 Aug 2011 18:54:46 +0000 (18:54 +0000)] 
Fix harmless compiler warnings in test code.  No changes to the core.

FossilOrigin-Name: 16f83fec77668c021694fbb189b415bd3b90adc8

13 years agoDisable external merge source when SQLITE_TEMP_STORE==3. Add documentation
drh [Thu, 25 Aug 2011 18:01:28 +0000 (18:01 +0000)] 
Disable external merge source when SQLITE_TEMP_STORE==3.  Add documentation
to the OP_OpenSorter opcode.

FossilOrigin-Name: 5a690486811379cea40c6ed48b2902f421234832

13 years agoFix the SQLITE_DISABLE_DIRSYNC compile time option.
dan [Thu, 25 Aug 2011 13:46:32 +0000 (13:46 +0000)] 
Fix the SQLITE_DISABLE_DIRSYNC compile time option.

FossilOrigin-Name: 6deb3ea1f080324ea23ebdc9008753fbbc4063e2

13 years agoAdd comments for the various debug levels. When debugging, disable optimizations...
mistachkin [Thu, 25 Aug 2011 04:09:12 +0000 (04:09 +0000)] 
Add comments for the various debug levels.  When debugging, disable optimizations.  Prevent the win32lock tests from spinning forever.

FossilOrigin-Name: 401859236b0d97bde82b11f32efce6eb9d490941

13 years agoFix an file separator character issue with test_quota.c that was causing
drh [Thu, 25 Aug 2011 03:38:31 +0000 (03:38 +0000)] 
Fix an file separator character issue with test_quota.c that was causing
it to fail on windows.

FossilOrigin-Name: ddb8d3e80df868bda0704feed31171fa055432b5

13 years agoIn the MSVC makefile, support several levels of debugging, each one building on the...
mistachkin [Thu, 25 Aug 2011 02:02:25 +0000 (02:02 +0000)] 
In the MSVC makefile, support several levels of debugging, each one building on the previous.  Also, add comment about the SQLITE_WIN32_MALLOC_VALIDATE macro.

FossilOrigin-Name: 4257e9b7ca78feb03df08fde56da947ae64c5c6f

13 years agoCherrypick the [d4f6437f8d] change so that SQLITE_FCNTL_SIZE_HINT is always
drh [Thu, 25 Aug 2011 01:58:17 +0000 (01:58 +0000)] 
Cherrypick the [d4f6437f8d] change so that SQLITE_FCNTL_SIZE_HINT is always
honored and never undone by memory pressure on windows.

FossilOrigin-Name: 67ff8d27f6aa6e0beff1f6b72a997b30a9647879

13 years agoAdd the sqlite3_quota_file() interface to test_quota.c.
drh [Thu, 25 Aug 2011 01:42:12 +0000 (01:42 +0000)] 
Add the sqlite3_quota_file() interface to test_quota.c.

FossilOrigin-Name: 2b7fe8e5b74c3504edd0e3ff78096e357ee1b47c

13 years agoMake sure that SQLITE_FCNTL_SIZE_HINT on Windows does not shrink the file.
mistachkin [Thu, 25 Aug 2011 01:16:42 +0000 (01:16 +0000)] 
Make sure that SQLITE_FCNTL_SIZE_HINT on Windows does not shrink the file.

FossilOrigin-Name: d4f6437f8de82482dfaa4c084f4221e89e21eb00

13 years agoAdd the SQLITE_EXTRA_INIT macro.
drh [Thu, 25 Aug 2011 00:14:41 +0000 (00:14 +0000)] 
Add the SQLITE_EXTRA_INIT macro.

FossilOrigin-Name: a3220f36c164dd2edf085c07ea08d617d8438812

13 years agoAdd error logging to native Win32 heap support.
mistachkin [Wed, 24 Aug 2011 17:42:22 +0000 (17:42 +0000)] 
Add error logging to native Win32 heap support.

FossilOrigin-Name: 7fca5a284cded6d7531060da6e99a57aed50cf8f

13 years agoExperimental work to allow SQLite to use the native Win32 heap API.
mistachkin [Wed, 24 Aug 2011 16:13:57 +0000 (16:13 +0000)] 
Experimental work to allow SQLite to use the native Win32 heap API.

FossilOrigin-Name: bf3d0ab53829350637283442f75071fe6d925245

13 years agoUpdates to the sqlite3_mem_methods documentation.
drh [Wed, 24 Aug 2011 15:18:16 +0000 (15:18 +0000)] 
Updates to the sqlite3_mem_methods documentation.

FossilOrigin-Name: 988998fe7b0a21ed113b67f812e51f357045bef4

13 years agoFix some harmless compiler warnings.
drh [Wed, 24 Aug 2011 15:12:08 +0000 (15:12 +0000)] 
Fix some harmless compiler warnings.

FossilOrigin-Name: 46f5a68bfa4199a4bd398030bf88bfbb4df3d5ca

13 years agoChanges to test_quota.c to make quota groups persistent even after files
drh [Wed, 24 Aug 2011 01:25:55 +0000 (01:25 +0000)] 
Changes to test_quota.c to make quota groups persistent even after files
are closed.  Files remain a part of the quota group until they are
deleted.

FossilOrigin-Name: 04111ce980df9692b7fe65a36105e7de9627a3bb

13 years agoSimplifications to the SQLITE_PAGECACHE_BLOCKALLOC logic. Reduce the number
drh [Tue, 23 Aug 2011 23:41:40 +0000 (23:41 +0000)] 
Simplifications to the SQLITE_PAGECACHE_BLOCKALLOC logic.  Reduce the number
of difficult-to-reach branches.

FossilOrigin-Name: d5d835fe8352cb2009133246d4ed1cd310803f75

13 years agoIf the application-defined openDirectory() function returns SQLITE_CANTOPEN,
drh [Tue, 23 Aug 2011 20:11:32 +0000 (20:11 +0000)] 
If the application-defined openDirectory() function returns SQLITE_CANTOPEN,
then silently ignore the error.  This allows the chromium sandbox to disallow
opening of directories without causing errors.

FossilOrigin-Name: 880b51150aaed804005f5062b4dd2fa0ffafa147

13 years agoChange the way the "crash" VFS (test6.c) handles SQLITE_FCNTL_SIZE_HINT.
dan [Tue, 23 Aug 2011 19:46:02 +0000 (19:46 +0000)] 
Change the way the "crash" VFS (test6.c) handles SQLITE_FCNTL_SIZE_HINT.

FossilOrigin-Name: 40dd8a60be0ca79e0d0bf3a2b5a43f13c02b4971

13 years agoHave the "crash" VFS used by the tcl tests (test6.c) handle SQLITE_FCNTL_SIZE_HINT...
dan [Tue, 23 Aug 2011 16:41:06 +0000 (16:41 +0000)] 
Have the "crash" VFS used by the tcl tests (test6.c) handle SQLITE_FCNTL_SIZE_HINT internally, instead of passing it directly through to the underlying VFS. This is important if the crash VFS is simulating non-default device characteristics such as SQLITE_DEVCAP_SEQUENTIAL or ATOMIC.

FossilOrigin-Name: fac8bc8f3450a6ce74c9250acb0608e940ffb54d

13 years agoIfdef out routines in pcache1.c that are used only
drh [Tue, 23 Aug 2011 13:27:48 +0000 (13:27 +0000)] 
Ifdef out routines in pcache1.c that are used only
when SQLITE_PAGECACHE_BLOCKALLOC is defined.

FossilOrigin-Name: 0da292da3bc867a5c6e29384f325581ea06bbd20

13 years agoMerge the PAGECACHE_BLOCKALLOC changes into trunk.
drh [Tue, 23 Aug 2011 12:50:09 +0000 (12:50 +0000)] 
Merge the PAGECACHE_BLOCKALLOC changes into trunk.

FossilOrigin-Name: 768c1846d48a555054f07edeabdae8817a2c0a8e

13 years agoWhen copying a rollback mode database over a WAL database using the backup API, leave...
dan [Tue, 23 Aug 2011 11:47:06 +0000 (11:47 +0000)] 
When copying a rollback mode database over a WAL database using the backup API, leave the destination database in WAL mode (instead of switching it to rollback mode). Fix for [af95b8c609].

FossilOrigin-Name: 35e6ac18e3d030095da57fff87a288939e9be93f

13 years agoChange to test instrumentation of os_unix.c: Regard IO errors that occur within SQLIT... pager-blockalloc
dan [Tue, 23 Aug 2011 05:10:39 +0000 (05:10 +0000)] 
Change to test instrumentation of os_unix.c: Regard IO errors that occur within SQLITE_FCNTL_SIZE_HINT requests as benign.

FossilOrigin-Name: ca47da2a1f6e6d221470e7f02b129fc21c288d7b

13 years agoRemove a branch that is always true.
drh [Tue, 23 Aug 2011 00:01:58 +0000 (00:01 +0000)] 
Remove a branch that is always true.

FossilOrigin-Name: a65681926d8acf779ad39be21b74537c21777783

13 years agoRemove an unreachable branch in the FK code.
drh [Mon, 22 Aug 2011 20:33:12 +0000 (20:33 +0000)] 
Remove an unreachable branch in the FK code.

FossilOrigin-Name: 6c227cc85378fa6041703d6620031c0e0a2db55f

13 years agoModify test cases so that veryquick.test passes with PAGECACHE_BLOCKALLOC defined.
dan [Mon, 22 Aug 2011 14:55:54 +0000 (14:55 +0000)] 
Modify test cases so that veryquick.test passes with PAGECACHE_BLOCKALLOC defined.

FossilOrigin-Name: c61000705b61dc448a838846826d1a5ab5eaca2b

13 years agoFix for [b1d3a2e531].
dan [Mon, 22 Aug 2011 09:54:26 +0000 (09:54 +0000)] 
Fix for [b1d3a2e531].

FossilOrigin-Name: 3f3acee465a6e390301f9dc588dd1d8e0bd646bd

13 years agoExperimental change: If SQLITE_PAGECACHE_BLOCKALLOC is defined, instead of allocating...
dan [Fri, 19 Aug 2011 18:15:00 +0000 (18:15 +0000)] 
Experimental change: If SQLITE_PAGECACHE_BLOCKALLOC is defined, instead of allocating pages one at a time, allocate blocks of between 15 and 63 pages in a single allocation.

FossilOrigin-Name: 63597097eedf80080fab0c1978cfd66ecaaa79fa

13 years agoWhen retrying a write() after an EINTR error on unix, be sure to also
drh [Fri, 19 Aug 2011 14:54:12 +0000 (14:54 +0000)] 
When retrying a write() after an EINTR error on unix, be sure to also
rerun the previous lseek().  Ticket [e59bdf6116036a]

FossilOrigin-Name: 21452f3ae6b5882b03c7cc41e661c7b8144cc3df

13 years agoEnsure that the Tcl "db onecolumn" command returns an empty string if the SELECT...
dan [Thu, 18 Aug 2011 17:47:57 +0000 (17:47 +0000)] 
Ensure that the Tcl "db onecolumn" command returns an empty string if the SELECT statement returns zero rows.

FossilOrigin-Name: 928bcaf0f00a408e2f6c1d85dfab214457f52ad5

13 years agoProperly process x64 DLL exports, which do not contain a leading underscore, in the...
mistachkin [Wed, 17 Aug 2011 07:46:48 +0000 (07:46 +0000)] 
Properly process x64 DLL exports, which do not contain a leading underscore, in the MSVC makefile.

FossilOrigin-Name: d5936324d27a16ce251f56f5813176c82215d901

13 years agoAdd vdbesort.c to the MSVC makefile.
mistachkin [Wed, 17 Aug 2011 02:19:54 +0000 (02:19 +0000)] 
Add vdbesort.c to the MSVC makefile.

FossilOrigin-Name: 8eaa2cd3f454711f2275d03831bca6a36a0b2504

13 years agoUse OP_Sort rather than OP_Rewind in order to sort the content of a new
drh [Wed, 17 Aug 2011 00:40:58 +0000 (00:40 +0000)] 
Use OP_Sort rather than OP_Rewind in order to sort the content of a new
index on the CREATE INDEX statement.  Add an ALWAYS() to the merge sort
logic to document an unreachable branch.

FossilOrigin-Name: f01766f42342f043bf0cbe1e07224963011f01b7

13 years agoUpdated comments on the multiplexor extension. No changes to code.
drh [Mon, 15 Aug 2011 19:44:30 +0000 (19:44 +0000)] 
Updated comments on the multiplexor extension.  No changes to code.

FossilOrigin-Name: 0f42ef697e197d193867c0d6be3c9cf6471488c6

13 years agoFix an assert() in the merge-sort logic to account for I/O errors.
drh [Mon, 15 Aug 2011 15:37:15 +0000 (15:37 +0000)] 
Fix an assert() in the merge-sort logic to account for I/O errors.

FossilOrigin-Name: c1daa809a17a97610e51f9babd90f36908921245

13 years agoNew makefile target "sqlite3-debug.c" builds an amalgamation that include
drh [Mon, 15 Aug 2011 15:27:20 +0000 (15:27 +0000)] 
New makefile target "sqlite3-debug.c" builds an amalgamation that include
appropriate "#line" macros relating the code back to the original source
files.

FossilOrigin-Name: 26f2da24b080bf89e3574bd1a162eb1fead51456

13 years agoWhen opening a temporary file to use in a merge-sort, pass SQLITE_OPEN_TEMP_JOURNAL...
dan [Mon, 15 Aug 2011 14:41:01 +0000 (14:41 +0000)] 
When opening a temporary file to use in a merge-sort, pass SQLITE_OPEN_TEMP_JOURNAL instead of SQLITE_OPEN_TEMP_DB. This is a better fit, as merge-sort files are written and read sequentially like journal files.

FossilOrigin-Name: bd04756b66e343a7bc6c8bbed9e5cff7b9658d01

13 years agoFix the header comment on the implementation of the
drh [Sat, 13 Aug 2011 10:47:51 +0000 (10:47 +0000)] 
Fix the header comment on the implementation of the
file_control_sizehint_test TCL command in test1.c.

FossilOrigin-Name: 309198085f255fc1fcc7bf28fd38d016d5a536ab

13 years agoMerge the experimental changes to use a merge-sort when creating an index into the...
dan [Fri, 12 Aug 2011 16:47:12 +0000 (16:47 +0000)] 
Merge the experimental changes to use a merge-sort when creating an index into the trunk.

FossilOrigin-Name: 346a453d1f1d615f1e9e7923a27dad84b8727fb1

13 years agoUpdate Makefile.in and configure to account for new source file vdbesort.c.
dan [Fri, 12 Aug 2011 16:34:42 +0000 (16:34 +0000)] 
Update Makefile.in and configure to account for new source file vdbesort.c.

FossilOrigin-Name: 69e4b41de22968c565c6575707a73956e3b20ff4

13 years agoMerge latest trunk changes into experimental branch.
dan [Fri, 12 Aug 2011 16:30:30 +0000 (16:30 +0000)] 
Merge latest trunk changes into experimental branch.

FossilOrigin-Name: 7e515055f219b01dd72df4e27bdcabfa2f9be5c2

13 years agoRemove an unused parameter from a function in vdbesort.c. Fix some comments and other...
dan [Fri, 12 Aug 2011 16:11:43 +0000 (16:11 +0000)] 
Remove an unused parameter from a function in vdbesort.c. Fix some comments and other details in the same file.

FossilOrigin-Name: 1a8498d8037a1b93e56951bbdbb76291bd5a4f87

13 years agoAdd the SQLITE_OMIT_MERGE_SORT pre-processor directive. To omit the code in vdbesort.c.
dan [Fri, 12 Aug 2011 15:02:00 +0000 (15:02 +0000)] 
Add the SQLITE_OMIT_MERGE_SORT pre-processor directive. To omit the code in vdbesort.c.

FossilOrigin-Name: 4ced2394b10d0a4f86422ff893bcdf3cf32591e3

13 years agoAdd tests to improve coverage of vdbesort.c.
dan [Fri, 12 Aug 2011 11:59:57 +0000 (11:59 +0000)] 
Add tests to improve coverage of vdbesort.c.

FossilOrigin-Name: 87a15917d7d88285054e2a319506dd4a0cac9722

13 years agoMake the openDirectory routine in os_unix.c overrideable so that it can
drh [Wed, 10 Aug 2011 01:52:12 +0000 (01:52 +0000)] 
Make the openDirectory routine in os_unix.c overrideable so that it can
be turned into a harmless no-op for the chromium sandbox.

FossilOrigin-Name: 6b236069e1ea3c99ff0a007a790d4baebda70b13

13 years agoAdd command-line utilities "offsets.c" and "extract.c" for use in
drh [Tue, 9 Aug 2011 18:14:36 +0000 (18:14 +0000)] 
Add command-line utilities "offsets.c" and "extract.c" for use in
low-level analyzsis of database files.

FossilOrigin-Name: dfa22ed4387f9526b74d5265503c7c8e9d559903

13 years agoIn os_unix.c, do not open the directory containing the database file when
drh [Mon, 8 Aug 2011 23:48:40 +0000 (23:48 +0000)] 
In os_unix.c, do not open the directory containing the database file when
the database file is opened.  Instead, wait until time to fsync() the
directory.  And do not report an error if the open fails, since some
systems (Ex: AIX and a chromium sandbox) are unable to open and fsync
directories.

FossilOrigin-Name: 713b1b7dc1296e9cee42aeaad8c85528155f721d

13 years agoAllow the unlink() system call to be overridden in os_unix.c.
drh [Mon, 8 Aug 2011 23:18:05 +0000 (23:18 +0000)] 
Allow the unlink() system call to be overridden in os_unix.c.

FossilOrigin-Name: 8d1b5c3ac027ac00d57a250aad45230a09645617

13 years agoRemove redundant parameter from vdbeSorterInitMerge() in vdbesort.c.
dan [Mon, 8 Aug 2011 19:26:13 +0000 (19:26 +0000)] 
Remove redundant parameter from vdbeSorterInitMerge() in vdbesort.c.

FossilOrigin-Name: eec8c0df075d3a54ad71a2854b170f3ed307d068

13 years agoAdd fault-injection and other tests (and fixes) to improve coverage of vdbesort.c.
dan [Mon, 8 Aug 2011 16:44:25 +0000 (16:44 +0000)] 
Add fault-injection and other tests (and fixes) to improve coverage of vdbesort.c.

FossilOrigin-Name: 0e6defa6aa540b413ea3f4bb6dcd86364d547067

13 years agoRemove relevant elements from the sqlite_stat2 table when doing a DROP
drh [Sun, 7 Aug 2011 01:31:52 +0000 (01:31 +0000)] 
Remove relevant elements from the sqlite_stat2 table when doing a DROP
INDEX or DROP TABLE.

FossilOrigin-Name: 3c8f97ae527e380bf2583c7cf8ceac9509f29bfe

13 years agoFix a problem with building large indexes introduced by the previous commit.
dan [Sat, 6 Aug 2011 15:09:33 +0000 (15:09 +0000)] 
Fix a problem with building large indexes introduced by the previous commit.

FossilOrigin-Name: 038ec9ea92f7661358580d999adc400da14d47f0

13 years agoIn temp files used for merge sorting, store the size of each packed-memory-array...
dan [Sat, 6 Aug 2011 12:01:58 +0000 (12:01 +0000)] 
In temp files used for merge sorting, store the size of each packed-memory-array at the start of the array itself. This is to avoid having to store the offsets of all arrays in the (potentially very large) file in main-memory.

FossilOrigin-Name: 8051c1767c4386b0f14a66742d9fac41e001eb07

13 years agoMinor internal changes to vdbesort.c. Also, default to merging lists together 16...
dan [Fri, 5 Aug 2011 11:49:12 +0000 (11:49 +0000)] 
Minor internal changes to vdbesort.c. Also, default to merging lists together 16 at a time.

FossilOrigin-Name: 9ddc324a34dbf97acef92eef21f8a35f63db4c5b

13 years agoFix a comment in vdbesort.c.
dan [Thu, 4 Aug 2011 18:43:37 +0000 (18:43 +0000)] 
Fix a comment in vdbesort.c.

FossilOrigin-Name: db8518cab8e329b1dbe4cd6c81b21ef3ea69fcb1

13 years agoChange to using packed-memory-arrays instead of b-trees when performing an offline...
dan [Thu, 4 Aug 2011 12:14:04 +0000 (12:14 +0000)] 
Change to using packed-memory-arrays instead of b-trees when performing an offline merge-sort for CREATE INDEX. This makes it easier to control the number of disc seeks required when merging.

FossilOrigin-Name: a4770d079c1b236eb54751e75a44cccc997c6b93

13 years agoMerge the winopen-retry-logic branch into trunk. The biggest change here
drh [Wed, 3 Aug 2011 22:06:39 +0000 (22:06 +0000)] 
Merge the winopen-retry-logic branch into trunk.  The biggest change here
is to test scripts, which should now use such as copy_file and
delete_file from tester.tcl rather than the raw file commands of TCL.

FossilOrigin-Name: b90c28be3840169651022ef36cd7cf416bc22305

13 years agoUpdate the OP_Move opcode to shift the pScopyFrom pointer of aliases when
drh [Wed, 3 Aug 2011 16:40:15 +0000 (16:40 +0000)] 
Update the OP_Move opcode to shift the pScopyFrom pointer of aliases when
compiled with SQLITE_DEBUG.  Ticket [d63523637517386191].

FossilOrigin-Name: a2135ad13049c170b33315a949b1544e6a136183

13 years agoAdd explanatory comment to the win32lock-2.2 test case. winopen-retry-logic
mistachkin [Tue, 2 Aug 2011 23:45:53 +0000 (23:45 +0000)] 
Add explanatory comment to the win32lock-2.2 test case.

FossilOrigin-Name: 4cb17881d9676fa3359394391b9ba53f08e5809a

13 years agoCorrect subtle timing issues in the win32lock test cases and in the lock_win32_file...
mistachkin [Tue, 2 Aug 2011 23:34:00 +0000 (23:34 +0000)] 
Correct subtle timing issues in the win32lock test cases and in the lock_win32_file Tcl command.  Also, eliminate superfluous MSVC compiler warnings.

FossilOrigin-Name: 7baf02946e14eb889d864984ff3b3822aad8a3c9