Commit Graph

14530 Commits

Author SHA1 Message Date
dan dbac3ece0f Return an error message (instead of segfaulting) if test function fts5_expr() is invoked with no arguments.
FossilOrigin-Name: 8e818b8985c0196cd9671a6491796faaeebeb16e
2015-07-30 11:26:10 +00:00
mistachkin e61d31fa00 Support building VSIX packages for UAP using Visual Studio 2015 and the Windows 10 SDK.
FossilOrigin-Name: 96559adbf18bbbf25ff4e1579ee3ff2afef4c4d7
2015-07-29 22:38:45 +00:00
mistachkin afb4004ccc Update Windows 10 SDK version for RTM.
FossilOrigin-Name: 80ab338cc6fe920ad7edbb86672ff3d704152f52
2015-07-29 22:37:06 +00:00
mistachkin 60e0807801 Add SQLITE_DISABLE_INTRINSIC define to disable use of intrinsic functions (e.g. for certain older compilers and/or platforms).
FossilOrigin-Name: f0075d735a76ce326619b6ba7f0d556e492f1c41
2015-07-29 21:47:39 +00:00
drh 36c25f7686 Fix the releasetest.tcl script so that it ignore cast overflow errors that
recent versions of clang generate but which are unavoidable given the test
input.

FossilOrigin-Name: a0020c57859fd452a2b5c943f9c5cf5ec6f997e3
2015-07-29 20:24:39 +00:00
drh 6a8d08bc55 Version 3.8.11.1
FossilOrigin-Name: cf538e2783e468bbc25e7cb2a9ee64d3e0e80b2f
2015-07-29 20:00:57 +00:00
drh 3bc3709e7b Restore an undocumented side-effect of PRAGMA cache_size: it forces the
database schema to be parsed.  Also increase the version number to 3.8.11.1.

FossilOrigin-Name: e4628de3ce2b556fb46f0eb6eaac4809d17738f0
2015-07-29 15:22:49 +00:00
dan 0f43df31b5 Update comments in fts5.h describing the xColumnCount() API function.
FossilOrigin-Name: a623eb55d1583bcfe360a8dabd29f2a583c61e64
2015-07-29 14:58:47 +00:00
drh cc3c382826 Increase the version number to 3.8.11.1
FossilOrigin-Name: 326d746dee3589a4e2ee06f3285285856e734b87
2015-07-29 14:46:46 +00:00
drh 8ea60e35c2 The "PRAGMA cache_size" reads the database schema, as it has down in all prior
versions of SQLite.  This side-effect of cache_size is undocumented, but 
apparently it does get used and its absence from 3.8.11 was causing problems.

FossilOrigin-Name: 4489722a6b560355ef13f091e5c9dcf0b00072f0
2015-07-29 14:10:43 +00:00
mistachkin 9b714140d1 Update batch build tool library paths for MSVC 2015.
FossilOrigin-Name: d431d4e11a6006473ac223e58806ac26050934d5
2015-07-28 19:35:26 +00:00
drh 41b9ca2519 Fix the xfer optimization for WITHOUT ROWID tables so that it correctly
updates the change count returned by sqlite3_changes().

FossilOrigin-Name: eff43715d1a3a9ce3fe5da194dbb76ec0c06e13c
2015-07-28 18:53:37 +00:00
drh 33a3c75999 Clarification to the documentation for sqlite3_result_zeroblob64(). No
changes to code.

FossilOrigin-Name: c98175e900cdda0c81fb559fed4cc5f27c34e368
2015-07-27 19:57:13 +00:00
drh 3b8d5ac7fe Version 3.8.11
FossilOrigin-Name: b8e92227a469de677a66da62e4361f099c0b79d0
2015-07-27 13:49:41 +00:00
dan 291d090947 Merge the fts5-btree-index branch with this one. FTS5 changes only.
FossilOrigin-Name: 9f1dcdc3e1644c21762dacf619fac70afe6318c5
2015-07-27 12:19:11 +00:00
dan c3b4132f53 Bump the "version" field in the fts5 config table.
FossilOrigin-Name: 92c9178933ef95e92c343c0a741a76bbdf071966
2015-07-27 11:49:01 +00:00
dan 8d90087146 Minor tweak to the SQL schema used by fts5.
FossilOrigin-Name: 427bf09ba41158041d774aac2b5ffbd062c6eabe
2015-07-27 11:43:36 +00:00
dan d0dc8cb5a3 Remove a potentially undefined behaviour involving signed integers and bitshift operations from fts5_hash.c.
FossilOrigin-Name: ad6286ab1f40e4716456a67b719f9cd733f988eb
2015-07-27 11:01:19 +00:00
dan 44198f30b5 Merge latest trunk changes with this branch.
FossilOrigin-Name: 5ec933c257884019484db7f533ce920012e47a1c
2015-07-27 10:46:48 +00:00
dan 5a51c272ea Remove a duplicated "if" condition from fts3.c.
FossilOrigin-Name: ee348b12754abda1fe13231c1868faca9d78481c
2015-07-25 19:26:52 +00:00
dan d1f9ffeb5f Fix the rowallock.test script so that it works with builds that do not support mmap mode.
FossilOrigin-Name: 7efed5786bb6a7a452f5aece9d6c6a09e6930939
2015-07-25 14:26:17 +00:00
drh 06b5a224c0 Fix the wal3.test module so that it works with the memsubsys1 permutation.
FossilOrigin-Name: af85b01d93d3043f2e1a38d289ca00a5ef24520c
2015-07-25 14:12:26 +00:00
dan 8adbb17cb5 Fix a test script problem in memsubsys2.test.
FossilOrigin-Name: 70885729b7488474e7294212f9b334382675b112
2015-07-25 12:03:57 +00:00
drh 7416f2edd9 Disable the page cache bulk allocation for the shrink.test and wal.test
modules.

FossilOrigin-Name: 3418f1f165a0746cdf130e6a19fa0e1eb56df1d4
2015-07-25 03:10:12 +00:00
drh c6edb3acf9 Fix the zeroblob.test script so that it works even on builds where the
SQLITE_MAX_LENGTH has been raised to 2147483645.

FossilOrigin-Name: db129149812cb4eadb4cd79ad293d14962d2638d
2015-07-24 23:28:05 +00:00
mistachkin 24fa5435ee Enable the RBU extension to compile cleanly on Windows using MSVC.
FossilOrigin-Name: cca79fdc3dff65907c2a59369057265b4512058f
2015-07-24 21:19:25 +00:00
mistachkin 9895f73526 For Windows CE, a different header is required for the byteswap intrinsics.
FossilOrigin-Name: 2d572b8cdc67679cc95e69677a87e7b4a82f6c2d
2015-07-24 20:43:18 +00:00
dan 08406bf064 Fix warnings in fts5 code.
FossilOrigin-Name: bd4f156d07d0db1f063d42891965920fc2229352
2015-07-24 20:34:40 +00:00
drh e045d483f8 Fix the pragma2.test module so that it works with
SQLITE_ENABLE_MEMORY_MANAGEMENT.

FossilOrigin-Name: de281a4fac0de3700e754c17976a8497587ca797
2015-07-24 19:56:44 +00:00
dan 5555741bdc Allow the RBU module to read data from appropriately named SQL views created within the RBU database.
FossilOrigin-Name: 45c6a760ca63d19a7ccc352c7e35d8391025b515
2015-07-24 18:58:59 +00:00
dan d716c39c76 Fix a test script bug introduced by [562687d9].
FossilOrigin-Name: a343745d99cf4bccb2f5582735cc2f88b03e847d
2015-07-24 18:22:29 +00:00
dan 80c0302228 Add the sqlite3_bind_zeroblob64() API.
FossilOrigin-Name: 1997ee548b2e569a39e73319b661c1a78dfe5dae
2015-07-24 17:36:34 +00:00
drh a523e31a87 New makefile target "fastfuzztest" runs the same tests as "fuzztest" but
with a 100M memory size limit.  This more than doubles the speed.  The
original unlimited "fuzztest" is still run on a "fulltest".

