]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
11 years agoMerge updates from trunk. vsix2013
mistachkin [Thu, 12 Sep 2013 00:40:54 +0000 (00:40 +0000)] 
Merge updates from trunk.

FossilOrigin-Name: fca799f03ad04b7d36381108ff10e9c7d03656ac

11 years agoAdd test cases to cover TPC-H Q8.
drh [Wed, 11 Sep 2013 14:57:11 +0000 (14:57 +0000)] 
Add test cases to cover TPC-H Q8.

FossilOrigin-Name: eb5cef8351d12c0f8550dac96ee7a6e495975b5a

11 years agoDeterministically initialize the PRNG used as a tie-breaker in the ANALYZE
drh [Tue, 10 Sep 2013 01:41:25 +0000 (01:41 +0000)] 
Deterministically initialize the PRNG used as a tie-breaker in the ANALYZE
command, so that the analysis is always the same given the same database.
This simplifies testing.

FossilOrigin-Name: 48ed8b565b84c8fa7898c2f9817c01f7e9c9182e

11 years agoMake sure that the transitive constraint optimization does not cause
drh [Mon, 9 Sep 2013 19:37:46 +0000 (19:37 +0000)] 
Make sure that the transitive constraint optimization does not cause
WHERE clause terms to be disabled prematurely.  We are unable to find a test
case that fails because of this, but it seems prudent to make this
preventative change nevertheless.

FossilOrigin-Name: d6e361d7fb8013d616af91ef2c10038c97d1be5f

11 years agoCombine the FuncDef.iPrefEnc and FuncDef.flags fields into a single
drh [Fri, 6 Sep 2013 13:10:12 +0000 (13:10 +0000)] 
Combine the FuncDef.iPrefEnc and FuncDef.flags fields into a single
new FuncDef.funcFlags field.

FossilOrigin-Name: 97b10e66e98e84755aa577f8da017bf1aea2056c

11 years agoMake sure the destination WhereLoop is left in a sane state when an
drh [Fri, 6 Sep 2013 00:40:59 +0000 (00:40 +0000)] 
Make sure the destination WhereLoop is left in a sane state when an
OOM fault occurs inside of whereLoopXfer().

FossilOrigin-Name: a99a53b81e29c9514b85318bea028d1667e5f760

11 years agoWhen preparing an UPDATE statement, avoid generating VDBE code for those foreign...
dan [Thu, 5 Sep 2013 18:40:29 +0000 (18:40 +0000)] 
When preparing an UPDATE statement, avoid generating VDBE code for those foreign key related actions and constraint checks that may be seen to be unnecessary by considering the subset of table columns potentially modified by the UPDATE.

FossilOrigin-Name: e940b5de49baa1d6a4cf859fbbc0e0df86ac5dbf

11 years agoRearrange the order of conditions in an "if" statement to facilitate testing.
drh [Wed, 4 Sep 2013 18:14:53 +0000 (18:14 +0000)] 
Rearrange the order of conditions in an "if" statement to facilitate testing.

FossilOrigin-Name: 8462fb43c275a70db59c4339650225deeadeef00

11 years agoAdd tests to improve coverage when SQLITE_ENABLE_STAT3 is defined.
dan [Wed, 4 Sep 2013 16:38:42 +0000 (16:38 +0000)] 
Add tests to improve coverage when SQLITE_ENABLE_STAT3 is defined.

FossilOrigin-Name: f929e9b41f2f69b086be3dd48fe557adbba7ae5c

11 years agoFix a bug in the command-line shell for ".mode insert" on UTF16 databases
drh [Wed, 4 Sep 2013 16:08:50 +0000 (16:08 +0000)] 
Fix a bug in the command-line shell for ".mode insert" on UTF16 databases
with BLOB values.

FossilOrigin-Name: d8fdc7821808e2bfa048144ee3015b745232dc30

11 years agoThe sqlite3Stat4ProbeSetValue() routine should always return results using
drh [Wed, 4 Sep 2013 15:15:10 +0000 (15:15 +0000)] 
The sqlite3Stat4ProbeSetValue() routine should always return results using
the database encoding.

FossilOrigin-Name: eb21663271369c3862bc8fd800f76d568c8579fe

11 years agoFix out-of-order variable declaration. Fix harmless compiler warning.
mistachkin [Wed, 4 Sep 2013 04:04:08 +0000 (04:04 +0000)] 
Fix out-of-order variable declaration.  Fix harmless compiler warning.

FossilOrigin-Name: 8df95bb0b3f72222cf262174247a467c234f9939

