]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
7 years agoUpdate zonefile README.md file to mention the frame cache. zonefile
dan [Tue, 27 Feb 2018 20:09:45 +0000 (20:09 +0000)] 
Update zonefile README.md file to mention the frame cache.

FossilOrigin-Name: 84e9351bbd0a9bf9e1d64a441366a90276c231b44548cbc947f7fb2842f82490

7 years agoRationalize some code in zonefile.c. Fix other minor issues in the same.
dan [Tue, 27 Feb 2018 19:50:28 +0000 (19:50 +0000)] 
Rationalize some code in zonefile.c. Fix other minor issues in the same.

FossilOrigin-Name: f11beb16a87cc967e896cf67121b1e4045e427ebdc6a424e9f009ffced955d36

7 years agoEnhance test 'zonefile1-6.5' to account for platform differences.
mistachkin [Tue, 27 Feb 2018 15:47:41 +0000 (15:47 +0000)] 
Enhance test 'zonefile1-6.5' to account for platform differences.

FossilOrigin-Name: 8b6178403fb6a7f87502c42026caf3da1c355b2ed9e780b347f4a05d7ffc1e18

7 years agoAdjustments to test numbers for the 'zonefile' extension.
mistachkin [Tue, 27 Feb 2018 15:42:29 +0000 (15:42 +0000)] 
Adjustments to test numbers for the 'zonefile' extension.

FossilOrigin-Name: 55de6f14d49342394397c0dc29c1e98c927ef99d57ec1f71c79099f584be20d1

7 years agoHave the zonefile extension use binary instead of text keys.
dan [Tue, 27 Feb 2018 14:26:33 +0000 (14:26 +0000)] 
Have the zonefile extension use binary instead of text keys.

FossilOrigin-Name: 39a4267fc9cec77fd8d9be25c73b848e77a68906253cc75d61fe90e549bafa27

7 years agoAdd extra parameter to zonefileCodecCreate() to indicate whether the new
dan [Mon, 26 Feb 2018 07:58:39 +0000 (07:58 +0000)] 
Add extra parameter to zonefileCodecCreate() to indicate whether the new
object will be used for mock-encryption or mock-decryption.

FossilOrigin-Name: 231832c4cb15862e61dfcc00fba9ab78ca7e2442a0d4aa1a98a191f5f8b4cff3

7 years agoTest edge cases in the zonefile module. Fix a broken error message in the same.
dan [Sat, 24 Feb 2018 08:26:21 +0000 (08:26 +0000)] 
Test edge cases in the zonefile module. Fix a broken error message in the same.

FossilOrigin-Name: 1764ade22b52eba0226ae2e6e837a1b0967023eabd7d50e9f87c5e7042ea2f12

7 years agoFix a problem with handling "k >= ?" constraints in the zonefile module.
dan [Fri, 23 Feb 2018 21:01:15 +0000 (21:01 +0000)] 
Fix a problem with handling "k >= ?" constraints in the zonefile module.

FossilOrigin-Name: 9a99afafa3fb9ec4823e5030cb04a685d64942ec04a1154b729dc4c0f313dc4a

7 years agoAdd test cases and minor fixes for the zonefile module.
dan [Fri, 23 Feb 2018 19:21:19 +0000 (19:21 +0000)] 
Add test cases and minor fixes for the zonefile module.

FossilOrigin-Name: dbbcbf0066ef82c789981feff78d95861a836e6e23a22ad3bb698dd257062f75

7 years agoFix a problem causing SQLITE_HAVE_LZ4 builds of zonefile to fail unless
dan [Fri, 23 Feb 2018 14:09:59 +0000 (14:09 +0000)] 
Fix a problem causing SQLITE_HAVE_LZ4 builds of zonefile to fail unless
SQLITE_HAVE_ZLIB is also defined.

FossilOrigin-Name: 994aa77d7826ab220727595a6a21f1f95a8f7590798879706016665ca1934dd1

7 years agoFix a problem with DROP TABLE statements on zonefile virtual tables.
dan [Fri, 23 Feb 2018 14:02:37 +0000 (14:02 +0000)] 
Fix a problem with DROP TABLE statements on zonefile virtual tables.

FossilOrigin-Name: d2ed6910b86a086911d3c0670c9778e222186d8733fc81bcc081932d70e0452a

7 years agoFix harmless compiler warnings in the zonefile extension seen with MSVC.
mistachkin [Fri, 23 Feb 2018 14:00:38 +0000 (14:00 +0000)] 
Fix harmless compiler warnings in the zonefile extension seen with MSVC.

FossilOrigin-Name: d28003941ceca7fb707fcdb09bf8b00a6c1b728956e018d7ecfb6852d7dd469b

7 years agoAvoid running a test case that requires zstd in non-SQLITE_HAVE_ZSTD builds.
dan [Fri, 23 Feb 2018 13:58:17 +0000 (13:58 +0000)] 
Avoid running a test case that requires zstd in non-SQLITE_HAVE_ZSTD builds.

FossilOrigin-Name: d716dff4441b4d28e0184ce06508bc9122451103ead8edbfbf3c87b666445ee6

