Commit Graph

18226 Commits

Author SHA1 Message Date
mistachkin b4bab90b31 Handle the Ctrl-C event for the shell on Win32.
FossilOrigin-Name: c8aaf37117ed4a23bbd15dc481788735efcb77bff98be423eca3521c0a9270de
2017-10-27 17:09:44 +00:00
drh 6e61c5f895 Additional test case demonstrating the ability to access structure elements
using quoted names in the JSON1 extension.

FossilOrigin-Name: 8d3cc928a8f0c7b2616c5c75af9d3a50bd4f0fe8e4ccab545ab8648cbfbb4b7f
2017-10-27 12:27:25 +00:00
drh 47d9f83982 Enhance the min/max optimization so that it works with indexes on
expressions.

FossilOrigin-Name: 6caec9082b3ad6d3f89f6291084a8f5c80f296630e2e94bc764389ac1a47a833
2017-10-26 20:04:28 +00:00
drh 7ea11066b6 Extra ".selecttrace" output following aggregate analysis. No changes to
production builds.

FossilOrigin-Name: 6fbf74ab3189b9cb20cf7cc8db0226eb935a8eab477cc83b8390492fcf2f1f76
2017-10-26 18:43:19 +00:00
dan 4544e28425 Fix a bug causing "make amalgmation-autoconf" to create an invalid package if
either the current or parent directory contains a file named install.sh or
install-sh.

FossilOrigin-Name: e1faa7859451ee969f0ce02d2d4e4c54d0e2e018b37b8faf690e6b87593cce7d
2017-10-26 15:21:56 +00:00
drh 3cd8aaa748 Fix the sqlite3_dbpage virtual table so that it can read and write from
any attached database.

FossilOrigin-Name: d4f893e1ae53a0445939ea2920af87d21dd36270494381028b2eaebe5c188f18
2017-10-25 19:18:33 +00:00
dan 7e2b38c53b Add tests cases and fix minor issues in the rtreecheck() function.
FossilOrigin-Name: d6130cd226c0ca95e02f0cbabfdc27071acdcf83e0d0cb0eaa47d992479ed9a1
2017-10-25 18:17:24 +00:00
mistachkin 2c0d084400 Add SQL scalar function rtreecheck() to the rtree module. For running checks to ensure the shadow tables used by an rtree virtual table are internally consistent.
FossilOrigin-Name: 7d26498063bbc4525976ace698fafcf161d939908f4ffb36d7a4df8fb1bce1fb
2017-10-25 18:01:58 +00:00
mistachkin 8c66e5b73e Fix compilation issue (C99-ism) seen with MSVC.
FossilOrigin-Name: 61870b42b033189509b244c76d28932f7a447b887ffe04a3c81461148e54cfb5
2017-10-25 18:00:58 +00:00
dan 1917e92fdb Add SQL scalar function rtreecheck() to the rtree module. For running checks
to ensure the shadow tables used by an rtree virtual table are internally
consistent.

FossilOrigin-Name: dde0bb3eab1316c3247b1755594527ca70955aab4ad4907190731f7ec092b327
2017-10-25 16:38:34 +00:00
drh b5d013edd1 Do not reference the ioctl() system call in the unix backend unless it
is actually needed by the Batch Atomic Write extension.  This should allow
the build to work on VxWorks.

FossilOrigin-Name: adfa7ed2de3e833fff65935455e71236a59602aaf7b97ece667ab300dca9f673
2017-10-25 16:14:12 +00:00
drh 98d529b541 Add the sqlite_btreeinfo eponymous-only table for introspecting the schema
and estimating the sizes of various btrees.