11 years agoConditionally exclude code from analyze.c that is not used by STAT3.
drh [Wed, 4 Sep 2013 02:07:38 +0000 (02:07 +0000)] 
Conditionally exclude code from analyze.c that is not used by STAT3.

FossilOrigin-Name: a48948a170056dfb87541dd5eb2773094dec6f8a

11 years agoHarden the STAT4 logic in where.c against OOM faults.
drh [Tue, 3 Sep 2013 19:26:22 +0000 (19:26 +0000)] 
Harden the STAT4 logic in where.c against OOM faults.

FossilOrigin-Name: 91d2cfbc95c34c0040deb69106bb9f895abb94c0

11 years agoFix another problem in stat4 sample selection.
dan [Tue, 3 Sep 2013 14:43:12 +0000 (14:43 +0000)] 
Fix another problem in stat4 sample selection.

FossilOrigin-Name: d59f580904e6e7e90fc0a692a3dd4eeff5942479

11 years agoMake sure the omit-noop-left-join optimization is not applied if columns
drh [Tue, 3 Sep 2013 14:03:47 +0000 (14:03 +0000)] 
Make sure the omit-noop-left-join optimization is not applied if columns
of the LEFT JOIN are used in the ORDER BY clause.
Ticket [be84e357c035]

FossilOrigin-Name: 0303d6bc7112e6f810ae1bd75cafc5ffc51f5212

11 years agoSimplify branch coverage testing by interchanging the order of two tests
drh [Mon, 2 Sep 2013 20:22:18 +0000 (20:22 +0000)] 
Simplify branch coverage testing by interchanging the order of two tests
in the whereLoopInsert() function.

FossilOrigin-Name: f7079b5365dd6cd8324a4fb23605e81476122ed6

11 years agoFurther stat4 related tests.
dan [Mon, 2 Sep 2013 18:58:11 +0000 (18:58 +0000)] 
Further stat4 related tests.

FossilOrigin-Name: 0a702c4b4c35fdbcb62e3ab88b9e57d7ea0052a8

11 years agoAdd tests to check if ANALYZE is choosing common non-periodic samples for the stat4...
dan [Mon, 2 Sep 2013 11:52:11 +0000 (11:52 +0000)] 
Add tests to check if ANALYZE is choosing common non-periodic samples for the stat4 table.

FossilOrigin-Name: 175842997af134138784bff6f8e93573deb5b36b

11 years agoFix a problem with using stat4 data to estimate the number of rows scanned by a range...
dan [Mon, 2 Sep 2013 07:16:40 +0000 (07:16 +0000)] 
Fix a problem with using stat4 data to estimate the number of rows scanned by a range constraint on the second or subsequent column of any index where an affinity transformation must be applied to the constraint argument.

FossilOrigin-Name: c21f58d84859e479a6cc619671a0df48b2f9692e

11 years agoCleanup of the windows VFS, including added support for Cygwin, fixes
drh [Sat, 31 Aug 2013 18:36:14 +0000 (18:36 +0000)] 
Cleanup of the windows VFS, including added support for Cygwin, fixes
for compiler warnings under unusual configurations, and improved diagnostic
error messages.

FossilOrigin-Name: c94933f13208f3f7d6d1b117ce6d2821100655a4

11 years agoRevise the amalgamation tool to allow 'duplicate' include files to be retained manual... cygwinTempPath
mistachkin [Sat, 31 Aug 2013 18:06:52 +0000 (18:06 +0000)] 
Revise the amalgamation tool to allow 'duplicate' include files to be retained manually while still preserving the existing line numbers.

FossilOrigin-Name: aa48284637b954d63bcf77e19b25e75c7ad1a6d3

11 years agoFix a problem causing SQLite not to use stat4 or stat3 data to analyze constraints...
dan [Sat, 31 Aug 2013 17:21:26 +0000 (17:21 +0000)] 
Fix a problem causing SQLite not to use stat4 or stat3 data to analyze constraints of the form "column = expr COLLATE collation" (those with an explicit COLLATE on the non-column side of the comparison operator).

FossilOrigin-Name: 1e86d81d46c9da6aaee0c6938ee40933f35e3d0d

11 years agoEnhancements to the Win32 API definition macros.
mistachkin [Sat, 31 Aug 2013 17:01:56 +0000 (17:01 +0000)] 
Enhancements to the Win32 API definition macros.

FossilOrigin-Name: b1811baab6e35ecb1ba920a7ed3302997758d309

11 years agoReenable a test accidentally disabled when the stat4 branch was merged.
dan [Sat, 31 Aug 2013 14:56:30 +0000 (14:56 +0000)] 
Reenable a test accidentally disabled when the stat4 branch was merged.

FossilOrigin-Name: d9fadc8fa6ef02d516678d57896d93e0a5f52cfe