FossilOrigin-Name: cfeb1b1c294c58222549d06819e9df2e300388fd
2015-07-24 17:26:13 +00:00
drh 6bacdc21ae Fix compiler warnings. Get the new sqlite3_result_zeroblob64() working
on loadable extensions.

FossilOrigin-Name: f8991e6f726485301c80d2dbb05e7d5c0d283b5d
2015-07-24 17:14:03 +00:00
dan a4d5ae8fa2 Add the sqlite3_result_zeroblob64() API. Use it in the SQL zeroblob() function.
FossilOrigin-Name: c6445b9fb4d7d1a8479436d7d183bad754a01615
2015-07-24 16:24:37 +00:00
drh 53e66c3cda More robust handling of zeroblob() with oversized arguments. Fix fuzzcheck
so that it can be run with limited heap memory.

FossilOrigin-Name: 4e3e516a42059c97f42a7eb59bdf5cded0ff843a
2015-07-24 15:49:23 +00:00
dan 03bc525a51 Modify a few test scripts to avoid leaving the sqlite3Config structure in a non-default state.
FossilOrigin-Name: 562687d9f56bf4bb0f5f07f97cbbb7649c81faf8
2015-07-24 14:17:17 +00:00
mistachkin f6972c3764 Update RBU description comment in the header file. No changes to code.
FossilOrigin-Name: 119883a21bdcab66c15d1e80f3da20addda328ad
2015-07-24 00:02:15 +00:00
drh cfb8f8d6a9 Change the name of the OTA extension to RBU: Resumable Bulk Update.
FossilOrigin-Name: 017c5019e1ce042025d4f327e50ec50af49f9fa4
2015-07-23 20:44:49 +00:00
drh 7877d9afca When SQLITE_OMIT_LOOKASIDE is set, do not allocate any lookaside memory since
it will never be used.

FossilOrigin-Name: 0ffd499f2374f2b191080b9952acfed56daf3335
2015-07-23 17:16:27 +00:00
drh d3e3f0b46e The sqlite3ExprCodeGetColumn() is not guaranteed to put the result in the
register requested.   Fix the skip-scan code generator for WITHOUT ROWID
tables so that it always checks the register and copies the result if it
lands in the wrong register.  Fix for ticket [8fd39115d8f46ece70e7d4b3].

FossilOrigin-Name: 793e206f9032d9205bdb3f447b136bed9a25fa22
2015-07-23 16:39:33 +00:00
mistachkin 6b67a8ae03 Fix harmless compiler warning in MSVC 2015.
FossilOrigin-Name: 01c8b9ccfa0f336dfead7c004de3de571753f707
2015-07-21 19:22:35 +00:00
mistachkin 9edb5ceb1f Cleanup the 'config.h' file in the appropriate distclean targets.
FossilOrigin-Name: e0a9978077a1b4e5988681438e4efff93920e574
2015-07-19 19:53:23 +00:00
drh 63abdc59dd More adjustments to the malloc5.test module so that it works correctly with
the new pcache1 bulk allocation.

FossilOrigin-Name: 2a7b3a440f74019f154496b2f95aa852a46e04fc
2015-07-17 12:42:53 +00:00
drh f6bff3f5d6 Avoid a harmless compiler warning.
FossilOrigin-Name: 2288842b8f191ff05a157db7f77af867bfa83c4f
2015-07-17 01:16:10 +00:00
dan 3baaacae03 Merge trunk changes, including fixes for compiler warnings in fts5 code, with this branch.
FossilOrigin-Name: 7190d79ba452ceb1af77ce1375278b097816a8be
2015-07-16 20:24:42 +00:00
dan 8694d6049f Fix compiler warnings in fts5 code.
FossilOrigin-Name: e9bf275cd969eca6fb41384d3637528d6a19f819
2015-07-16 20:17:57 +00:00
drh 939d4bcd77 Fix harmless compiler warnings.
FossilOrigin-Name: 9a592cf91c74b369bacf6a0e69d45f3e73dfdbce
2015-07-16 18:37:53 +00:00
drh 957026ac78 Defer the bulk pcache1 memory allocation until the first page allocation
request.  Limit the size of the pcache1 bulk allocation to the cache_size
setting.  Deallocate the bulk allocation on a sqlite3_db_release_memory()
request, if the bulk allocation is completely unused.

FossilOrigin-Name: b79a4affe44bd0c8e155cae19f3f62c715684cd6
2015-07-16 18:18:19 +00:00
mistachkin 89b31d73a6 Fix compilation issues with SQLITE_OMIT_COMPOUND_SELECT defined.
FossilOrigin-Name: 9c39d4644530ccc532f4ff26464106c6da43269a
2015-07-16 17:29:27 +00:00
drh 3e9dd938dd Enable memory-mapped I/O on FreeBSD and DragonFly.
FossilOrigin-Name: 2cdd647951ff5dca53576bb8be6dd6310a557571
2015-07-15 23:15:59 +00:00
mistachkin 3a2a686409 Make the debugging line numbers in the amalgamation more accurate.
FossilOrigin-Name: 3b34e95ca85a6dd7d0766e43035a6cec4bc724a1
2015-07-15 21:00:33 +00:00
dan e3229c19cb Use a WITHOUT ROWID table to index fts5 btree leaves. This is faster to query and only slightly larger than storing btree nodes within an intkey table.
FossilOrigin-Name: 862418e3506d4b7cca9c44d58c2eb9dc915d75c9
2015-07-15 19:46:02 +00:00
drh f4fa0b8073 Fix some harmless compiler warnings.
FossilOrigin-Name: 110cd84f5e842c4dcd9b9398cea211e25f36b3aa
2015-07-15 18:35:54 +00:00
drh 618ee61e04 Attempt to fix harmless warnings generated by GCC and Clang runtime analyzers.
FossilOrigin-Name: b522c95ddcd7046dca756f4d1a1e90c34dbcab64
2015-07-15 18:04:48 +00:00
drh 3cf9c12008 Fix the fuzz3.test script so that it works with the new bulk pagecache
allocation feature.

FossilOrigin-Name: 829a2dbaf17413743b58ce0533d556031a14195a
2015-07-15 13:56:34 +00:00
drh a8dbd52abb Amplify the comment on renderLogMsg() that explains the problems associated
with calling sqlite3_log() from deep within the memory allocator.

FossilOrigin-Name: a73d7128fbca8dde5e90bd46ee915e39ae07dd1f
2015-07-14 22:43:37 +00:00
mistachkin bc50bb7f53 Further refine FTS5 cleanup in Makefiles.
FossilOrigin-Name: b53a95063cf6b8ee8cad77e9fff4c50a356c43bb
2015-07-14 21:56:53 +00:00
mistachkin 65a88fcb42 Skip trying to include 'intrin.h' when compiling for WinCE with MSVC.
FossilOrigin-Name: 6db90ca2b4ac806b42532072ebe6b2a4a7b9713d
2015-07-14 21:56:17 +00:00
mistachkin 532f179cab Fix some harmless compiler warnings.
FossilOrigin-Name: 3de030c904d125ccf41fa1929646b8a002b5341b
2015-07-14 17:18:05 +00:00
drh 201e0c68f7 Always invoke the profile callback even if the statement does not run to
completion.