7 years agoMerge updates from trunk.
mistachkin [Fri, 23 Feb 2018 13:45:05 +0000 (13:45 +0000)] 
Merge updates from trunk.

FossilOrigin-Name: 53f2100a296f64d206f1caf2d754820a7898bb33b31a6ab2169957d228d5d2a0

7 years agoFix harmless compiler warnings in the zipfile extension seen with MSVC.
mistachkin [Fri, 23 Feb 2018 13:38:54 +0000 (13:38 +0000)] 
Fix harmless compiler warnings in the zipfile extension seen with MSVC.

FossilOrigin-Name: 15c587cf6ffc920dc37f67cacb4f0db6a603fb998a22a639f755387910516414

7 years agoEnable the JSON1 extension when compiling the test fixture with MSVC.
mistachkin [Fri, 23 Feb 2018 13:38:20 +0000 (13:38 +0000)] 
Enable the JSON1 extension when compiling the test fixture with MSVC.

FossilOrigin-Name: e9e9f27b3d496531905ad7459cf60366ad3798f507266134dd6388cdec50fdc4

7 years agoAdd tests cases and fix some minor zonefile problems.
dan [Thu, 22 Feb 2018 21:06:08 +0000 (21:06 +0000)] 
Add tests cases and fix some minor zonefile problems.

FossilOrigin-Name: f4d42162fa2196078cea4db9c2247a08f5439d29e49f5e8dc23db317b8101865

7 years agoFor the "SQLite archive" link in the README.md file, point to the
drh [Thu, 22 Feb 2018 18:30:53 +0000 (18:30 +0000)] 
For the "SQLite archive" link in the README.md file, point to the
CLI .archive command documentation, not the original "sqlar" website.

FossilOrigin-Name: 4290faf5f7223ebe35b8ed5c4f0ba2444c1764501cabc09a79000f9c1d0890c7

7 years agoUpdates to the README.md file. Mention the ability to use SQLite-archives for
drh [Thu, 22 Feb 2018 18:28:19 +0000 (18:28 +0000)] 
Updates to the README.md file.  Mention the ability to use SQLite-archives for
download.

FossilOrigin-Name: ab9a7ae4eec0aaa5e0b472998f6de7212055d93c163f0b66da60b956bcc45add

7 years agoAdd an LRU cache of uncompressed frame content to the zonefile virtual table
dan [Thu, 22 Feb 2018 16:46:42 +0000 (16:46 +0000)] 
Add an LRU cache of uncompressed frame content to the zonefile virtual table
implementation.

FossilOrigin-Name: 883e7e75d65622e8d06c46e48b7cc756cc0e3345b8124a8038cab0a8d51d0458

7 years agoModifications to the zonefile module to make it easier to add a cache of
dan [Wed, 21 Feb 2018 21:15:45 +0000 (21:15 +0000)] 
Modifications to the zonefile module to make it easier to add a cache of
uncompressed frame content.

FossilOrigin-Name: d9d5cc62f11058f9ba560381367ff4765dbbde08184e55abdb50ae1b6bf4a016

7 years agoHave zonefile store encryption keys in a hash-table instead of a linked list.
dan [Wed, 21 Feb 2018 16:36:08 +0000 (16:36 +0000)] 
Have zonefile store encryption keys in a hash-table instead of a linked list.
Add extra tests for key management.

FossilOrigin-Name: 3a63ea652546a4c63eccd72665becff38a97a0e39d2f11703cb6899451570fd4

7 years agoIn zonefile, change the "file TEXT" column back to "fileid INTEGER". The
dan [Wed, 21 Feb 2018 10:43:19 +0000 (10:43 +0000)] 
In zonefile, change the "file TEXT" column back to "fileid INTEGER". The
fileid can be used as a key with the associated zonefile_files table, which
contains more information than just the filename.

FossilOrigin-Name: 38d23888cf5a7117c51bd9211bd93ec52a30360f7eb2bc83a13910c5d85fe739

7 years agoRemove an unreachable branch in the walIndexPage() logic.
drh [Wed, 21 Feb 2018 01:48:22 +0000 (01:48 +0000)] 
Remove an unreachable branch in the walIndexPage() logic.

FossilOrigin-Name: 4e61a9731f5949dcf05c541106b56be16add04a7730613481fc8519d3e4f493b

7 years agoSmall performance improvement in sqltie3WalFindFrame().
drh [Wed, 21 Feb 2018 01:05:37 +0000 (01:05 +0000)] 
Small performance improvement in sqltie3WalFindFrame().

FossilOrigin-Name: 52013cad0e6ce2d694f25e2984a76d438cef724f0e07c8bb9d3dce8a3caf4350

7 years agoRemove an unnecessary memset().
drh [Wed, 21 Feb 2018 00:48:02 +0000 (00:48 +0000)] 
Remove an unnecessary memset().

FossilOrigin-Name: e7b7f5884a78630c6ba6a217c36247397e62f1928d4b480df929efcfc4a01893