11 years agoAvoid commenting out #include statements when building the amalgamation source code...
mistachkin [Sat, 31 Aug 2013 05:46:42 +0000 (05:46 +0000)] 
Avoid commenting out #include statements when building the amalgamation source code file.

FossilOrigin-Name: 2fca6d784b000fd3a4d6890e38a0b087767f3a7f

11 years agoFix harmless MSVC compiler warning with MEMDEBUG defined.
mistachkin [Sat, 31 Aug 2013 05:13:22 +0000 (05:13 +0000)] 
Fix harmless MSVC compiler warning with MEMDEBUG defined.

FossilOrigin-Name: b48cfd2dfca70091a52deeeee16619237e1c270b

11 years agoImprove the consistency of the diagnostic messages on Windows.
mistachkin [Sat, 31 Aug 2013 02:48:56 +0000 (02:48 +0000)] 
Improve the consistency of the diagnostic messages on Windows.

FossilOrigin-Name: c6f174a0cb27fe79740fffc7ce51081ec52a5dbd

11 years agoAdd support for Cygwin when handling temporary file names. Improve error codes and...
mistachkin [Fri, 30 Aug 2013 21:52:38 +0000 (21:52 +0000)] 
Add support for Cygwin when handling temporary file names.  Improve error codes and diagnostic messages for temporary file name handling on Windows.  Rename winConvertUtf8Filename to winConvertFromUtf8Filename.  Improve placement and comments for forward function declarations.

FossilOrigin-Name: a411df725153119acb3bcf44fb71deecaa307887

11 years agoFix compiler warnings in analyze.c.
dan [Fri, 30 Aug 2013 20:19:52 +0000 (20:19 +0000)] 
Fix compiler warnings in analyze.c.

FossilOrigin-Name: 5bbd2ccb3d2d6286fd667dac2ab658d6b89640a6

11 years agoFix comment typo in analyze.c. No changes to code.
mistachkin [Fri, 30 Aug 2013 19:59:48 +0000 (19:59 +0000)] 
Fix comment typo in analyze.c. No changes to code.

FossilOrigin-Name: dbc31750440226702fbf88f1bf6140ef403c9be1

11 years agoFix comment typos in the where.c module. No code changes.
drh [Fri, 30 Aug 2013 17:50:35 +0000 (17:50 +0000)] 
Fix comment typos in the where.c module.  No code changes.

FossilOrigin-Name: 1e0b77cf0edf3d26f76d83aa5466e9ec0e60a710

11 years agoIf the cost of two whereLoop objects is the same in every way except that
drh [Fri, 30 Aug 2013 17:35:44 +0000 (17:35 +0000)] 
If the cost of two whereLoop objects is the same in every way except that
one has fewer expected output rows than the other, then choose the one with
fewer output rows.

FossilOrigin-Name: 79e458ef7acfddbc189163e3e958da529becb130

11 years agoAdd the SQLITE_MINIMUM_FILE_DESCRIPTOR compile-time option, for control over
drh [Fri, 30 Aug 2013 14:24:12 +0000 (14:24 +0000)] 
Add the SQLITE_MINIMUM_FILE_DESCRIPTOR compile-time option, for control over
exactly which low-numbered file descriptors SQLite will use.

FossilOrigin-Name: ba5190534330a25722eeb7ea9c42da7a6d146014

11 years agoAdd a test for fts4 unicode61 option remove_diacritics=0.
dan [Fri, 30 Aug 2013 13:29:51 +0000 (13:29 +0000)] 
Add a test for fts4 unicode61 option remove_diacritics=0.

FossilOrigin-Name: 6bf7ae6ff6b18712544ddeafb6848b3b27ff22d2

11 years agoImprovements to the robust_open() logic in the unix VFS so that if an attempt
drh [Fri, 30 Aug 2013 06:20:23 +0000 (06:20 +0000)] 
Improvements to the robust_open() logic in the unix VFS so that if an attempt
is made to open a repository on file descriptors 0, 1, or 2, and blocking
that file descriptor by opening it on /dev/null fails, then the open will
fail.

FossilOrigin-Name: d9c018f8155ab48df8e0e02519bba50588fe49fc

11 years agoMake the unix VFS defensive against the error of having a database file open
drh [Thu, 29 Aug 2013 23:36:49 +0000 (23:36 +0000)] 
Make the unix VFS defensive against the error of having a database file open
on file descriptors 1 or 2, as an error message might easily be written onto
those file descriptors and thus overwrite and corrupt the database.

FossilOrigin-Name: 30d38cc44904d93508b87e373b2f45d5f93e556b