FossilOrigin-Name: 1e30f4772db1e1086096f72d32e87c552923be8b264aa13cf822fae754eb083d
2017-10-25 01:34:24 +00:00
mistachkin ea78f64dc1 Force the autoconf makefile for MSVC to always use the 'find.exe' included with Windows.
FossilOrigin-Name: b76bffd332585e8412a0a994ae6dee79a83213d8b709d7f858c5c05678ab0887
2017-10-24 21:17:12 +00:00
drh e2f3b671ed Merge all of the fixes from the 3.21.0 release.
FossilOrigin-Name: 5ab662b443df17c5ebdadc0bdac2f447c5c7e86f7a32a6943bb4ac8605879441
2017-10-24 19:05:26 +00:00
drh 39f2b329f6 Version 3.21.0
FossilOrigin-Name: 1a584e499906b5c87ec7d43d4abce641fdf017c42125b083109bc77c4de48827
2017-10-24 18:55:49 +00:00
dan 952523f618 Fix a problem in the incr-blob code causing a new cursor to be opened for
every sqlite3_blob_reopen() call.

FossilOrigin-Name: 41ef34a1f0650c50cacb203665cd9d57db53a49c979bf0d5a78937517f763a2c
2017-10-24 17:28:25 +00:00
drh f7902a543e On the amalgamation package, enable the sqlite_dbpage virtual table so that
the .dbinfo command works in the CLI.

FossilOrigin-Name: 54b90b4f27f6f213825e881929fa04a6282e5b909a12e881366f9aef6872dcb6
2017-10-23 21:24:38 +00:00
dan 685bea66ce Merge trunk fixes to swarmvtabfault.test and the lsm extension into this
branch. No changes to core SQLite code.

FossilOrigin-Name: f632b87002a7ee9be569aacb5ce85bb7e9c86b7d77bb8d1bf8b55eb5be4ecc77
2017-10-23 20:20:42 +00:00
mistachkin 0295774ca0 In the 'swarmvtabfault' test module, make sure to close the database handle prior to raising an error from the 'not found' callback script.
FossilOrigin-Name: f317037b31b19007e30bb41c54506d9d241a6d590c2b31e2ddda10d4f6e7605b
2017-10-23 20:17:19 +00:00
mistachkin 15dd780a9e Cleanup a test database file prior to using it.
FossilOrigin-Name: e1bf5e1d06dbe573671c6b5472b45f5bfa3cf82374f70a76b4c80815bf15a29b
2017-10-23 17:36:52 +00:00
drh efeaec365f Updates to test procedures so that they all work with encryption. No changes
to the core SQLite code.

FossilOrigin-Name: 0481330756e861de8e1eb7136e7dca2f333b2a82377949d2e0eba401af7d73dd
2017-10-23 16:34:07 +00:00
dan 21cd29ab15 Avoid passing a NULL value as the second argument to memcpy().
FossilOrigin-Name: 58e5bb491bc0e28412ca188ba8fbe94adc67b5b1e9d7c112c36011400528d577
2017-10-23 16:03:54 +00:00
dan b5ef728db6 In lsm (not SQLite), avoid opening the *-shm file before the database file is
locked. Otherwise, there is a race condition whereby a connection in another
process process may unlink() it while it is still in use.

FossilOrigin-Name: c8b8b9b573665c2b4d278bb679a48ac407374b8d860f0c3f4d50a303043464ad
2017-10-23 11:48:00 +00:00
dan 104a3b18b4 Fix minor test script problems revealed by releasetest.tcl.
FossilOrigin-Name: c333ee7e9677bda1dad8e80cf94755350bfe20bc0754577442727b6f807ad831
2017-10-23 07:53:00 +00:00
dan f970372698 Fix minor test script problems revealed by releasetest.tcl.
FossilOrigin-Name: 15e87d9bc81812fb9de86f9870389217dddb9f9c4d48e42acefce2d35ba293f1
2017-10-23 07:52:07 +00:00
dan 123e1b5be5 Fix test cases in dbpage.test so that they work with
SQLITE_DEFAULT_AUTOVACUUM=1 builds.

FossilOrigin-Name: 9474f061d634721ca462bbad375270b8b39dea44011df3e1aac72021e8bf70fc
2017-10-22 08:03:39 +00:00
dan 063cf17a11 Fix test cases in dbpage.test so that they work with
SQLITE_DEFAULT_AUTOVACUUM=1 builds.