7 years agoMake the walIndexPage() routine about 3x faster by factoring out the seldom
drh [Tue, 20 Feb 2018 22:20:57 +0000 (22:20 +0000)] 
Make the walIndexPage() routine about 3x faster by factoring out the seldom
used reallocation logic into a separate subroutine.

FossilOrigin-Name: e2b107141cd97bd4ab240748a9ce43fc2ec950ea74610697a4a7a3d7a6441e6b

7 years agoUpdate README.md in ext/zonefile.
dan [Tue, 20 Feb 2018 20:57:20 +0000 (20:57 +0000)] 
Update README.md in ext/zonefile.

FossilOrigin-Name: a13b2b38137025d04bbfc1b12f0d0563dcf7e0ab1d4b06ffc7cacf994f00e188

7 years agoFix a problem with reading the "file" column of a zonefile virtual table.
dan [Tue, 20 Feb 2018 19:25:49 +0000 (19:25 +0000)] 
Fix a problem with reading the "file" column of a zonefile virtual table.

FossilOrigin-Name: d8d0bdcb405610978393bb8f3ef30ee868fddda0d129036f8d0102012fe0d5d4

7 years agoInstead of just the frame number, store frame sizes and offsets in zonefile
dan [Tue, 20 Feb 2018 18:47:24 +0000 (18:47 +0000)] 
Instead of just the frame number, store frame sizes and offsets in zonefile
shadow table %_shadow_idx.

FossilOrigin-Name: 56801c461c5d19cf96146fe0fa7f725c81da5cd7495c9608cd044125d00fecfe

7 years agoIn the speed-check.sh script, make WAL mode the default. Add the --legacy
drh [Tue, 20 Feb 2018 17:02:31 +0000 (17:02 +0000)] 
In the speed-check.sh script, make WAL mode the default.  Add the --legacy
option to do DELETE mode.  Continue to use DELETE mode for long-term performance
graphs since WAL mode was not always available, but use WAL mode for
day-to-day performance measurements.

FossilOrigin-Name: cd81613850c0458b4b5b2460b9b38ce7ff6e557f7add9615058bb96f5a344ccd

7 years agoRemove a superfluous "#if 1". No logic changes.
drh [Tue, 20 Feb 2018 16:39:11 +0000 (16:39 +0000)] 
Remove a superfluous "#if 1".  No logic changes.

FossilOrigin-Name: caaffd32001ff44c31f2d6dbe921f9d294f869c2c4a81e943fdf3f43f8d9313c

7 years agoOptimize calls to sqlite3_mprintf("%z...") so that they attempt to append
drh [Tue, 20 Feb 2018 15:23:37 +0000 (15:23 +0000)] 
Optimize calls to sqlite3_mprintf("%z...") so that they attempt to append
text onto the end of the existing memory allocation rather than reallocating
and copying.

FossilOrigin-Name: 4bc8a48e644562f6e6192f4c6fc4a70f6bb59f8126ed6c6dc876bedf65d74cda

7 years agoRemove a lot of the text describing extended format options from the
drh [Tue, 20 Feb 2018 13:46:20 +0000 (13:46 +0000)] 
Remove a lot of the text describing extended format options from the
documentation on sqlite3_mprintf() and friends, since that information is
now covered by the separate printf.html document.  Provide links to that
other document.  No changes to code.

FossilOrigin-Name: 99eec556f065ad19548e48d1f4ae0a3767b4e82e1c83fa2365062e3c5e0071fb

7 years agoEnhance the string formatter (used by printf()) so that the width and
drh [Mon, 19 Feb 2018 22:46:19 +0000 (22:46 +0000)] 
Enhance the string formatter (used by printf()) so that the width and
precision of string substitution operators refer to characters instead of
bytes when the alternate-form-2 flag ("!") is used.  Also fix the %c
substition to always work within unicode, regardless of the
alternate-form-2 flag.

FossilOrigin-Name: c883c4d33f4cd722982aca17eeb355d19eeed793991d923b5494d173b1d0c73a

7 years agoPrinting a value of 0 using %c terminates the string. printf-enhancement
drh [Mon, 19 Feb 2018 21:58:16 +0000 (21:58 +0000)] 
Printing a value of 0 using %c terminates the string.

FossilOrigin-Name: 255612f0a131f2f522cbca3cc5a1edcf7e38938abca25ba421e7e38a422db9c9

7 years agoAdd support for invoking encryption hooks to zonefile. And mock encryption
dan [Mon, 19 Feb 2018 21:07:20 +0000 (21:07 +0000)] 
Add support for invoking encryption hooks to zonefile. And mock encryption
method "xor" for testing.

FossilOrigin-Name: 55cf920c5a13473d04f0cb885117c04b2bc054bfed6ee549be84cb9485c104d2

7 years agoMore test cases for unicode handling in printf.
drh [Mon, 19 Feb 2018 20:41:01 +0000 (20:41 +0000)] 
More test cases for unicode handling in printf.

FossilOrigin-Name: ac188211119bfd77f43e4aba8acab733a56aac90b4c8a11f7ef8e6388582438f

