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
drh
0a38646806
Fix the "snapshot-tarball" makefile target, which was broken by the shell.c
...
change of check-in [36acc0a9].
FossilOrigin-Name: c643ace24c1936f9d2b16bd6d1d13cf08070dfe5b094208b638924e904915339
2017-10-12 14:13:20 +00:00
drh
81a2160bf9
Merge fixes from trunk. All changes are on makefiles and test scripts.
...
There are no core code changes.
FossilOrigin-Name: 1fb87a0c6e4db1f8bf51d552d9af1252544b7d7bd2dd80f78870f3b4fd347bad
2017-10-12 14:03:09 +00:00
drh
aa62d2e48f
The src/shell.c file is now generated from src/shell.c.in, so remove shell.c
...
from version control and update the makefiles to build it automatically.
FossilOrigin-Name: 36acc0a97fdcc6f54f29c68c4e131702f69c3e59e58237ff4e5c647928699956
2017-10-12 13:47:48 +00:00
drh
ddba6c38df
Merge fixes from the 3.21 branch.
...
FossilOrigin-Name: 292921692c8919d29f0a67d03ca953d5c1c4900d8c8567cceab27513732be598
2017-10-12 13:21:56 +00:00
dan
122ab8fd9d
Fix a potential crash that may follow an OOM or other system error in the shell tool.
...
FossilOrigin-Name: c36761e1a05c15c48468dd793faf06636f5dcfd3b4314074c4d9c9eac5c2695c
2017-10-12 11:33:13 +00:00
dan
e1b972bd38
Update some test cases to work with SQLITE_OMIT_VIRTUALTABLE and
...
DEFAULT_AUTOVACUUM builds.
FossilOrigin-Name: 4b68f424ca9b5d4b0e77065a4e60ec0f70dcce0d01053fd7a6b2ecae9d3a5967
2017-10-12 11:13:34 +00:00
drh
4c6cddcaab
Make sure the tableColumnList() routine of the command-line shell does not
...
cause a null-pointer dereference in an error condition.
FossilOrigin-Name: 5d0ceb8dcdef92cd72307e532a4a6c269b2c458fecb0bbede0bb941099eebc5b
2017-10-12 10:28:30 +00:00
drh
f02f8a7102
Merge fixes from the 3.21 branch.
...
FossilOrigin-Name: 18d4654fd161900f98ff435ea9e0a3c44b9972f84ee9f43096f9998f844ff857
2017-10-12 01:24:36 +00:00
drh
8a18100d44
Fix a typo in a numeric constant in an assert() - a bug that has been present
...
in the code since check-in [79e22b95038] on 2010-03-30.
FossilOrigin-Name: f0a2724f0a255cd5a262f31e4ee1f99ae713c25a9ecc56dc794c95f223453b9b
2017-10-12 01:19:06 +00:00
dan
3c48e6551b
Add test file mmapwarm.test. With tests for the sqlite3_mmap_warm() extension.
...
FossilOrigin-Name: 5c4980ef17291dcea5e93ead353b9a95e2fbff56ff7257e9878d095f6827b4e9
2017-10-11 20:27:03 +00:00
drh
f294ce648b
Add the checkfreelist extension to the command-line shell.
...
FossilOrigin-Name: 48418f2ed5ab1cb270776166141ce32ed3ebf22ed4e33a66a204d4fde9d11f52
2017-10-11 18:26:26 +00:00
dan
7d157f91f4
Check that the leaf count on each freelist trunk page is in range as part of
...
checkfreelist processing.
FossilOrigin-Name: 4e89406248f51d3b83d61e5472fb493f3d3b4ff2a69bf256c7e15445eeb2f3ec
2017-10-11 18:21:44 +00:00
dan
36187fe8c2
Add new extension "checkfreelist", which uses sqlite_dbpage to check that
...
there are no invalid entries on the database free-list.
FossilOrigin-Name: 21930ef5376261d95fa325be7761d327a350d4ae6b4573c83ddb4d294dea51c4
2017-10-11 18:00:34 +00:00
drh
512e6c3c51
Convert the implementation of the ".dbstat" dot-command of the command-line
...
shell to use the sqlite_dbpage table.
FossilOrigin-Name: 497409e167c7c025fbddc319b4fa9a8b965f70d05ac88c060dee469f70321388
2017-10-11 17:51:08 +00:00
mistachkin
690e8858fe
Make JSON1 defines consistent in the makefiles for MSVC.
...
FossilOrigin-Name: 31eee0e4bffc5419e076a589049bfea7327dfc666fcc2767c0b700f506055c4e
2017-10-11 17:50:22 +00:00
drh
9b40ab45b2
Enable JSON by default in the Windows command-line shell sqlite3.exe.
...
FossilOrigin-Name: 79c96121baf065fd78ba4f1fe82ce725b6372df20e9323d88022b7c243701372
2017-10-11 17:25:08 +00:00
drh
ca5cf1229b
Enable sqlite_dbpage and dbstat virtual tables in the shell, by default.
...
FossilOrigin-Name: 01bf856c424c20b464f26973720bf5dcd3e89509c5b02c3625d4828f0385d3db
2017-10-11 17:13:29 +00:00