FossilOrigin-Name: 0fcf1e61ef2b6c1fb8f4846f973d2d427598ffbc80dbc49e56e71513b194bae7
2017-10-22 08:02:56 +00:00
dan f4af5dbae4 Avoid running tests that use sqlite_dbpage with SQLITE_OMIT_VIRTUAL_TABLE
builds.

FossilOrigin-Name: 6dde8d6154c5b4d36c7aad17d6eaafdb13c66a09d17d4c79f52b2417846ea0b5
2017-10-22 07:58:09 +00:00
dan 9499b4a614 Avoid running tests that use sqlite_dbpage with SQLITE_OMIT_VIRTUAL_TABLE
builds.

FossilOrigin-Name: 7bd20a20a0f422765a6e469d1a1b67b95c4a441931688e04a2b1b491a5238528
2017-10-22 07:57:29 +00:00
drh aa79e434f1 Merge all the enhancements and bug fixes from trunk, since none are
destablizing.  Call this the second beta.

FossilOrigin-Name: fb3ee1b7cac09e4950e4f48b44c277e4f391cb6c8f069644732d2389ca653da4
2017-10-21 17:17:17 +00:00
drh 6fe3733ba9 Catch and avoid a 16-bit integer overflow on the number of columns in a
common table expression.  This fixes a problem found by OSS-Fuzz.  The
test case is in TH3.

FossilOrigin-Name: 6ee8cb6ae5fd076ec226bb184b5690ba29f9df8cfaef47aaf13336873b4c1f6c
2017-10-21 14:17:31 +00:00
drh 316ab93e2c Remove unnecessary "#if SQLITE_MAX_COLUMN". SQLITE_MAX_COLUMN is always
defined.

FossilOrigin-Name: 6ec82acde81a46a75ed5931fc7dd813f2523753106ad7b8f0b544b9da9824d5a
2017-10-21 13:29:26 +00:00
dan f2f72a0f9f Take extra care to avoid an OOB read caused by a corrupt b-tree page.
FossilOrigin-Name: 04925dee41a21ffca9a9f9df27d8165431668c42c2b33d08b077fdb28011170b
2017-10-19 15:17:38 +00:00
dan c1abf2d360 Avoid using snprintf as a member variable of a struct in sqlite3ext.h. This
causes problems on OSX. Similar to fix [a1fd3aa8].

FossilOrigin-Name: cd0471ca9f75e7c8be74536ff4ec85b5d70f0d7994b680ed5f45b9f12a46cf46
2017-10-18 15:02:01 +00:00
dan af124faf3e Avoid using snprintf as a member variable of a struct in sqlite3ext.h. This
causes problems on OSX.

FossilOrigin-Name: b066d5a69f5391b2cef04b4e288f7d33e63a4ff54325b7e9fbd6aa42529c2f3c
2017-10-18 14:29:36 +00:00
mistachkin f7fc4c22f4 The source code files generated for the 'sqlite3-all.c' target should not have Windows line-endings.
FossilOrigin-Name: 6a08c43431be18a08bdcbf33d327513f72fff72dac5d02103dab8399d8c3d668
2017-10-17 18:33:22 +00:00
drh f30d345241 Fix the ".check" command of the command-line shell to return 1 (error)
rather than 2 (exit) on a test failure.

FossilOrigin-Name: e2af0cc6ef5fafc785b8b73f51995901f50822972dcfb632494e22402596186d
2017-10-17 13:44:46 +00:00
drh 989d7278b0 Improved comments, including a typo fix, on the whereLoopCheaperProperSubset()
function.

FossilOrigin-Name: 700a3c694438ca6cca185d0097f24799e82717ef38cb47bd83666c80f0e3cb2f
2017-10-16 11:50:12 +00:00
drh 47b1d68f25 In the query planner, do not consider index X to be a proper subset of
index Y if X is a covering index but Y is not.