FossilOrigin-Name: 202479aa0a62067343e724487960b8a039e2e978
2015-07-14 14:48:50 +00:00
mistachkin ebad80e373 Refine cleaning of FTS5 files by Makefile targets.
FossilOrigin-Name: e548d77b3c91cdf11c78d1a688fd768e209bdbf5
2015-07-14 00:36:34 +00:00
drh fcd4325398 Fix the origination date on the loadfts.c utility program.
FossilOrigin-Name: 5c76c062c0cbf7c95897c5de4868172292023303
2015-07-13 23:55:08 +00:00
drh 3547c5184c Fix the header comment on the loadfts.c utility program.
FossilOrigin-Name: 955ad4ae1978eeee1be9014fe2760c8519ad6206
2015-07-13 18:01:14 +00:00
dan 3eb9024d68 Fix inconsistencies in formatting of fts5 docs.
FossilOrigin-Name: 5fb4c77163be8d5ff1e2934dda3cc2ad0a6267e8
2015-07-10 17:55:42 +00:00
dan d2454f47e7 Improve the performance of docid merges in fts5.
FossilOrigin-Name: b2de77a01cc5edcea2f98f7916e64cb33e6bd414
2015-07-09 20:46:35 +00:00
dan 3dbd2397f4 Reduce the number of calls to malloc() made by fts5.
FossilOrigin-Name: 898618ccf61d3ad166d9fc742e132d518338b5c3
2015-07-09 19:02:19 +00:00
dan a90579db99 Fix two problems that could cause fts3 auxiliary functions to occasionally misbehave if used with match expressions that contain both OR and NEAR.
FossilOrigin-Name: 372c1db2475f367d54270d5801aff0503745bff4
2015-07-08 17:59:08 +00:00
drh 104a25a034 Enhance the pcache1 page cache so that it tries to allocate a block of
SQLITE_DEFAULT_PCACHE_INITSZ pages from malloc() on startup, and uses those
preallocated pages when possible rather than going to malloc() for each
individual page.  About a 5% performance increase for some workloads.

FossilOrigin-Name: 5348ffc3fda5168c1e9e14aa88b0c6aedbda7c94
2015-07-08 16:22:42 +00:00
drh 7b341e6f99 Comment fix. No changes to code.
FossilOrigin-Name: c1e2ed0ef4d3436d19d3203c5fb553caac53659e
2015-07-08 14:13:44 +00:00
drh 52d9f40b7d Do not do the bulk pcache1 allocations if SQLITE_CONFIG_PAGECACHE specifies
a global page cache buffer.

FossilOrigin-Name: 75d98dae676996a05e97b09b19e34463e8f30d51
2015-07-08 13:40:50 +00:00
drh 4698136594 Early detection of file corruption in a debugging routine, before the invalid
data can cause problems.

FossilOrigin-Name: b27a47fef995f0ab2516e6ca779711cab1f50fb9
2015-07-08 12:25:38 +00:00
drh e56d43010d Avoid left-shifting bits into the sign of a signed integer, as such behavior
is technically undefined.

FossilOrigin-Name: 9417b4021b779876dcb3b9be636f01f4055eb54e
2015-07-08 01:22:52 +00:00
drh 4297c7c4be Add a compile-time constant for configuring the default pagecache setup.
FossilOrigin-Name: ad5fdfbac85682f0f0dee62e1086f40026a58be2
2015-07-07 21:14:42 +00:00
dan bcf2163771 Merge the Fts5MultiSegIter and Fts5IndexIter objects.
FossilOrigin-Name: 6ace73541ae48aeb19e0c2d9f6772d032d0a7eae
2015-07-07 19:35:11 +00:00
dan 01233d3e54 Add a test case to verify that "PRAGMA data_version" works as expected when an OTA client writes to the database.
FossilOrigin-Name: 6441f2dc9e7f53de64bc15b1d766c885b2635112
2015-07-07 19:07:30 +00:00
drh fd5ae9649c No need to test sqlite3GlobalConfig.bCoreMutex when SQLITE_THREADSAFE==0.
FossilOrigin-Name: 26db0fee06947d75621237a641b9652b312b3b37
2015-07-07 15:14:16 +00:00
drh c54357cc2a Simplify the page recycling condition in pcache1. Fix test cases to work
with the latest changes.

FossilOrigin-Name: 5b60df5503f61922326b3e10e94aa197b17afe4b
2015-07-07 14:06:18 +00:00
dan b2fe306a2e Further optimizations for fts5 b-tree seeks.
FossilOrigin-Name: f37899686c032145f431f81c1072738536c61c7e
2015-07-07 08:29:32 +00:00
drh db7ae89d5b A unified cache is now only used for SQLITE_ENABLE_MEMORY_MANAGEMENT, or if
SQLITE_CONFIG_PAGECACHE defines a shared start-time page cache buffer and the
application is single-threaded.

FossilOrigin-Name: d5ff1d69054d51a55eff6e1979971822db7f8f30
2015-07-06 20:57:22 +00:00
dan 656773b675 Speed up seek operations on fts5 b-tree structures.
FossilOrigin-Name: 7b7da1eb435d321fc4283f6aa2161fa1e16f2cf3
2015-07-06 20:27:19 +00:00
drh ee70a84ea7 Enhance separate pcache1 to allocate a block of pages from heap on startup,
if possible, for a 5.2% performance improvement.

FossilOrigin-Name: aa7341c8736732a0a59f6688cc34e78be02a7bfc
2015-07-06 18:54:52 +00:00
drh b63ce02f57 Do not allow recursive CTEs that use aggregate queries in the recursive part.
FossilOrigin-Name: 6d2999afbc25b9c238e4028f637c10eaaf0ec75e
2015-07-05 22:15:10 +00:00
dan 30ae503167 Optimize seek operations on fts5 b-trees.
FossilOrigin-Name: 8cf02090ce53ec150492d77d9e5e5f27665bd34f
2015-07-04 18:44:07 +00:00
drh 01c5c00c12 Preserve the number of requested PAGECACHE pages even if the memory pointer
or size is zero.  Enhance the pcache1.c header comment to explain the memory
layout of a page cache line.

FossilOrigin-Name: dacb2a615ce1c0573baf4518000454038745cf2a
2015-07-04 18:15:04 +00:00
dan 70c8885417 Fix a problem in the fts5 integrity-check.
FossilOrigin-Name: 4e473559c9bdcf4d0b823e995a3642cd50ebd337
2015-07-04 15:35:02 +00:00
drh 72e191ed71 Do not preserve the btreeInitPage() results in PRAGMA integrity_check if
there were cell sizing errors because PRAGMA cell_size_check was turned off
during the btreeInitPage() call.

FossilOrigin-Name: 743bf1f184be316971f2e9c651bcf573bde8654a
2015-07-04 11:14:20 +00:00
mistachkin 68b134c73a Sync up Makefile clean targets for FTS5.
FossilOrigin-Name: 43ead44ef6416d69602e123c3be7a258772837f1
2015-07-04 00:04:37 +00:00
mistachkin 74db356726 Correction to check-in [1025873fdf], tighten up the number of static test mutexes.
FossilOrigin-Name: 4e515897af97cb3a4158bcc34318992e8dcee77a
2015-07-03 23:29:55 +00:00
mistachkin 82194aa6e2 Update clean target in MSVC makefile.
FossilOrigin-Name: e6c03e72010e919dbac2055b6c3f3b13b1663b15
2015-07-03 23:12:33 +00:00
mistachkin 28ae577a3d Enhance mutex testing to include APP and VFS static mutexes.
FossilOrigin-Name: 1025873fdfd9e7e53094c48af1a79c60ae50ae97
2015-07-03 23:11:36 +00:00
mistachkin 93de653844 Add static mutexes for use by the built-in / third-party VFSs and use the built-in VFS mutex where appropriate.
FossilOrigin-Name: b202e2a1d73d104d795d2252b1c6f61d65bfb295
2015-07-03 21:38:09 +00:00
dan 28a10c3c1f Rework the Fts5MultiSegIter structure a bit to make it more efficient.
FossilOrigin-Name: 0778825d0ec9315c70659fae8d0640b209049dd8
2015-07-03 20:47:18 +00:00
dan 00a1351e55 Speed up eof checks on fts5 cursors.
FossilOrigin-Name: 3df4af5d8c28863783b0bc867abfbe31cc96f1b9
2015-07-03 19:13:56 +00:00
mistachkin f156c9b684 Enable use of the __builtin_bswap32() only with GCC 4.3 and higher.
FossilOrigin-Name: 030f60a7ba171650ce8c0ac32dc166eab80aca32
2015-07-03 17:54:49 +00:00
dan ec7c1de354 Avoid freeing the array of instance matches each time the fts5 xNext() method is called.
FossilOrigin-Name: b9b0c1e50d77f5d6e02f43fbb100c722cb692cc5
2015-07-03 17:14:18 +00:00
drh 2e43e96107 New command-line options for speedtest1: --multithread, --nomemstat,
--serialized, and --singlethread