7 years agoTest cases and a bug fix on the new unicode handling in %c.
drh [Mon, 19 Feb 2018 20:23:20 +0000 (20:23 +0000)] 
Test cases and a bug fix on the new unicode handling in %c.

FossilOrigin-Name: e41d64e95b9b6fec5dc329553822925e7d648a41912b420cfa1ba198736e6bab

7 years agoFix the %c substitution in printf() so that it works with unicode characters.
drh [Mon, 19 Feb 2018 18:56:52 +0000 (18:56 +0000)] 
Fix the %c substitution in printf() so that it works with unicode characters.

FossilOrigin-Name: c35be1d9e9132fbadc74d207c1088e5a710a151c0835c38a63bf3c8e6fd711a0

7 years agoMake the alternate-form-2 flag ("!") change the meaning of width and precision
drh [Mon, 19 Feb 2018 18:03:10 +0000 (18:03 +0000)] 
Make the alternate-form-2 flag ("!") change the meaning of width and precision
from bytes to characters for the %q, %Q, and %w extensions of printf().

FossilOrigin-Name: 391540acbea34eb88c75b1152b458d8936b3fdfff47633b9ec897775b015ba4c

7 years agoIn the printf() library, measure width and precision in characters rather
drh [Mon, 19 Feb 2018 17:03:23 +0000 (17:03 +0000)] 
In the printf() library, measure width and precision in characters rather
than bytes if the "!" (alternate-form-2) flag is present on a %s or %z
substitution.

FossilOrigin-Name: ca31c6630422fca70e626dd38aae96296bd8535d491ca52391624a5e7e663636

7 years agoOnly try to use the geteuid() interface on unix if HAVE_FCHOWN is defined.
drh [Mon, 19 Feb 2018 16:34:31 +0000 (16:34 +0000)] 
Only try to use the geteuid() interface on unix if HAVE_FCHOWN is defined.
This fixes the build for vxWorks, we are told.

FossilOrigin-Name: 38f654dc117bb11d61407327884b5c913cfaf920547bebc4ce5a4cf983e5c20e

7 years agoAdd support for the ExtendedHeaderSize header field to zonefile.
dan [Mon, 19 Feb 2018 16:28:42 +0000 (16:28 +0000)] 
Add support for the ExtendedHeaderSize header field to zonefile.

FossilOrigin-Name: 78267a091307e2c29a4fb1606fa9c79939fe010b801749614f4c48dc8715810e

7 years agoModify the zonefile format in order to avoid depending on the filesize to
dan [Mon, 19 Feb 2018 14:27:24 +0000 (14:27 +0000)] 
Modify the zonefile format in order to avoid depending on the filesize to
determine the extent of the final frame. See README.md for details.

FossilOrigin-Name: 4dbe0cba3fad9a752834d795127cf35eed21fab63b18a48f75d5c1e96ca77447

7 years agoFix an assert so that it compares two CellInfo objects field by field
drh [Mon, 19 Feb 2018 13:53:56 +0000 (13:53 +0000)] 
Fix an assert so that it compares two CellInfo objects field by field
instead of using memcmp().  Memcmp() does not work on x86
because of uninitialized padding bytes.

FossilOrigin-Name: 88258770adead70fa101c74e266a37bb9aaffac0ba738a4b345617feb8c46477

7 years agoFix a memory leak in the processing of nested row values. This problem has
drh [Sun, 18 Feb 2018 17:50:03 +0000 (17:50 +0000)] 
Fix a memory leak in the processing of nested row values.  This problem has
existed every since row values support was added (version 3.15.0, 2016-10-14)
but was only just now detected by OSSFuzz.

FossilOrigin-Name: 2df6bbf1b8ca881c8a465d6624de66fde4c5975ccae6b2f2dda392b137f577de

7 years agoPort mutex enhancments from check-in [f53b8a573b] to the Win32 implementation.
mistachkin [Sun, 18 Feb 2018 00:54:06 +0000 (00:54 +0000)] 
Port mutex enhancments from check-in [f53b8a573b] to the Win32 implementation.

FossilOrigin-Name: 74bb7225d132c80fd5758bb8c120448e3b3e951d0ca2fa0c57cac0a9c6c27045

7 years agoAdd support for "brotli" compression to the zonefile module.
dan [Sat, 17 Feb 2018 20:22:23 +0000 (20:22 +0000)] 
Add support for "brotli" compression to the zonefile module.

FossilOrigin-Name: 3eb25b3fa5733b4418e7e2633be34b763e2c70342bb9c418a07c9f7d4b196fac

7 years agoAdd support for compression types "lz4" and "lz4hc" to the zonefile module.
dan [Sat, 17 Feb 2018 19:38:02 +0000 (19:38 +0000)] 
Add support for compression types "lz4" and "lz4hc" to the zonefile module.

FossilOrigin-Name: bbe5b21ffab3cd312680ca9f179c5847790c17fb91d4174985153c6c398d48e3

7 years agoAdd support for compression methods "zstd" and "zstd_global_dict".
dan [Sat, 17 Feb 2018 18:33:43 +0000 (18:33 +0000)] 
Add support for compression methods "zstd" and "zstd_global_dict".