11 years agoChange the unix VFS so that it refuses to open a database file using overwrite-avoidance
drh [Thu, 29 Aug 2013 23:34:53 +0000 (23:34 +0000)] 
Change the unix VFS so that it refuses to open a database file using
a file descriptor less than 3.

FossilOrigin-Name: 66dddda06898abbf97fe0ac6a10ce1527ca8605e

11 years agoNever leave an open file descriptor pointing into the middle of the
drh [Thu, 29 Aug 2013 21:26:26 +0000 (21:26 +0000)] 
Never leave an open file descriptor pointing into the middle of the
database file if the file descriptor number is 2 or less.

FossilOrigin-Name: 3426673e4659eb68dbd14a3e41d4620d748432db

11 years agoRestore fix [f15591f802], which was accidentally clobbered by the stat4 merge.
dan [Thu, 29 Aug 2013 14:56:14 +0000 (14:56 +0000)] 
Restore fix [f15591f802], which was accidentally clobbered by the stat4 merge.

FossilOrigin-Name: d4b6ad3333cc3bad500c2ebf7a6ea552b6762b69

11 years agoCandidate fix for [9f2eb3abac]: Have the whereShortCut() planner ignore indexes with...
dan [Thu, 29 Aug 2013 10:46:05 +0000 (10:46 +0000)] 
Candidate fix for [9f2eb3abac]: Have the whereShortCut() planner ignore indexes with more than four columns.

FossilOrigin-Name: c1152bdcbb5ac185f743015fff63769effa81b4b

11 years agoSmall enhancements to unit testing infrastructure.
mistachkin [Thu, 29 Aug 2013 01:09:14 +0000 (01:09 +0000)] 
Small enhancements to unit testing infrastructure.

FossilOrigin-Name: 9229aeb361f9805894321327d05aba855b8799f3

11 years agoEnable finer control of optimizations when compiling with the MSVC makefile. Also...
mistachkin [Thu, 29 Aug 2013 01:03:38 +0000 (01:03 +0000)] 
Enable finer control of optimizations when compiling with the MSVC makefile.  Also, several modularity enhancements to the MSVC makefile.

FossilOrigin-Name: 6c709338bc77fbed24a2597eabd88dd8c29b38d7

11 years agoRe-enable test file wild001.test.
dan [Wed, 28 Aug 2013 19:01:07 +0000 (19:01 +0000)] 
Re-enable test file wild001.test.

FossilOrigin-Name: 4f182ddc36944fa54f1a34c1f0527db0ebb39c96

11 years agoAdd the win32-longpath VFS allowing windows filenames up to 32K characters in
drh [Wed, 28 Aug 2013 18:18:12 +0000 (18:18 +0000)] 
Add the win32-longpath VFS allowing windows filenames up to 32K characters in
length.  Remove unused code when -DSQLITE_MAX_MMAP_SIZE=0.  Fix some
compiler warnings on windows.

FossilOrigin-Name: 12d0a8859de0a9d823997cfeccc77bd572cb6d13

11 years agoUpdate list of supported Tcl shells to include 8.6. Remove stray OS2 references. mmapDisabled
mistachkin [Wed, 28 Aug 2013 18:06:26 +0000 (18:06 +0000)] 
Update list of supported Tcl shells to include 8.6.  Remove stray OS2 references.

FossilOrigin-Name: ecd52ccf650ce2a4ab93c7c482289c1bc4768eeb

11 years agoFix a couple comments.
mistachkin [Wed, 28 Aug 2013 17:59:38 +0000 (17:59 +0000)] 
Fix a couple comments.

FossilOrigin-Name: 945cb89ecb92a6c2075b3e58ce1ba3d419b1b6ca

11 years agoIn the query optimizer, when converting BETWEEN and LIKE/GLOB expressions
drh [Wed, 28 Aug 2013 16:27:01 +0000 (16:27 +0000)] 
In the query optimizer, when converting BETWEEN and LIKE/GLOB expressions
into simpler forms for processing, be sure to transfer the LEFT JOIN markings.
Fix for ticket [bc878246eafe0f52c].

FossilOrigin-Name: caab361ebee5f5c3fdafd9b1abe3d1ab7c5b4db9

11 years agoIncrease the version number to 3.8.1 due to the addition of STAT4 support.
drh [Wed, 28 Aug 2013 13:46:09 +0000 (13:46 +0000)] 
Increase the version number to 3.8.1 due to the addition of STAT4 support.

FossilOrigin-Name: 41c089e2a21f52b3d6d850eccba60be17010c9fe