FossilOrigin-Name: 2b7567229e3ba7e22271bb909ba977b3de19cca5
2015-07-03 14:34:25 +00:00
dan a153bbc4c2 Copy fts5.h into the build directory as part of building fts5.c. Also remove code to edit fts5parse.c from various Makefiles and add it to mkfts5c.tcl.
FossilOrigin-Name: 4d8f03dc7b6529cf8d46fc0fcc82112c0394dc13
2015-07-02 20:12:34 +00:00
drh d2dc87f6d5 When doing coverage analysis of a btree page for pragma integrity_check,
make the first entry (that covers the header, cell index, and gap) implied,
for a performance boost and size reduction.

FossilOrigin-Name: e53d497c2d2fbc5014b39f5624b52ce207800698
2015-07-02 19:47:08 +00:00
dan 6544b8643f Minor change to mkfts5c.tcl so that fts5.c can be used according to the instructions in loadext.html.
FossilOrigin-Name: edbcccd349090efff3f975e27451608136a429fc
2015-07-02 18:52:16 +00:00
dan 3abdc44e7b Add fts5_source_id() SQL function, similar to sqlite_source_id().
FossilOrigin-Name: ec2573487cb86664f7f056168a764c28ca8236fc
2015-07-02 18:16:02 +00:00
mistachkin c29cbb0bec Fix harmless compiler warnings and one macro VVA_ONLY macro usage issue.
FossilOrigin-Name: bcc8a75509aafda61feb6dcc074668c79611a662
2015-07-02 16:52:01 +00:00
mistachkin ae6ca8e0ed Simplify FTS5 handling in the MSVC makefile.
FossilOrigin-Name: f022e04343fc166a71b315d5aabbc5cc075a4767
2015-07-02 16:50:43 +00:00
drh 1910def351 Fix a (harmless) shadowed local variable definition in the integrity_check
logic.

FossilOrigin-Name: 3a26a919fd5550e5a0053a48cb93a27bb95cc916
2015-07-02 16:29:56 +00:00
drh cbc6b71f39 Smaller and faster PRAGMA integrity_check that also does a better job of
detecting errors.  Some output text describing discovered file corruption
has changed for clarity.

FossilOrigin-Name: 251a7590ff4f65f59a1c871892533e4e2c544515
2015-07-02 16:17:30 +00:00
dan 3f09beda45 Remove "#ifdef SQLITE_ENABLE_FTS5" from individual fts5 source files. Add a single "#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS5)" to fts5.c.
FossilOrigin-Name: 7819002ed85497bbd0f9cf4d39df641573324436
2015-07-02 15:52:21 +00:00
drh 0d847186e9 Add the --shrink-memory option to the speedtest1 test program.
FossilOrigin-Name: c9ddbd88998d9523e72ad910ea67eb55024b3a88
2015-07-02 01:38:39 +00:00
drh 14681b739b Avoid create a stack from in sqlite3BackupUpdate() in the common case where
the first argument is NULL.

FossilOrigin-Name: 2a897b9e94acaf1fd91e9f8e94fa52e01694f011
2015-07-01 19:59:36 +00:00
drh e05b3f8f0b Simplification of PRAGMA integrity_check logic. Make sure that the depth
of the right-most subtree is correct.  Size reduction and performance increase,
with no change in output.

FossilOrigin-Name: 550705fcb64e7ad637686e47cabe2621d65851bf
2015-07-01 17:53:49 +00:00
drh 94a3115daa Fix some harmless compiler warnings.
FossilOrigin-Name: 307195c8709d7fd2a642baa8011eb0c88cfdc0ac
2015-07-01 04:08:40 +00:00
drh 88266dc17a Change integrity_check to analyze the cells of a page in reverse order, as
this will tend to insert the cells into the analysis heap in increasing order
by address, which is the most efficient way to load a min-heap.

FossilOrigin-Name: 59ad912c4c1f858e04d27b1b8f25581a5f6e5daf
2015-07-01 01:31:14 +00:00
mistachkin 647ca46fc5 Make use of the _byteswap_ushort() and _byteswap_ulong() compiler intrinsics for MSVC, when available.
FossilOrigin-Name: fe144dd73f7097a17c24c7812c2a1cc40466e6da
2015-06-30 17:28:40 +00:00
drh da6d3e2117 Make use of built-in bswap32() and bswap16() functions in GCC/Clang for a
significant performance improvement there.

FossilOrigin-Name: 8bfcda3d10aec864d71d12a1248c37e4db6f8899
2015-06-30 15:10:29 +00:00
drh ad265296ff Only use <nowiki>__builtin_bswap16()</nowiki> with GCC 4.8 and later.
FossilOrigin-Name: ce8177e3e64d2ac4cd5d9e7757cdd5fcecd7d0ea
2015-06-30 14:01:20 +00:00
drh 329428e208 Remove the use of htonl() in the previous check-in due to linkage issues.
Add the get2byteAligned() macro and use it for access to the cell offsets
on btree pages for about a 1% performance gain.

FossilOrigin-Name: 79ff36b7170c9e7e7a9935c8b9d1665867771087
2015-06-30 13:28:18 +00:00
drh 5372e4d4f9 Make use of htonl() and <nowiki>__builtin_bswap32()</nowiki> for faster
implementations of sqlite3Get4byte() and sqlite3Put4byte().

FossilOrigin-Name: bc27ebd7f73e9fc8e00da6ec82632e439fcce812
2015-06-30 12:47:09 +00:00
drh 3169906d06 Change an unreachable branch into an assert() in sqlite3PagerAcquire()
and optimize sqlite3PcacheOpenSavepoint() by factoring out rarely used code
into a subroutine.

FossilOrigin-Name: b406b20ecdf0bff63c5c222fab11cb9acee86765
2015-06-30 11:07:32 +00:00
drh d8c0ba3b02 Optimization to the sqlite3PcacheFetch() logic.
FossilOrigin-Name: d9a0481ce0fd9824b1566f182d68ec46ef091b1b
2015-06-30 03:57:59 +00:00
drh 50642b1deb Put all variable declarations for sqlite3PagerWrite()
at the beginning of the block.  Syntax only - no logic changes.

FossilOrigin-Name: a0fa6b3ba59716e53b8c035b497602050ed0ccb8
2015-06-30 03:34:13 +00:00
drh 1116bf1359 Implement sqlite3Strlen30() using strlen() from the C library.
FossilOrigin-Name: 8001aa52bd12f900092387fe3571463e89efd977
2015-06-30 03:18:33 +00:00
drh 597d2b6412 Change sqlite3ApiExit() so that its first argument is never NULL.
FossilOrigin-Name: 791b706ec6c3e80885666e48e01524f0e9a7557e
2015-06-30 03:13:47 +00:00
drh 27fb746cde Put BtCursor objects on a singly-linked list instead of a doubly-linked list.
Add the BTCF_Multiple flag.  Only invoke saveAllCursors() when using a cursor
that has BTCF_Multiple set.

FossilOrigin-Name: 429ccef2b36fc46e92914eb54afd5f800b1a40ff
2015-06-30 02:47:36 +00:00
drh 98ef0f6c48 Convert several 5-year-old and older NEVER() macros into assert().
FossilOrigin-Name: ed54c14ea8a72d69d69e0c0d7f6936f54efc04c2
2015-06-30 01:25:52 +00:00
drh 207c817365 From sqlite3BtreeInsert(), bypass the btreeMoveto() routine for table inserts
and go directly to sqlite3BtreeMovetoUnpacked().