FossilOrigin-Name: a993a50bb8d5a3bf7cf79e09204814e172ba0bf9b3949e81912ef83f0d4bb44e

7 years agoFix a data race causing a tsan complaint with SQLITE_ENABLE_API_ARMOR builds
dan [Sat, 17 Feb 2018 07:38:50 +0000 (07:38 +0000)] 
Fix a data race causing a tsan complaint with SQLITE_ENABLE_API_ARMOR builds
on unix. The race condition is not dangerous in practice, it just upsets tsan.

FossilOrigin-Name: f53b8a573bfbb48780243d56ca8372165adb1b979731c43d46cd1f8eb7e593f3

7 years agoDo not allow parameters or schema references inside of WITH clause of
drh [Thu, 15 Feb 2018 21:00:37 +0000 (21:00 +0000)] 
Do not allow parameters or schema references inside of WITH clause of
triggers and views.  This fixes a bug discovered by OSSFuzz and present
since common-table-expressions were first added in 2014-02-03.

FossilOrigin-Name: b918d4b4e546d3903ff20efc3c8ca26dd9761cc8ed9ef7d2799b66ff9ae1ae51

7 years agoAdd support for zlib compression to the zonefile module.
dan [Thu, 15 Feb 2018 20:37:58 +0000 (20:37 +0000)] 
Add support for zlib compression to the zonefile module.

FossilOrigin-Name: 72b8a7ef98d84460718378b9d17477599df39b4216015f8967674dd02b54b406

7 years agoFix another point in zonefile.c so that all files are opened in either "rb" or
dan [Thu, 15 Feb 2018 15:24:12 +0000 (15:24 +0000)] 
Fix another point in zonefile.c so that all files are opened in either "rb" or
"wb" mode.

FossilOrigin-Name: fb1c2277912c55cfae30c18b5434bc193748746395fa7df983cd8a29e5741ff9

7 years agoWhen calling fopen() in the zonefile extension, use modes "rb" and "wb"
dan [Thu, 15 Feb 2018 15:17:42 +0000 (15:17 +0000)] 
When calling fopen() in the zonefile extension, use modes "rb" and "wb"
instead of "r" and "w". This makes no difference on unix, but is required when
accessing binary files on other systems.

FossilOrigin-Name: 4bb854ddd9c1dc2972fd4f7c2c2b2d121caa662d5085694c2dbb35d331a61444

7 years agoImprove performance of editdist3() by keeping the costs in sorted order.
drh [Thu, 15 Feb 2018 03:56:33 +0000 (03:56 +0000)] 
Improve performance of editdist3() by keeping the costs in sorted order.
Also add a new regression test to editdist3().

FossilOrigin-Name: dc734c5b61464dfd6bfa7963f2ecce32e405a0c2ba1ef6f453ec9389da080256

7 years agoReduce the number of calls to strncmp() required to run editDist3Core().
drh [Thu, 15 Feb 2018 03:05:56 +0000 (03:05 +0000)] 
Reduce the number of calls to strncmp() required to run editDist3Core().

FossilOrigin-Name: afd6fbc01052ccfc9bd29fb8f934b291b8f56af44fcae870da7e1355fe95c29a

7 years agoFix the --heap, --pagecache, --lookaside and other options to the command-line
drh [Thu, 15 Feb 2018 01:03:37 +0000 (01:03 +0000)] 
Fix the --heap, --pagecache, --lookaside and other options to the command-line
shell that invoke sqlite3_config() so that they work again.

FossilOrigin-Name: 00707f2f2f746a6421f3e2de995e68cc8adba7225a04db6b28db52944e7e988e

7 years agoAdd the --readonly option to the ".open" command in the CLI.
drh [Wed, 14 Feb 2018 23:27:43 +0000 (23:27 +0000)] 
Add the --readonly option to the ".open" command in the CLI.

FossilOrigin-Name: 06870bb15656b50b0e14d4364bb21afac76500e313ecf67aaef3688d603fd076

7 years agoPerformance optimizations to the editdist3() function in the spellfix
drh [Wed, 14 Feb 2018 20:58:36 +0000 (20:58 +0000)] 
Performance optimizations to the editdist3() function in the spellfix
extension.

FossilOrigin-Name: 70d304dcbac4c3fd5e3b96108bffea2ce6c0db19c847397d5c5e268bb90a981d

7 years agoDisable assert() in the spellfix extension if not compiled with SQLITE_DEBUG.
drh [Wed, 14 Feb 2018 20:25:33 +0000 (20:25 +0000)] 
Disable assert() in the spellfix extension if not compiled with SQLITE_DEBUG.

FossilOrigin-Name: 3c53ee0fdea4cbf2590e2b289b021b0ef8b7ead2945db1bdfc767432d9447acb

7 years agoNew test cases for the editdist3() function in the spellfix extension.
drh [Wed, 14 Feb 2018 15:30:48 +0000 (15:30 +0000)] 
New test cases for the editdist3() function in the spellfix extension.