11 years agoFix an off-by-one error that causes a quoted empty string at the end of
drh [Wed, 28 Aug 2013 13:33:40 +0000 (13:33 +0000)] 
Fix an off-by-one error that causes a quoted empty string at the end of
a CRNL-terminated line of CSV input to be misread by the shell.

FossilOrigin-Name: b5617e4fdadc4cded93c985008e90982dd48bc3b

11 years agoAdd a test case for empty quoted field in CSV import in the shell.
drh [Wed, 28 Aug 2013 11:57:52 +0000 (11:57 +0000)] 
Add a test case for empty quoted field in CSV import in the shell.

FossilOrigin-Name: 3df56e849164811117f9ac8ee2aee1eee188bb96

11 years agoLabel a certain branch as NEVER() only for non-STAT3/4 builds.
drh [Wed, 28 Aug 2013 11:43:49 +0000 (11:43 +0000)] 
Label a certain branch as NEVER() only for non-STAT3/4 builds.

FossilOrigin-Name: b5ccf6e995ac2fe010f49d46d40b487ddbd28e5a

11 years agoIn the win32longpath test, move the journal mode change down where it was intended...
mistachkin [Wed, 28 Aug 2013 07:42:43 +0000 (07:42 +0000)] 
In the win32longpath test, move the journal mode change down where it was intended to be.

FossilOrigin-Name: 5cead293bbbcddd7d0976db41133e40704efcc99

11 years agoSupport database file names longer than 260 characters using the new 'win32-longpath...
mistachkin [Wed, 28 Aug 2013 05:49:39 +0000 (05:49 +0000)] 
Support database file names longer than 260 characters using the new 'win32-longpath' VFS variant.

FossilOrigin-Name: 37e85e444cde18f061049437980b965d4485f43c

11 years agoMake names of private functions in the Win32 VFS consistent. Fix comment typo in...
mistachkin [Wed, 28 Aug 2013 02:37:29 +0000 (02:37 +0000)] 
Make names of private functions in the Win32 VFS consistent.  Fix comment typo in Win32 mutex implementation.

FossilOrigin-Name: c3b82c5bf97cfb35544c5b1fbcdf7b9c4827d1cf

11 years agoRemove hard-coding of the directory separator in the Win32 VFS. Fixes to OSTRACE...
mistachkin [Wed, 28 Aug 2013 02:26:48 +0000 (02:26 +0000)] 
Remove hard-coding of the directory separator in the Win32 VFS.  Fixes to OSTRACE macros.

FossilOrigin-Name: fc98092f4bd42d64059024f09547904c1d70a517

11 years agoFix several harmless compiler warnings. Fix a couple compiler issues with the shell.
mistachkin [Wed, 28 Aug 2013 01:54:12 +0000 (01:54 +0000)] 
Fix several harmless compiler warnings.  Fix a couple compiler issues with the shell.

FossilOrigin-Name: 8917e9f9a0802cbfb6f33e2ab1c2f98e4df5babd

11 years agoAdjust ANALYZE for improved test coverage. Use the SQLITE_ENABLE_STAT3_OR_STAT4
drh [Tue, 27 Aug 2013 23:15:44 +0000 (23:15 +0000)] 
Adjust ANALYZE for improved test coverage.  Use the SQLITE_ENABLE_STAT3_OR_STAT4
macro (created in sqliteInt.h) to conditionally include code, instead of
a boolean specifying both macros separately.

FossilOrigin-Name: 67a9a392edd62ef5a5a1ad3010b20a39b285793d

11 years agoReduce the amount of code run and memory used for ANALYZE in the common case
drh [Tue, 27 Aug 2013 20:16:48 +0000 (20:16 +0000)] 
Reduce the amount of code run and memory used for ANALYZE in the common case
where neither STAT3 and STAT4 are enabled.

FossilOrigin-Name: 9d1424c91a21ed740aca53e437b8f7c1f0823c03

11 years agoUpdate sqlite3.pc.in to use @PACKAGE_VERSION@ instead of @RELEASE@.
dan [Tue, 27 Aug 2013 15:41:09 +0000 (15:41 +0000)] 
Update sqlite3.pc.in to use @PACKAGE_VERSION@ instead of @RELEASE@.

FossilOrigin-Name: 2460dfd8825d251e622e866e8dc1c0bf7fe7ec9f

11 years agoIn the ANALYZE command implementation make statInit() a 2-value function
drh [Tue, 27 Aug 2013 14:14:14 +0000 (14:14 +0000)] 
In the ANALYZE command implementation make statInit() a 2-value function
since the 3rd parameter was always the same constant.

FossilOrigin-Name: 959bb5acdc3b4e2b481e3c38f20867131bfc9dbc