FossilOrigin-Name: 53fe685d56368af78238c8981cc41704929f7660
2015-06-29 23:01:32 +00:00
drh b34755308c Add a bypass path in sqlite3PagerWrite() for pages with the PGHDR_WRITEABLE
bit set, for about a 1% performance increase.

FossilOrigin-Name: ba425a6abb9886e6af87b5f6205202db450beba8
2015-06-29 20:53:18 +00:00
drh 60e32edba5 Combine subjRequiresPage() and subjournalPage() into a single
subjournalPageIfRequired() routine.

FossilOrigin-Name: 3b65eb56c422855ca47f709247205f0c77d98a5c
2015-06-29 19:08:18 +00:00
drh 1aacbdb374 Add the PGHDR_WRITEABLE bit for PgHdr.flags which is used to
distinguish between pages that are on the dirty list and pages that are
safe to modify.

FossilOrigin-Name: 7c4ef7b7c8744af19075bb96d1e0b63e35978ed1
2015-06-29 18:29:10 +00:00
drh e399ac2e1e Fix over-length source code lines in pager.c.
FossilOrigin-Name: 14de3d39267a4005a0fa900bab4adc4c104e4084
2015-06-29 18:14:02 +00:00
dan ef648698c8 Fix minor problems in the ota demo application.
FossilOrigin-Name: 6aaaec6e63cdf713b0d67e24a892088ff251c82a
2015-06-29 15:41:50 +00:00
drh 82ef8775c7 Simplifications and performance improvement in pager_write().
FossilOrigin-Name: ab7aeeead395a05b91a921ef9ebe9252fffad667
2015-06-29 14:11:50 +00:00
drh c78ae916b9 Add the new PGHDR_CLEAN bit to PgHdr.flags in pcache.c. This bit is always
the opposite of PGHDR_DIRTY.  Use the extra bit to avoid a comparison
for a small performance boost.

FossilOrigin-Name: 8619fc346d9a5a66a3c4566b4cc032b6b6bf73fd
2015-06-29 04:21:15 +00:00
drh 234a93fc9c Very small size reduction and performance increase in sqlite3BitvecTest().
FossilOrigin-Name: 9b3a7281bd45994edf813a687e4b7a0761697929
2015-06-29 03:28:43 +00:00
drh 325d087aa7 Move an assert() and testcase() into their correct position within
getAndInitPage().

FossilOrigin-Name: 18115164e12509ec21f34598089a7f1310048819
2015-06-29 00:52:33 +00:00
drh 95c91e145a Use tail recursion in pcache1Unpin() to get a small size reduction and
speed improvement.

FossilOrigin-Name: fde70472aebc09b34a517131f676e6847d02b747
2015-06-29 00:21:00 +00:00
drh b84c14d07c Comment typo fix and minor cleanup in the pager. No logic changes.
FossilOrigin-Name: 94ef17012855b7be725594c34bcea75f34c40190
2015-06-28 17:33:11 +00:00
drh c5ef7151b0 Avoid unnecessary calls to sqlite3VdbeSerialTypeLen() for integer
serial types, for a small size reduction and a speed increase.

FossilOrigin-Name: 9cd30d33b1d02dc8c55c1d74bdbcefab63ebf2a7
2015-06-28 02:58:51 +00:00
drh c75d886b05 Make greater use of BtCursor.curIntKey.
FossilOrigin-Name: 63998471d023dd846d5583ac856e2acc47ad41ea
2015-06-27 23:55:20 +00:00
drh 408efc0664 Add the BtCursor.curIntKey field and use it for a small size reduction and
performance boost.

FossilOrigin-Name: 4a17df139ac41e29c9a2e58afbd1238a5e94bd36
2015-06-27 22:49:10 +00:00
drh 15a0021b3e Enhancements to the previous check-in to make it a little smaller and faster.
FossilOrigin-Name: 291d9e0c328a7bd0f255b0b7e819ca2c909701a3
2015-06-27 20:55:00 +00:00
drh 28f58dd60e Performance improvements in moveToChild() by shifting some work over
to getAndInitPage().  Net improvement is about 800K cycles at cost of 30 bytes.

FossilOrigin-Name: 1956a4ce8eca650d98a7f68fd2d82eb8a3d6069f
2015-06-27 19:45:03 +00:00
drh 375beb0ec0 Manually inline the call from getAndInitPage() to btreeGetPage() for a
savings of 2.5 million cycles at a cost of less than 100 bytes.

FossilOrigin-Name: 7f65b96b4017413bd19624570efe8fb2b0f7b991
2015-06-27 15:51:06 +00:00
drh bbf0f867d2 Add releasePageNotNull() as an alternative to releasePage() when the argument
is guaranteed to be non-NULL, and use it for a small performance gain.

FossilOrigin-Name: 9383a688701ac2c366a308efc287c9c0f8977d4e
2015-06-27 14:59:26 +00:00
drh f44890a7c4 Add the Mempage.aDataOfst field and use it in sqlite3BtreeMovetoUnpacked()
for about a 2 million cycle gain.

FossilOrigin-Name: bee94dc3510745ba2efa044e8f3299793cfc7e34
2015-06-27 03:58:15 +00:00
mistachkin 95ae9587f1 Treat compilation of FTS5 for the loadable extension specially with MSVC.
FossilOrigin-Name: 7c610276bb41dbc80fe169d35fe9a3a3f6525635
2015-06-26 20:45:43 +00:00
dan ef4f75637c Merge fts5 branch into trunk.
FossilOrigin-Name: d27d9965b5404cd32be1113215fd9feeb5b66acc
2015-06-26 20:25:59 +00:00
dan 55296c5470 Merge latest trunk with this branch.
FossilOrigin-Name: 8671b9e137275d247e67e3d7d5d9c4cb1f380ff7
2015-06-26 20:14:23 +00:00
dan 018a93d216 Remove unnecessary lines from fts3.h and main.mk.
FossilOrigin-Name: c1b268ced38259706674ed2fcbf842d3fbd9fb8c
2015-06-26 20:13:56 +00:00
dan 6394d99a0e Fix a segfault that could follow an OOM error in fts5.
FossilOrigin-Name: 713239b8cf2900e8f7d97646c7f350248b4e804f
2015-06-26 20:08:25 +00:00
drh abb78fbd88 Small size reduction and performance increase on the OP_IdxInsert opcode.
FossilOrigin-Name: b6bedc2e9c2f87709673799db9401b95fdb386b0
2015-06-26 19:43:55 +00:00
dan ca0a30cd05 Merge latest trunk changes with this branch.
FossilOrigin-Name: 2a1af0f29e4c387721ec1fb3a2b55e8605b8401d
2015-06-26 19:33:04 +00:00
dan 6fbeb22596 Fix some cases in the fts5 code where a corrupt database could cause a buffer overread.
FossilOrigin-Name: 360c57bbb8bad6cc84af140f61e0282fa06462b4
2015-06-26 18:50:29 +00:00
drh e2d9e7cfd0 Further optimization of SQL function dispatch. Improvements to opcode
documentation.

FossilOrigin-Name: eaddbf296aee98ffca82adade1b0d2fbefd09d7b
2015-06-26 18:47:53 +00:00
drh 9c7c913cd6 Cache the sqlite3_context structure in the P4 operand of VDBE programs
for faster SQL function dispatch.