FossilOrigin-Name: 2d3f1f22d53034576a0ec8d9c360fb19efbb05b2e95ad1b09d120fb1b7da33fd

7 years agoTry to optimize spellfix1 by storing a NULL in the k1 column of %_vocab
drh [Wed, 14 Feb 2018 14:13:09 +0000 (14:13 +0000)] 
Try to optimize spellfix1 by storing a NULL in the k1 column of %_vocab
if it would otherwise have the same value as the word column.

FossilOrigin-Name: b76ec7cb5841f9ad02b342271e91c5f5a598006f69df7953a6213c706e01f7a2

7 years agoFix formatting errors in ext/zonefile/README.md.
dan [Tue, 13 Feb 2018 21:16:16 +0000 (21:16 +0000)] 
Fix formatting errors in ext/zonefile/README.md.

FossilOrigin-Name: a2221e35d6c34d0c07bee9329073ad12cad4ba88437dd40cea71ae3ffc77eeef

7 years agoNote the fact that zonefile depends on json1 in ext/zonefile/README.md.
dan [Tue, 13 Feb 2018 20:53:18 +0000 (20:53 +0000)] 
Note the fact that zonefile depends on json1 in ext/zonefile/README.md.

FossilOrigin-Name: fb27d8f6a87e0dc1253622839c2164a7eb09f21fc0a16817c2ba9264561b77c2

7 years agoFix handling of maxAutoFrameSize parameter.
dan [Tue, 13 Feb 2018 20:08:47 +0000 (20:08 +0000)] 
Fix handling of maxAutoFrameSize parameter.

FossilOrigin-Name: d65e5855743534cb8db0d77d107579eae6daafc25c2f6035efa12c3ff0abbe7a

7 years agoImproved test cases for the [f484b65f3d6230593c34f] bug.
drh [Tue, 13 Feb 2018 19:13:05 +0000 (19:13 +0000)] 
Improved test cases for the [f484b65f3d6230593c34f] bug.

FossilOrigin-Name: 1f300514e6cdd32c755dc1b05dfa125b10eda2eb55a1024b66f66dbf5cf96289

7 years agoEnhance ext/zonefile/README.md to describe the currently available
dan [Tue, 13 Feb 2018 19:01:08 +0000 (19:01 +0000)] 
Enhance ext/zonefile/README.md to describe the currently available
functionality.

FossilOrigin-Name: 100137c7f68b2d9a329d6d43e6c0a81b6ac843678b670ab6cce5f510bc58b7a8

7 years agoFix an incorrect table lookup used to find the appropriate search operator
drh [Tue, 13 Feb 2018 18:48:08 +0000 (18:48 +0000)] 
Fix an incorrect table lookup used to find the appropriate search operator
for a WHERE clause on a row-value inequality.  The incorrect table lookup
was causing an incorrect answer for the less-than operator.
Fix for ticket [f484b65f3d6230593c34f11]

FossilOrigin-Name: f3112e67cdb27c1aec8d2cee3cb91ade061d093e13505894698e26336898b336

7 years agoRemove, for now, the "priority" column from the zonefile_files virtual table.
dan [Tue, 13 Feb 2018 18:02:00 +0000 (18:02 +0000)] 
Remove, for now, the "priority" column from the zonefile_files virtual table.

FossilOrigin-Name: 8bf5154bc6e31e206931d97c743eadaba4ef938c11e006082d795439dadaeb8f

7 years agoPad the 26 byte Zonefile header to 32 bytes so that the ZonefileIndex object
dan [Tue, 13 Feb 2018 17:33:28 +0000 (17:33 +0000)] 
Pad the 26 byte Zonefile header to 32 bytes so that the ZonefileIndex object
is 8-byte aligned.

FossilOrigin-Name: fdb6c0c5dc5a67ca16dfafc6e677f73936f36e357a2ff288b4958ddee0544603

7 years agoRemove an unused variable from FTS4.
drh [Tue, 13 Feb 2018 16:30:19 +0000 (16:30 +0000)] 
Remove an unused variable from FTS4.

FossilOrigin-Name: 27ea783b281606196ad1e7e6e6dcbd80c75d4bafcf3e58756a71c213320e4db2