11 years agoPreparation for further Windows path name handling changes.
mistachkin [Mon, 26 Aug 2013 23:18:57 +0000 (23:18 +0000)] 
Preparation for further Windows path name handling changes.

FossilOrigin-Name: ec99224b0c9cf1ccd64b3dc93252556d888e93a3

11 years agoMerge the STAT4 capability into trunk.
drh [Mon, 26 Aug 2013 23:18:06 +0000 (23:18 +0000)] 
Merge the STAT4 capability into trunk.

FossilOrigin-Name: a32af0abe5fa6d570604fa3534e8230d5b6042fc

11 years agoChange MAX_PATH related defines to use character lengths where WCHARs are used.
mistachkin [Mon, 26 Aug 2013 20:45:50 +0000 (20:45 +0000)] 
Change MAX_PATH related defines to use character lengths where WCHARs are used.

FossilOrigin-Name: 0a497083e915520c0807cb6611264b1a35ff62b7

11 years agoMerge updates from trunk.
mistachkin [Mon, 26 Aug 2013 19:36:18 +0000 (19:36 +0000)] 
Merge updates from trunk.

FossilOrigin-Name: 9d6860098f96efc7ea60e2d6116fb7d0e2685a55

11 years agoFix for builds with both SQLITE_OMIT_WAL and SQLITE_MAX_MMAP_SIZE=0 defined.
dan [Mon, 26 Aug 2013 14:30:25 +0000 (14:30 +0000)] 
Fix for builds with both SQLITE_OMIT_WAL and SQLITE_MAX_MMAP_SIZE=0 defined.

FossilOrigin-Name: edd5dbdc3239fc88799b822941603fcc828ecbb6

11 years agoVersion 3.8.0 version-3.8.0
drh [Mon, 26 Aug 2013 04:50:08 +0000 (04:50 +0000)] 
Version 3.8.0

FossilOrigin-Name: f64cd21e2e23ed7cff48f7dafa5e76adde9321c2

11 years agoSeveral modifications to the use of the MAX_PATH macro on Windows to improve consistency.
mistachkin [Sat, 24 Aug 2013 23:55:01 +0000 (23:55 +0000)] 
Several modifications to the use of the MAX_PATH macro on Windows to improve consistency.

FossilOrigin-Name: bda4c47df8e80b4cc9e8aac8fd74482869f96107

11 years agoFix a couple compilation issues on Unix.
mistachkin [Sat, 24 Aug 2013 01:12:03 +0000 (01:12 +0000)] 
Fix a couple compilation issues on Unix.

FossilOrigin-Name: 25b029d8f32440a94ef8af45153423f6702d7431

11 years agoUnify the result of PRAGMA mmap_size when mmap support is disabled.
mistachkin [Sat, 24 Aug 2013 00:59:24 +0000 (00:59 +0000)] 
Unify the result of PRAGMA mmap_size when mmap support is disabled.

FossilOrigin-Name: 032c31593d6f569842830cac6222362be68b2084

11 years agoAdjust #ifdefs to get SQLITE_OMIT_AUTOMATIC_INDEX and SQLITE_OMIT_PAGER_PRAGMAS
drh [Fri, 23 Aug 2013 17:33:46 +0000 (17:33 +0000)] 
Adjust #ifdefs to get SQLITE_OMIT_AUTOMATIC_INDEX and SQLITE_OMIT_PAGER_PRAGMAS
to build.

FossilOrigin-Name: ed310201628cf79c0f57674ae7478ee6738b1c6e

11 years agoFix a requirements comment in a test case. No changes to the testcase
drh [Fri, 23 Aug 2013 16:47:40 +0000 (16:47 +0000)] 
Fix a requirements comment in a test case.  No changes to the testcase
itself nor to any code.

FossilOrigin-Name: 3ad1f998e5db044849b528c31c4a7e1f3d527320

11 years agoModify script mkautoconfamal.sh to use the download.html naming convention for the...
dan [Fri, 23 Aug 2013 12:04:52 +0000 (12:04 +0000)] 
Modify script mkautoconfamal.sh to use the download.html naming convention for the tar.gz it creates.

FossilOrigin-Name: 375b4e3db0e0c9e83034d1c33d7c57aca48e87b6

11 years agoDefer the creation of automatic indices until the index is actually used.
drh [Thu, 22 Aug 2013 02:56:28 +0000 (02:56 +0000)] 
Defer the creation of automatic indices until the index is actually used.

FossilOrigin-Name: 0775501acf152dcbf4dd039f4511f3d8c4330d85

11 years agoSimplify the btreeGetPage() routine so that it uses a single flag parameter
drh [Wed, 21 Aug 2013 23:42:32 +0000 (23:42 +0000)] 
Simplify the btreeGetPage() routine so that it uses a single flag parameter
in place of two boolean parameters.