FossilOrigin-Name: 2abc44eb3b9d489321baa50bc25e17dafbda3687
2015-06-26 18:16:52 +00:00
mistachkin ec6c0c6e6f Merge changes to get FTS5 working with MSVC.
FossilOrigin-Name: 954231d29d60460d423ecb132bbfb725b0ea375a
2015-06-26 17:10:12 +00:00
mistachkin a468027c8d Merge upstream changes. Get the test fixture working with FTS5. Fix compiler warnings.
FossilOrigin-Name: bfcd16089cf8c65130c011a9718bf7812685c841
2015-06-26 16:55:55 +00:00
dan eb37567fe2 Remove fts5 initialization code from core file main.c.
FossilOrigin-Name: c91a93b343b4d3b1a19afdb5d23d1c508f9779d2
2015-06-26 16:42:17 +00:00
mistachkin b39e8cf239 Add FTS5 DLL target for MSVC.
FossilOrigin-Name: be85b82499f63dce4378f29adf8366651e965325
2015-06-26 16:17:36 +00:00
mistachkin ed52f9ff48 Initial changes to get FTS5 working with MSVC.
FossilOrigin-Name: ef2052f81e33ca98e85a60f8a78cdd19a7c1c35c
2015-06-26 04:34:36 +00:00
mistachkin 68cdd0eda2 Fix harmless compiler warning in assert statement.
FossilOrigin-Name: 7097716caed9d4aef49c7e766e41ea74abf5967f
2015-06-26 03:12:27 +00:00
drh 39065c60b3 Simplify the pcache by not keeping continuous track of page 1 but instead
just loading page 1 on the rare occasions when it is actually needed.

FossilOrigin-Name: 015302f15e46a087ec92f3644c6741600dbf4306
2015-06-26 02:41:31 +00:00
drh 591909c344 Optimization to sqlite3_value_bytes() for the common case that does not
require a data transformation.

FossilOrigin-Name: 8d79f3a1443391bee204bb8c49240f44477168db
2015-06-25 23:52:48 +00:00
dan 3e65f89ef6 Fix Makefile.in to account for recent changes. Update fts5 test scripts so that they do not run if SQLITE_ENABLE_FTS5 is not defined.
FossilOrigin-Name: 3175220747f5d4dadd17e09fb1899dc782c90926
2015-06-25 20:36:36 +00:00
dan f32fa3116b Merge latest trunk changes into this branch.
FossilOrigin-Name: fcd8f7ce601729dc51d880d16b97040c1be16aa2
2015-06-25 20:16:23 +00:00
dan ed2589f555 Add a script to combine all fts5 code into a single file - fts5.c - that can be used to build an SQLite loadable extension.
FossilOrigin-Name: 46e86b0637248fb4d623c97778cc041eabe3636c
2015-06-25 20:10:24 +00:00
drh 2c8fb926da Simplifications and performance improvements in insertCell().
FossilOrigin-Name: 7d02e6c992ef92e1f77ebc13889e17c028454b06
2015-06-25 19:53:48 +00:00
drh b7580e84a8 More simplifications and performance improvements to cell allocation
logic associated with allocateSpace().

FossilOrigin-Name: 78da0f69cb3289e332018864004f319f2764a5c8
2015-06-25 18:36:13 +00:00
drh e674bf1648 Reorder the terms of a conditional for a small performance gain.
FossilOrigin-Name: d67b0ed1054cbb7ea2cdd74720d4d6e0227cec14
2015-06-25 16:01:44 +00:00
drh ae6cd72318 Remove a NEVER() that is in fact reachable.
FossilOrigin-Name: f824e66b0dc120bed227c7446e2663fcad7cc4f6
2015-06-25 15:21:52 +00:00
drh ded340e4fc Minor optimization to allocateSpace().
FossilOrigin-Name: d007bc339b9ea6d59a3dd2b0c5e77e9c801b16f6
2015-06-25 15:04:56 +00:00
drh 6918095d81 Enhance the Btree object to remember whether or not it is holding an
Incrblob cursor.  Use this knowledge to improve performance in the common
case where it does not.

FossilOrigin-Name: 476b11563c08c6d9c0abd69e4d865c4edcdd45f5
2015-06-25 13:03:10 +00:00
drh 526b17db13 Remove a line of code that doesn't do any useful work.
FossilOrigin-Name: 3ee888beb974e015bd11ae79381b208eaa310f6f
2015-06-25 02:26:45 +00:00
drh d4ddcbc121 Increase the default timeout on fuzzcheck to 120 seconds - sufficient for
running under valgrind on a slow workstation.

FossilOrigin-Name: fad0eacc64b1810f60cab73bc88ba380f99e4b2d
2015-06-25 02:25:28 +00:00
drh 92298637ca Add the --timeout option to fuzzcheck.
FossilOrigin-Name: a8f4f7fa99e5e4131c1b59c0ac0597d62cedc0cd
2015-06-24 23:44:30 +00:00
drh 780573510b Fix fuzzcheck so that it works with SQLITE_OMIT_PROGRESS_CALLBACK.
FossilOrigin-Name: 7a9c4eb30e6a834da20931b535c2894837d7d5d7
2015-06-24 23:17:35 +00:00
drh 619a111e05 Add "ON CONFLICT" handling to the spellfix module.
FossilOrigin-Name: 07937a81c6c90eb7491a843eb65183805f5b675e
2015-06-24 18:22:51 +00:00
dan 88d702e6bd Add "ON CONFLICT" handling to the spellfix module.
FossilOrigin-Name: 1d04def785b6031de68b7f199d400cbb5c76caea
2015-06-24 17:21:52 +00:00
drh d83e2831b7 In the fuzzcheck test program, use the progress handler to limit the number
of VDBE cycles to avoid getting stuck if the SQL under test contains an
infinite CTE loop.  Add the --limit-vdbe command-line option.

FossilOrigin-Name: fbf9c4325e98120914bb03bdf351b57643f7a8c8
2015-06-24 14:45:44 +00:00
drh 6cbbdb08f8 Fix the progress handler so that it does not fire too soon during an
sqlite3_step() call other than the first.

FossilOrigin-Name: b41ef5d6db107cac2b1b46a955e63414434ee976
2015-06-24 14:36:27 +00:00
drh c6e956f038 Fix a harmless compiler warning.
FossilOrigin-Name: 3b6fa95eebfa01703d9ef4f530674d17e965c512
2015-06-24 13:32:10 +00:00
drh 94701b048a Rig the fuzzcheck test program so that it times out after 10 seconds in case
of an infinite loop in the test case.

FossilOrigin-Name: 659cfc9d1e9db83db171d621f248a7c2a5b183f6
2015-06-24 13:25:34 +00:00
drh 45143e9d31 Update the database fuzz test cases to cover all recent findings.
FossilOrigin-Name: 47ba7d96b1b91858ef1b592374839bc820719b95
2015-06-24 13:05:18 +00:00
drh 9a64586864 Add the --rebuild object to fuzzcheck.
FossilOrigin-Name: db87664a224f44e01b85570a3f3b6ec1c81d6e0a
2015-06-24 12:44:42 +00:00
drh 9e7804dfd4 Prevent an infinite loop while searching a corrupt freelist.
FossilOrigin-Name: 4e5424fe89eed346f6cf26a05c72694d1eb9f58f
2015-06-24 12:24:03 +00:00
drh 672073a41b Strengthen the new balance_nonroot() code against various corrupt database
problems.

FossilOrigin-Name: 5ba983432069714afebbb2f0ef22d41be52f7a4c
2015-06-24 12:07:40 +00:00
drh 40a3cabe68 Adjustment to a malloc test so that it accepts a narrow range of values to
account for variations in malloc subsystems.

FossilOrigin-Name: e0195070f84f418c46698627a2dcbfcfb94d999c
2015-06-24 10:46:25 +00:00
drh b468ce1256 Remove an invalid NEVER() and add a test case to cover it.
FossilOrigin-Name: 14b73d201509d3c04f760a08d21f3c499f2870a8
2015-06-24 01:07:30 +00:00
drh 9c739e26da Performance optimization on balance_nonroot() and related routines.
2.6% faster overall with a size increase of less than 750 bytes.

FossilOrigin-Name: 25131e7062125e91c2d60ed2cadf134dd7609124
2015-06-24 00:05:45 +00:00
drh 2ec18a3cce Mark some branches as unreachable after the recent change that recognizes
mismatch result set sizes on compound SELECT statements sooner.