7 years agoEnsure that multiple updates of the same FTS4 row (i.e. the row with the same
dan [Tue, 13 Feb 2018 16:21:32 +0000 (16:21 +0000)] 
Ensure that multiple updates of the same FTS4 row (i.e. the row with the same
rowid) within a single transaction are written to separate segments. Fix for
[d6ec09ec].

FossilOrigin-Name: d2a81a3752a8298ee65fddcf32dee2147ba6467f770315a41966b3533977aa64

7 years agoUpdates to the speed-check.sh script for improvements to the --vdbeprofile
drh [Mon, 12 Feb 2018 20:50:28 +0000 (20:50 +0000)] 
Updates to the speed-check.sh script for improvements to the --vdbeprofile
option.

FossilOrigin-Name: f89c8f8ecd67f72ee730a2a334dff69b406a3dd00f50abbb54c4dc86cfab1bd1

7 years agoWhen compiling with VDBE_PROFILE, add the sqlite3NProfileCnt global variable
drh [Mon, 12 Feb 2018 20:27:34 +0000 (20:27 +0000)] 
When compiling with VDBE_PROFILE, add the sqlite3NProfileCnt global variable
which can be used to measure per-opcode values other than elapse time, if
non-zero.

FossilOrigin-Name: d44d5936428859b6d3e089d9835acb8ca1f3c0a85b59eeaa619170623e7dcc30

7 years agoAdd support for reading simple (no compression, no encryption) zonefile files.
dan [Mon, 12 Feb 2018 20:04:22 +0000 (20:04 +0000)] 
Add support for reading simple (no compression, no encryption) zonefile files.

FossilOrigin-Name: dba42f0e1efae7bad4579d23ad98e2c06e38053abe55f5cb277d7eecea42c56c

7 years agoUpdate test file func6.test so that it works with SQLITE_ENABLE_NULL_TRIM
dan [Mon, 12 Feb 2018 15:27:32 +0000 (15:27 +0000)] 
Update test file func6.test so that it works with SQLITE_ENABLE_NULL_TRIM
builds.

FossilOrigin-Name: e128d72f1a565551d3b6fdb3807fcb1c2a2bf355f0c09d04562b62f49d01fdbc

7 years agoFix a possible infinite loop in VACUUM that can come up when the schema
drh [Mon, 12 Feb 2018 13:30:34 +0000 (13:30 +0000)] 
Fix a possible infinite loop in VACUUM that can come up when the schema
has been carefully corrupted.  Problem discovered by OSSFuzz. Test cases
in TH3.

FossilOrigin-Name: 27754b74ddf6463c6f9c48ea0df3637945b5ea086b92a41ddeb55b9aaefea4c2

7 years agoAdd start of "zonefile" virtual table.
dan [Sat, 10 Feb 2018 21:04:12 +0000 (21:04 +0000)] 
Add start of "zonefile" virtual table.

FossilOrigin-Name: 0b7bd1694bf50a5afed22ed3026cefe53c5e7ec334167244e2caa9c56185ff43

7 years agoAdd the start of the "zonefile" extension.
dan [Sat, 10 Feb 2018 17:41:01 +0000 (17:41 +0000)] 
Add the start of the "zonefile" extension.

FossilOrigin-Name: c125b4c380d1a20c7d71b413e96183eca9987aed3d0ba28395aa79c7c31bb6fd

7 years agoFix misplaced testcase() macros from the previous check-in.
drh [Sat, 10 Feb 2018 02:31:30 +0000 (02:31 +0000)] 
Fix misplaced testcase() macros from the previous check-in.

FossilOrigin-Name: 3aed949a18a251c5795f21f0385c205a127502b7e9cf06bc7f4c763951cd7984

7 years agoImprove the performance of the built-in REPLACE() function in cases where
drh [Fri, 9 Feb 2018 23:25:14 +0000 (23:25 +0000)] 
Improve the performance of the built-in REPLACE() function in cases where
it does many substitutions that make the string larger.  OSSFuzz is reporting
intermittant timeouts when running a test where it does a REPLACE() on a
930KB random blob. Perhaps this enhancement will fix that.

FossilOrigin-Name: fab2c2b07b5d3cd851db3e6f5c8a44155e32b0df22905ea33412b153b825a928

7 years agoAdd the zorder.c extension implementing zorder() and unzorder() SQL functions.
drh [Fri, 9 Feb 2018 20:49:15 +0000 (20:49 +0000)] 
Add the zorder.c extension implementing zorder() and unzorder() SQL functions.

FossilOrigin-Name: a57a77dc0cc9fbaa9d5b134422f7a8cc8d4c2851ed3c2bdd449800c6a5d2aae0

7 years agoMake the tests in func6.test more robust against implementation changes.
dan [Fri, 9 Feb 2018 15:42:40 +0000 (15:42 +0000)] 
Make the tests in func6.test more robust against implementation changes.

FossilOrigin-Name: b685d3231097fb90e7d61d9ac01cc560e8bf2671d49390ae7af5bfdbd6d04f11

7 years agoFix a harmless compiler warning.
drh [Fri, 9 Feb 2018 15:04:51 +0000 (15:04 +0000)] 
Fix a harmless compiler warning.

FossilOrigin-Name: a6c3115483d597fc77ab19fdcfd1d3437cad7e467081ad8c5315fb98c115eed9

7 years agoEnhance sqlite3ErrStr() to include several more error codes.
mistachkin [Thu, 8 Feb 2018 01:00:11 +0000 (01:00 +0000)] 
Enhance sqlite3ErrStr() to include several more error codes.

FossilOrigin-Name: ad5d3bdc739a0997786f94fb5789b726b9f53ff883226093924338fe5000922b

7 years agoFix typo in comment. Skip tests added by check-in [4761db83b6] when running on Windows.
mistachkin [Wed, 7 Feb 2018 18:45:00 +0000 (18:45 +0000)] 
Fix typo in comment.  Skip tests added by check-in [4761db83b6] when running on Windows.

FossilOrigin-Name: 468a389cdc8b6f92c77b11f682e210ad8cce7e3dbc0df308a898f4115e85fce2

7 years agoIn extensions rtree, fts3 and fts5, ensure that when dynamic buffers are bound
dan [Wed, 7 Feb 2018 18:02:50 +0000 (18:02 +0000)] 
In extensions rtree, fts3 and fts5, ensure that when dynamic buffers are bound
to persistent SQL statements using SQLITE_STATIC, the binding is replaced with
an SQL NULL before the buffer is freed. Otherwise, a user may obtain a pointer
to the persistent statement using sqlite3_next_stmt() and attempt to access
the freed buffer using sqlite3_expanded_sql() or similar.

FossilOrigin-Name: 2a5f813bc61f9e780f2ccbda425611f65ad523b6d486a1e5e2b9d5e9f1d260a2

7 years agoWhen the final connection disconnects from a wal mode database, check that the
dan [Wed, 7 Feb 2018 16:14:41 +0000 (16:14 +0000)] 
When the final connection disconnects from a wal mode database, check that the
database file has not been moved or unlinked before deleting the wal and shm
files.

FossilOrigin-Name: 4761db83b6d3d57f281370899403c102e39ad0021d315dd6a6912d250436782a

7 years agoAdjust the previous check-in, which modified the Win32 VFS, so that it works with...
mistachkin [Mon, 5 Feb 2018 21:02:47 +0000 (21:02 +0000)] 
Adjust the previous check-in, which modified the Win32 VFS, so that it works with SQLITE_OMIT_WAL.

FossilOrigin-Name: 36c2e67e82626f8d0a187c6c286c133ed659889e3b577469261b9dcd3b3ab75b

7 years agoAllocation the mutex used by the Win32 VFS only once at initialization, instead of...
mistachkin [Mon, 5 Feb 2018 20:42:50 +0000 (20:42 +0000)] 
Allocation the mutex used by the Win32 VFS only once at initialization, instead of every time it is needed.

FossilOrigin-Name: 535ed0ac5e8728ec91fc0a4cb54b820923d161cfd4e0e6aed6df6cdae365bc7d

7 years agoAllocation the mutex used by the unix VFS only once at initialization, instead
drh [Mon, 5 Feb 2018 16:39:12 +0000 (16:39 +0000)] 
Allocation the mutex used by the unix VFS only once at initialization, instead
of every time it is needed.

FossilOrigin-Name: 5764dc160783f5c4017204b3e26a89d31240c868484ced8214c9ad872bd77bd4

7 years agoFix another minor problem in walro2.test.
dan [Mon, 5 Feb 2018 13:42:45 +0000 (13:42 +0000)] 
Fix another minor problem in walro2.test.

FossilOrigin-Name: ba0631de60ca38bf7efa6dbd86ec8774bf6f438c804155968e97f17eabe3b20a

7 years agoUpdate test file walro2.test to account for systems with a page-size
dan [Mon, 5 Feb 2018 13:28:51 +0000 (13:28 +0000)] 
Update test file walro2.test to account for systems with a page-size
(getpagesize()) larger than 32KB.

FossilOrigin-Name: d9e59cfb8476e1ec1ca458b8382172526c0557ab785f41e31971d03045c9344c

7 years agoIn the CLI,
drh [Sun, 4 Feb 2018 20:33:13 +0000 (20:33 +0000)] 
In the CLI,
make sure sqlite3_initialize() is called correctly even for non-UTF8 hosts.

FossilOrigin-Name: a3591fb54178b8f124207ff16e3ef9e58a62585feb3a56ced2b862222aea19d8

7 years agoFix harmless compiler warning seen with MSVC.
mistachkin [Sun, 4 Feb 2018 01:30:54 +0000 (01:30 +0000)] 
Fix harmless compiler warning seen with MSVC.

FossilOrigin-Name: 63a914410b5750bd08836864ae456ff09549487c5ce49706fedffa3d4f973059

7 years agoMove variable declaration in zipfile extension to fix MSVC compiler error.
mistachkin [Sun, 4 Feb 2018 01:29:01 +0000 (01:29 +0000)] 
Move variable declaration in zipfile extension to fix MSVC compiler error.

FossilOrigin-Name: ac6a32482e675871c3ce5ecc727e50e4bba649e80e3c55bf99025fed5667da94

7 years agoRemove the "include <io.h>" win32 dependency from the zipfile extension.
dan [Fri, 2 Feb 2018 16:28:19 +0000 (16:28 +0000)] 
Remove the "include <io.h>" win32 dependency from the zipfile extension.

FossilOrigin-Name: cb3feb3bc33718625159eddbf8ef608cd641af84e97d433d6b11ba6da94dad2e

7 years agoRemove the time() dependency from the zipfile extension. Use SQLite VFS
dan [Fri, 2 Feb 2018 16:20:41 +0000 (16:20 +0000)] 
Remove the time() dependency from the zipfile extension. Use SQLite VFS
methods instead.

FossilOrigin-Name: 0702fb5611c7cf0154c5490eeada66afc733731dff0fe030375bae6a72123a17