FossilOrigin-Name: 617e23ec283d3147fc3fd29c474ccedf4915cdc7

11 years agoMinor performance tweaks to the pager.
drh [Wed, 21 Aug 2013 22:54:55 +0000 (22:54 +0000)] 
Minor performance tweaks to the pager.

FossilOrigin-Name: 9ae1f9ce7ea6beaeddc3711080b3796e05acc4f8

11 years agoRefactor the sqlite3_randomness() implementation for improved performance.
drh [Wed, 21 Aug 2013 22:09:25 +0000 (22:09 +0000)] 
Refactor the sqlite3_randomness() implementation for improved performance.

FossilOrigin-Name: 4144dffb57b5ed791d7a6d2f26fab5e7dc77fbd1

11 years agoSimplification to the StrAccum object and the sqlite3StrAccumAppend()
drh [Wed, 21 Aug 2013 21:12:10 +0000 (21:12 +0000)] 
Simplification to the StrAccum object and the sqlite3StrAccumAppend()
method that also results in slightly better performance.

FossilOrigin-Name: 700dbbea8647e0fdaee6d0aba3d3dd8ebfbac04a

11 years agoMinor fixes for test cases. No code changes.
dan [Wed, 21 Aug 2013 20:04:54 +0000 (20:04 +0000)] 
Minor fixes for test cases. No code changes.

FossilOrigin-Name: ef2a6a37366f91889dc2f1ba9cb6d1257d9b05db

11 years agoFix typo in test.
mistachkin [Wed, 21 Aug 2013 19:59:14 +0000 (19:59 +0000)] 
Fix typo in test.

FossilOrigin-Name: f9859fe93bcecb4be7c1034291018523124c4a5c

11 years agoUpdate sqlite3MemCompare() to try common cases first, for a modest speed
drh [Wed, 21 Aug 2013 19:13:53 +0000 (19:13 +0000)] 
Update sqlite3MemCompare() to try common cases first, for a modest speed
improvement.

FossilOrigin-Name: b25bac79191975149d88fe34618c74354de62c5e

11 years agoIf a virtual table xSync() returns an error message, copy it into a buffer allocated...
dan [Wed, 21 Aug 2013 17:35:48 +0000 (17:35 +0000)] 
If a virtual table xSync() returns an error message, copy it into a buffer allocated by sqlite3DbMalloc() before transfering it to Vdbe.zErrMsg.

FossilOrigin-Name: 854ba3049005adf033e07e6740a36e63f2a56758

11 years agoPerformance enhancement in btreeParseCellPtr().
drh [Wed, 21 Aug 2013 15:52:22 +0000 (15:52 +0000)] 
Performance enhancement in btreeParseCellPtr().

FossilOrigin-Name: a17190a2296e8cd5e59524ff5914fc5ea3560697

11 years agoFix an FTS4 problem introduced by [361084e1eb].
dan [Wed, 21 Aug 2013 15:45:27 +0000 (15:45 +0000)] 
Fix an FTS4 problem introduced by [361084e1eb].

FossilOrigin-Name: 5f35c8cb8f8b67121c70f98c02c4aa7c25327690

11 years agoCandidate fix for [d666d600a6].
dan [Wed, 21 Aug 2013 12:04:32 +0000 (12:04 +0000)] 
Candidate fix for [d666d600a6].

FossilOrigin-Name: 781592f32c8e1dcd59954c17211cf61349d1c0b1

11 years agoFix a minor problem in progress.test. No code changes.
dan [Wed, 21 Aug 2013 07:25:03 +0000 (07:25 +0000)] 
Fix a minor problem in progress.test. No code changes.

FossilOrigin-Name: a95ae93b32a9ad2ae017124ed0881802c3c741c0

11 years agoFix a couple of test scripts to work with DEFAULT_AUTOVACUUM and OMIT_VIRTUALTABLE.
dan [Tue, 20 Aug 2013 20:25:03 +0000 (20:25 +0000)] 
Fix a couple of test scripts to work with DEFAULT_AUTOVACUUM and OMIT_VIRTUALTABLE.

FossilOrigin-Name: 356c6c59311eaf7d5633476f635e94a12b8b3924

11 years agoFix an invalid assert() in where.c. Also a crash that can occur in the EXPLAIN QUERY...
dan [Tue, 20 Aug 2013 17:14:57 +0000 (17:14 +0000)] 
Fix an invalid assert() in where.c. Also a crash that can occur in the EXPLAIN QUERY PLAN code under obscure circumstances.

FossilOrigin-Name: ef192abb82c2fc31135f875d7a19908d67c076b0