FossilOrigin-Name: c8d1f305b6e9dfc36b8e3f4ab92de4457884d903
2015-06-23 23:31:52 +00:00
drh ea82b37302 Testability improvement.
FossilOrigin-Name: eed6a3314518cdab809264284d7680385f0d5d2a
2015-06-23 21:35:28 +00:00
dan 51ef0f57c7 Improve test coverage of fts5.
FossilOrigin-Name: df5ccea80e8f0da83af5e595b539687006085120
2015-06-23 18:47:55 +00:00
drh fe647dc9ee Multiple overflow cells are always adjacent and sequential. Exploit this
invariant for a small size reduction and performance increase and add
assert()s to prove the invariant.

FossilOrigin-Name: f77f2f48f48e374a72b6c054142f7a3ec0b1483c
2015-06-23 18:24:25 +00:00
drh 4f4bf7747a Faster loading of cell pointers into the b.apCell array in balance_nonroot.
FossilOrigin-Name: fda89b0512477f9da09fd0f4e548ed4b13efd49d
2015-06-23 17:09:53 +00:00
drh 008d64c23a Avoid unnecessary cachedCellSize() calls in the cell partition adjustment
phase of balance_nonroot().

FossilOrigin-Name: 6319ee1256b1f7c39dd39a536a39b77b3d10dcac
2015-06-23 16:00:24 +00:00
drh f783893b8d Change pageInsertArray() and pageFreeArray() so that they use the CellArray
object and compute cell sizes as needed, resulting in smaller and faster code.

FossilOrigin-Name: f7f41818119bb7bfbd1f1297d294b32f32769cd3
2015-06-23 15:36:34 +00:00
dan c94a08100b Merge latest trunk changes with this branch. Add tests for columnsize=0.
FossilOrigin-Name: ef44c71a22518727030dd90c0139af8973b05841
2015-06-23 15:06:13 +00:00
drh 4edfdd38fb Improvements to the way balance_nonroot() constructs the b.apCell array of
pointers to cells.

FossilOrigin-Name: ee44bb25b2a88e25ba2afe37cf03ba199692a3a0
2015-06-23 14:49:42 +00:00
drh a2306712f2 Merge the compound SELECT operator fix from trunk.
FossilOrigin-Name: a7be554f4b8534fc237fa4c6defc38fcd4049707
2015-06-23 13:02:10 +00:00
dan 923cadb1ae Test that the left and right sides of a compound SELECT operator have the same number of expressions in the expanded expression list before beginning to generate code.
FossilOrigin-Name: 4df852ce26c95d5d23c83dbe9c59d2c3435acddf
2015-06-23 12:19:55 +00:00
drh 1ffd247c0c Avoid computing cell sizes in balance_nonroot() until they are really needed.
This gives an overall 1.7% performance gain for about 1000 extra bytes of
code space.

FossilOrigin-Name: 43844537e8a372953386663f8177202901ba7566
2015-06-23 02:37:30 +00:00
drh 658873bdb3 Change the way that balance_nonroot() partitions cells between the sibling
pages such that a scan of the cell size array is not required.

FossilOrigin-Name: 168728715156d756ac8c0df45710d054eee027ec
2015-06-22 20:02:04 +00:00
drh 82c4f9b407 Update the fuzztest data using the latest test vectors discovered by AFL.
FossilOrigin-Name: b97f9cf73e503c7285ba3a801e1f932f222d96b2
2015-06-20 14:11:56 +00:00
drh 5f02ab0976 Make sure that the likelihood() function does not mess up generation of
result-set code when it is used (inappropropriately) in a result-set 
expression.

FossilOrigin-Name: 7cdbae625eb029538a693d2bebec465a6f65fb90
2015-06-20 13:18:34 +00:00
drh b11b0efde6 Performance improvements in btreeParseCell() by inlining the varint decoder.
FossilOrigin-Name: 172a864d14fd9f0e3e97d2a13b22222ae0fedd39
2015-06-19 20:31:02 +00:00
drh eeab2c63a9 Fix corner cases involving corrupt varint values in record headers.
FossilOrigin-Name: 3189116b42c5ecef5e30c8b317f4458bbf8b9086
2015-06-19 20:08:39 +00:00
drh 56cb04efc8 Performance improvements in btreeParseCell() by inlining the varint decoder.
FossilOrigin-Name: faab0ed928074f3ec7c25e1a2058414fbd9b013c
2015-06-19 18:24:37 +00:00
drh 5fa605142f Add the MemPage.xParseCell method and provide various implementations
(variations on the former btreeParseCellPtr()) depending on the page type.

FossilOrigin-Name: 41d03d883c4f7ca279eb9dd679f3ab81c8d957d9
2015-06-19 17:19:34 +00:00
drh 25ada07ab4 Make cellSizePtr() a method on the MemPage object, with alternative
implementations depending on the page type.  This results is a small performance
improvement and size reduction.

FossilOrigin-Name: 02f7e9d7d7b93d0b6bbd6cc0d0359b3b741b9931
2015-06-19 15:07:14 +00:00
drh 4307690b5c Further #ifdef changes in speedtest1.c in order to support SQLite back to
version 3.3.9 and perhaps even earlier.

FossilOrigin-Name: 9246eca54adaee571dab0c066afaa604fcf9c44f
2015-06-18 15:26:09 +00:00
drh 606f2344e9 Pervent the likelihood() function from moving ON clause terms of a LEFT JOIN
into the WHERE clause.
Fix for ticket [5f60b11fc8e23490e2]

FossilOrigin-Name: ed96e14adce4a4f94cc6838c46bc97937c4cb72a
2015-06-18 14:32:51 +00:00
drh b3d903ebe5 Show the values of Expr.flag in the AST of ".selecttrace"
FossilOrigin-Name: a84d1004cbee67f2b8ba1fd201e43af49ea67c1b
2015-06-18 14:09:13 +00:00
drh 5995e292e6 Add #ifdefs to some features speedtest1.c so that it compiles with
older versions of SQLite, going back to version 3.5.1.

FossilOrigin-Name: f50dd154d33c58d7a9aa1852fdc362c2e81feef2
2015-06-18 12:37:32 +00:00
drh 14e067455e Performance improvement in sqlite3VdbeMemShallowCopy() for the common
case where the receiver does not require prior resource deallocation.

FossilOrigin-Name: d718ea36dce8cf1684c8bcda457fee87f8f8c4e2
2015-06-17 23:28:03 +00:00
mistachkin 073664de88 Improve spacing and comment style for the shell. No changes to code.
FossilOrigin-Name: 5b547da00d131a494a6b348339af3d91dfa6e3b6
2015-06-17 18:57:37 +00:00
drh 00452196d8 Improved comments on the fuzzcheck.c test program. No changes to code.
FossilOrigin-Name: a7e27d19280048bcfff6d2e796eed72287b9dabe
2015-06-17 18:24:40 +00:00
drh bbe031f9f1 Fix a uninitialized variable use in the command-line shell when the
".open" command is invoked without any arguments.

FossilOrigin-Name: fc4f4d1eccec2e09b5d2e6c4da082204f4d5a016
2015-06-17 17:08:22 +00:00
drh b0870486aa Performance optimization and comment fixes for the LIKE and GLOB operators.
FossilOrigin-Name: c89d772628564a808173f6f73bc1798ec714276b
2015-06-17 13:20:54 +00:00
drh c5b41ac8ee Make getCellInfo() a real function instead of a macro, for a size reduction
and a 0.2% performance gain.

FossilOrigin-Name: 55c393ea14197ae5fa56ebca7a47e7d980511fa7
2015-06-17 02:11:46 +00:00
drh f1aabd6b78 Optimizations to two VDBE accessory routines for a 0.2% performance increase.
FossilOrigin-Name: 66d033b9c9a8c16b9a342be0b325bd85b8487c03
2015-06-17 01:31:28 +00:00
drh 0dd5cdaea5 Ensure that the CREATE TABLE AS statement correctly undoes partial changes
to the sqlite_master table if the SELECT on the right-hand side aborts with
an error.  Fix for ticket [873cae2b6e25b]