FossilOrigin-Name: ee31c04353cd75ea4bbadee2994c30d3808b696a4f680187502d104902988a5d
2017-10-15 22:16:25 +00:00
mistachkin 82cae9ffd6 Updates to the Makefiles for MSVC. Cherrypick of [ac8786f3f9f35cb6].
FossilOrigin-Name: 92eb721faefcdd8396072722d3e4d7ca41b860b306e4bb0f0191dde8f30d0add
2017-10-14 19:58:37 +00:00
mistachkin 835cd436e1 Updates to the Makefiles for MSVC.
FossilOrigin-Name: ac8786f3f9f35cb6fa72c65f5ca41cc6659f4702cd29ab0c9dcf04d3d1189090
2017-10-14 19:54:06 +00:00
drh 96a206fa10 Improved ability to generate stand-alone program using TCL and SQLite by
compiling with -DTCLSH_INIT_PROC=name to cause the TCL interpreter to be
initialized using procedure name().  Both sqlite3_analyzer and testfixture
are now built this way.

FossilOrigin-Name: d65d1f297ddb07b799ff5b2e560575fc59a6fa74c752269cc85ab84348fb7da4
2017-10-13 20:14:06 +00:00
drh 903b23022d Add the tcl/mkccode.tcl script used to construct a single C-language source
fiel for programs that combine C-code, SQLite, and TCL.  Use this script to
construct the sqlite3_analyzer program.

FossilOrigin-Name: 298a3fddec459c4fd2b840bd363239dc627f1dda90e2d5e478846cb895a8ad82
2017-10-13 18:58:55 +00:00
drh f291dff22c Move a bunch of unrelated test code out of tclsqlite.c and into
test_*.c files.  There is still some test code in tclsqlite.c, but the amount
is greatly reduced.

FossilOrigin-Name: a9c4bc88fcf985a0bea14ed5381239cfb697886287998da04a10230b6858ab5d
2017-10-13 16:19:48 +00:00
drh 8544d43e4a The db_use_legacy_prepare command no longer exists. Use the undocumented
-use-legacy-prepare option to DB version instead.

FossilOrigin-Name: ea2fa9ab9b3c97e001c1a2f3e24f3554b544070d5f915b9827eb07eb5ea8f00b
2017-10-13 16:01:36 +00:00
drh 1df6470d35 When compiling with SQLITE_TEST, extra options are available on the
"DB version" command for controlling the internal state of the SqliteDb
object, for testing purposes.

FossilOrigin-Name: bf86478d9c6b899d6441e80cf9d17b58731e5d354e31b11f0d58a798f6fab896
2017-10-13 15:56:26 +00:00
drh c318f730a4 Move some test logic out of tclsqlite.c and into auxiliary test_*.c files.
This is a work in progress.

FossilOrigin-Name: 95b7687fed75b32a62a0c62d397f4f543bf40095e13c22e15938d5dcfd71fcdf
2017-10-13 15:06:06 +00:00
drh 88dd668942 Add the sqlite_dbpage virtual table (enabled using SQLITE_ENABLE_DBPAGE_VTAB).
Make that virtual table and dbstat available to the command-line shell.

FossilOrigin-Name: eaeeb09d4aa1dbccdd2488af8461e2a8c8a53d92c63fd56330be041ad72a9e4a
2017-10-12 20:37:20 +00:00
drh 277ee81bab Create the new ext/repair folder and move checkfreelist.c there. Remove
checkfreelist.c from the command-line shell (undoing check-in [48418f2e]).

FossilOrigin-Name: dfdebd12bfc80b91d234ab328cb6106d5d37ccb79b58e36e556c1a8af640a4ab
2017-10-12 19:50:28 +00:00
drh 6235ee5784 Fix a harmless compiler warning about an unused parameter.
FossilOrigin-Name: de20133d44773f0b3b8869db5c1cb2a90f0426a54c7f40d12a930003343ad8e0
2017-10-12 14:18:38 +00:00