11 years agoIgnore IS NOT NULL and NOT NULL constraints on NOT NULL columns.
drh [Tue, 20 Aug 2013 17:00:55 +0000 (17:00 +0000)] 
Ignore IS NOT NULL and NOT NULL constraints on NOT NULL columns.

FossilOrigin-Name: e476408e3c5ba5f3ba5e98ff264167c163d72e3f

11 years agoTest script changes to support testing sqlite3_interrupt().
dan [Tue, 20 Aug 2013 16:08:39 +0000 (16:08 +0000)] 
Test script changes to support testing sqlite3_interrupt().

FossilOrigin-Name: 0cede9f898bcd13dab51b25cb0e72213d988d3d2

11 years agoPerformance optimizations in the VDBE and especially to the OP_Next and
drh [Tue, 20 Aug 2013 03:13:51 +0000 (03:13 +0000)] 
Performance optimizations in the VDBE and especially to the OP_Next and
related opcodes and in the sqlite3BtreeNext() and sqlite3BtreePrevious()
routines.  This is a cherrypick of [6f99b54aedeb], [d2efea1682a7], and
[d78c5d89de4b].

FossilOrigin-Name: 7f72fc4f47445a2c01910b268335873de9f75059

11 years agoPerformance improvement in sqlite3BtreeNext() and sqlite3BtreePrevious()
drh [Mon, 19 Aug 2013 20:04:10 +0000 (20:04 +0000)] 
Performance improvement in sqlite3BtreeNext() and sqlite3BtreePrevious()
for the common case of a valid cursor.

FossilOrigin-Name: dc65ad8c4c67b21e3b042b8df6580d02b634a90b

11 years agoInitialize a variable in fts3_write.c on the grounds that the argument required to...
dan [Mon, 19 Aug 2013 19:29:50 +0000 (19:29 +0000)] 
Initialize a variable in fts3_write.c on the grounds that the argument required to show that it does not require initialization with is complicated. Add an assert() to where.c to silence a clang scan-build warning.

FossilOrigin-Name: d6c4d48a002a6d7057fccc30064ce0b049678f0c

11 years agoFix test script pragma2.test so that it works with ENABLE_MEMORY_MANAGEMENT.
dan [Mon, 19 Aug 2013 18:37:18 +0000 (18:37 +0000)] 
Fix test script pragma2.test so that it works with ENABLE_MEMORY_MANAGEMENT.

FossilOrigin-Name: 6acf728100ff339e4451bcefd3a20fd5c3cfd662

11 years agoAdd some extra assert() statements to silence a few clang warnings.
dan [Mon, 19 Aug 2013 18:17:03 +0000 (18:17 +0000)] 
Add some extra assert() statements to silence a few clang warnings.

FossilOrigin-Name: 1c63e9515b5f5cb9169928b108d002dcd18ad4fd

11 years agoRemove unused variables from the command-line shell sources.
drh [Mon, 19 Aug 2013 14:23:31 +0000 (14:23 +0000)] 
Remove unused variables from the command-line shell sources.

FossilOrigin-Name: 753a402e90f3c9f675155ea96ee048dbe7a68700

11 years agoFix a potential reference off the end of an array in the query planner.
drh [Mon, 19 Aug 2013 14:19:00 +0000 (14:19 +0000)] 
Fix a potential reference off the end of an array in the query planner.

FossilOrigin-Name: f15591f80212dd6d4ed8e0f14be691cd578d4cdf

11 years agoFixes for harmless compiler warnings.
drh [Mon, 19 Aug 2013 11:15:48 +0000 (11:15 +0000)] 
Fixes for harmless compiler warnings.

FossilOrigin-Name: a0d9ca4f07f1dc3a189864f8ed9cdb0b1d791b1a

11 years agoAdjustments to #ifdefs in analyze.c to all a clean compile with no sqlite_stat4
drh [Sat, 17 Aug 2013 18:57:15 +0000 (18:57 +0000)] 
Adjustments to #ifdefs in analyze.c to all a clean compile with no
extra code with both ENABLE_STAT3 and ENABLE_STAT4 and with neither.

FossilOrigin-Name: f86b75b6c7290ee6ddb3636090b00e99fc68c45e

11 years agoAdd the cache_spill pragma. Change the fullfsync and checkpoint_fullfsync
drh [Sat, 17 Aug 2013 16:37:04 +0000 (16:37 +0000)] 
Add the cache_spill pragma.  Change the fullfsync and checkpoint_fullfsync
pragmas to apply to all attached databases.

FossilOrigin-Name: 65a85a156f3c827890e9f1fd22484a2f875c3b6f