FossilOrigin-Name: 400e025e7c61efab71b891743c07a0862e5bb934
2015-06-16 16:39:01 +00:00
drh 07d694c750 Adjust ICU tests to account for recent changes in the official
Unicode definition of whitespace.

FossilOrigin-Name: 0816525386ac51454b7b09a507e45b6a2cb8bf6e
2015-06-15 16:40:38 +00:00
drh 3e24a34324 Fix a harmless comment typo. No code changes.
FossilOrigin-Name: ae6876521819e7a8ce473c8f96617cba35e2156d
2015-06-15 16:09:35 +00:00
drh f5ed7ad63e Fix harmless compiler warnings.
FossilOrigin-Name: b0badb99023e23bef0e2064cec58f2b279af0c0b
2015-06-15 14:43:25 +00:00
drh e4d38707ea Improved detection of database corruption in freeSpace().
FossilOrigin-Name: 29bcb56887f862a1f06677a7b4bfae6475d29732
2015-06-15 12:58:15 +00:00
drh c056e4b257 Comment typo fix. No code changes.
FossilOrigin-Name: 17f185adb960b1fa4faa13cdf685b92a20a52072
2015-06-15 10:49:01 +00:00
drh 74a043607e Omit mutex calls in pcache1 when the mutex is NULL, for a significant
performance improvement.

FossilOrigin-Name: caf8f574e5c64da461c6dfba8a06cf3fb18aaa42
2015-06-13 11:19:47 +00:00
drh 982215a2c5 Avoid unnecessary mutex usage in pcache1, for a significant speedup.
FossilOrigin-Name: dcf4fb8d764611de60afea27cda0a8548ba7ca82
2015-06-13 11:10:55 +00:00
drh 55a46c9b0e Add a fast-path implementation of pcache1Fetch() for the common case of
separate caches that do not use a mutex.

FossilOrigin-Name: 760700edb3ff1f5d6bf3058f874cc8e2808905c7
2015-06-12 13:49:26 +00:00
drh b230a52892 Minor performance optimization in pcache1.c.
FossilOrigin-Name: 2e8ad2ead9d146e312c693d9b967bbd5b92429d9
2015-06-12 13:04:51 +00:00
drh 36b80349b7 Add the OP_ColumnsUsed opcode (when compiled with
SQLITE_ENABLE_COLUMN_USED_MASK) as a hint to the b-tree layer as to which
columns of a btree cursor will be used.

FossilOrigin-Name: 711a176cbfad5dde6defa9648fba6d0d663af134
2015-06-12 12:54:15 +00:00
drh aca55cfec3 Remove stray outputs from the test suite.
FossilOrigin-Name: afc6db9b105f32110112b877f06091757888a5f2
2015-06-11 14:19:05 +00:00
drh 72bc8208f0 When generating code for partial indexes, be sure not to modify the
index condition expression in the schema.

FossilOrigin-Name: e63d01c69c3e50f49ee3022a519c4f3e91f00520
2015-06-11 13:58:35 +00:00
mistachkin eeb31ff59b More test output refinements.
FossilOrigin-Name: e64a5681793238fa04fe3636f48d34b2dd36cdfa
2015-06-10 23:02:38 +00:00
mistachkin 7b96f2fa7e Remove possibly stray output from various tests.
FossilOrigin-Name: f38e0be56fc086a3ce08134ade83ab61c9fca106
2015-06-10 22:51:02 +00:00
mistachkin 033eb6c8d3 Fix minor typo in the quicktest MSVC makefile target.
FossilOrigin-Name: 75b65f9d49daaf48e97042cb82ea554e2ec74eec
2015-06-10 22:03:40 +00:00
drh 905da63a82 "test" targets on all makefiles use --verbose=file --output=test-out.txt.
Add the new "quicktest" target to all makefiles - designed to run in under
three minutes.  The --quick option on releasetest.tcl now uses quicktest.

FossilOrigin-Name: 6ddef2ad35ceb5822fc14c65bc7c6a2662edb63c
2015-06-10 18:53:09 +00:00
dan 84dff7a20e Avoid passing constraints that are unusable due to LEFT or CROSS joins to virtual table xBestIndex() methods.
FossilOrigin-Name: 7b446771cadedafbe8924ad0658adc2597816dc7
2015-06-10 14:27:40 +00:00
dan 1153e60cf0 Fix the fts5 xRename() method.
FossilOrigin-Name: 0f7fd51325875fbf0f1eaca3bbbd170ef99c4208
2015-06-10 10:45:34 +00:00
dan bcc2f04c68 Add the "columnsize=" option to fts5, similar to fts4's "matchinfo=fts3".
FossilOrigin-Name: aa12f9d9b79c2f523fd6b00e47bcb66dba09ce0c
2015-06-09 20:58:39 +00:00
dan 17c0823bda Add the --output=$file and --verbose=(0|1|file) options to tester.tcl.
FossilOrigin-Name: f7b2c70362f10ee0347c1d2318918ffefa53243d
2015-06-09 15:58:28 +00:00
dan 4430b40934 Remove some repeated lines of source code. Probably introduced by careless cut'n'pasting.
FossilOrigin-Name: a34cd71c8aafaece04a2332a127e9b8e99c1403c
2015-06-09 10:58:51 +00:00
drh d1f2f9b90c Add the valgrindfuzz target to unix makefile.
FossilOrigin-Name: e62aed01f1a6dbc12d6e21386c1671eb640b8d49
2015-06-08 19:15:50 +00:00
dan 35175bf7ab If a query contains "FROM t1 LEFT JOIN t2, t3, t4", ensure that tables t3 and t4 are not scanned before t2. The trunk already does this.
FossilOrigin-Name: 0d9edfab9fb61322620f188b48ae2a1798a07581
2015-06-08 18:48:29 +00:00
dan 4f20cd402b Avoid passing constraints that are unusable due to LEFT or CROSS joins to virtual table xBestIndex() methods.
FossilOrigin-Name: 80ee56dda7db3860f8be5f6968c8745138f8453f
2015-06-08 18:05:54 +00:00
mistachkin f5b5f9b972 Fix typo in comment. No changes to code.
FossilOrigin-Name: e49c291735e613e384f6da044ef865dd274cabc8
2015-06-08 17:42:57 +00:00
drh 6dcb2dbaf6 Split out some source code into new files: wherecode.c, whereexpr.c, and
treeview.c.  Other minor refactoring changes.

FossilOrigin-Name: 50f336818c8509d8b8bde282e9399d2b2b5ea70a
2015-06-08 17:40:30 +00:00
drh 38b4149ca1 Factor out the TreeView parse tree printing module into a separate file.
FossilOrigin-Name: c32ce54ca46a4be4373983be6fd44b1f3a0250d1
2015-06-08 15:08:15 +00:00
drh 6c1f4ef217 Split more subfunctions of where.c out into a new whereexpr.c source file,
for improved maintainability.

FossilOrigin-Name: 46ef95c108ad8961f2bf3d2dc839d4fb1fddd770
2015-06-08 14:23:15 +00:00
drh 6f82e85a80 Split out the bulk of the actual VDBE code generation logic from where.c
into a new file, leaving behind the analysis logic.  This makes the original
where.c smaller and hopefully easier to edit.

FossilOrigin-Name: faa0e420e93a2bc1c84df9eb9fef4748d29ce339
2015-06-06 20:12:09 +00:00
dan 90502c3dc7 Fix a comment in fts5.h.
FossilOrigin-Name: e964b5877497b16cf985d3d847e82529bb3fa4a3
2015-06-06 19:23:32 +00:00
drh b121dd14ac Code simplifications in select.c and where.c.
FossilOrigin-Name: 4f20ac90bce8bd7ba43ef59af5cc4ef7aa282fe8
2015-06-06 18:30:17 +00:00