5583 Commits

Author SHA1 Message Date
drh
68d28ea4f0 Disable the snapshot test scripts if not compiled with SQLITE_ENABLE_SNAPSHOT.
FossilOrigin-Name: 5fd008f0433833e4341d526dcc2387570ffe1fea
2015-12-11 03:20:39 +00:00
dan
7116dc60dc Update the sqlite3_snapshot_get() API so that if the caller does not have an open read transaction on the named database, one is automatically opened.
FossilOrigin-Name: b9c90f10297d8516a661449e8af898e682c930aa
2015-12-10 20:03:08 +00:00
dan
745c14eb15 Add tests to snapshot.test.
FossilOrigin-Name: f3b743623a4501833478c8a86c0922931955aeb6
2015-12-10 19:44:34 +00:00
dan
a7aeb39836 Return SQLITE_BUSY (not SQLITE_BUSY_SNAPSHOT) if sqlite3_snapshot_open() fails to obtain the shared checkpointer lock.
FossilOrigin-Name: 5343060bcc6c99029f731f8020d2cba3f405f207
2015-12-10 19:11:34 +00:00
dan
7d15979420 Add tests to ensure that an sqlite3_snapshot_open() client cannot be tricked into reading a corrupt snapshot even if another process fails mid-checkpoint.
FossilOrigin-Name: b908048b6cfa1ee2fe1f7a17bae475ddd9d0376c
2015-12-10 18:06:21 +00:00
dan
3bf83ccd70 Have sqlite3_snapshot_open() avoid a race condition by taking a shared CHECKPOINTER lock while checking pInfo->nBackfillAttempted.
FossilOrigin-Name: 8084eae0bc4f6513b1147fb890a6b2813f1c0a09
2015-12-10 15:45:15 +00:00
dan
65127cd57d Update sqlite3_snapshot_open() to reduce the chances of reading a corrupt snapshot created by a checkpointer process exiting unexpectedly.
FossilOrigin-Name: 7315f7cbf4179aadda0f1a0baa1526a9b9f9729f
2015-12-09 20:05:27 +00:00
drh
ee3b7a2767 Merge unrelated fixes from trunk.
FossilOrigin-Name: 362615b4df94358d0264b0991c3090a0878f054c
2015-12-09 16:04:06 +00:00
drh
92a8277149 Add a test case of the form "WHERE a<2 OR a<3" using PRAGMA count_changes.
This test case was failing before the 3.9.0 release.

FossilOrigin-Name: 177862c1d50ba899d890fbc35f35e7423bc6aed5
2015-12-08 04:18:33 +00:00
dan
818b11aebb Add tests for snapshot_get(), _open() and _free().
FossilOrigin-Name: 502cc6f353358946080d9bcd335aed526825b88a
2015-12-07 14:33:07 +00:00
drh
28a6a1168b Remove the dependence on "exec ls -U" from the vtabH.test module, as the -U
option to "ls" is not universally available.

FossilOrigin-Name: 4ecbc75b465533cf80e166a9d0879b9afd3fe2be
2015-12-04 13:44:07 +00:00
drh
15427279c8 Fix typos in requirements text and update requirements marks. No changes
to code.

FossilOrigin-Name: 8534a46c06601ad35b97caee442371f24c718d0f
2015-12-03 22:33:55 +00:00
dan
5fcc1ba4e7 Fix threadtest3 so that it builds using the autoconf build system.
FossilOrigin-Name: d96de532cc4a192cfebae900701dcee0a7d29273
2015-12-03 12:01:54 +00:00
dan
48c06f32ca Improve concurrency in test_multiplex.c. Add a switch to "threadtest3" allowing it to run using the multiplexor VFS.
FossilOrigin-Name: 9d2c62b04e3a9ac5d9adea2aac7ec3f3bc3e88bd
2015-12-03 11:51:18 +00:00
drh
c18ed977e8 A unix VFS change replaces fsync() with fstat() when using SQLITE_NO_SYNC, so
set PRAGMA synchronous=OFF in the sysfault-3 test to avoid erroneously causing
errors in xSync.

FossilOrigin-Name: 4f7f355021f9eb048fffc84e559bfb3fdb1e1e69
2015-12-03 01:48:32 +00:00
dan
9a8941fc83 Have the sqlite3_column_decltype() API report the declared types for the left-most SELECT statement in a compound SELECT.
FossilOrigin-Name: 3e1d71fcaf57c0223ab9a7366c8607f8f66bb21c
2015-12-02 18:59:44 +00:00
drh
41d2e66ef3 Add the SQLITE_LIKE_DOESNT_MATCH_BLOBS compile-time option.
FossilOrigin-Name: 9e1d6d4c391ff90077f0d1cdeb567969fee9f747
2015-12-01 21:23:07 +00:00
mistachkin
92af1ebc75 Add experimental support for the 'test_fs' test module on Win32.
FossilOrigin-Name: f3ffb3aeea95712e92919fd5071741327add9643
2015-11-30 23:29:07 +00:00
drh
025d2f7ad8 Fix a problem in xFullPathname for the unix VFS. The problem was found by
Kostya Serebryany using libFuzzer.

FossilOrigin-Name: bb1e2c4df0b81327923f121dd6c002845486a314
2015-11-30 22:22:23 +00:00
drh
f8b0be48d1 Fix the threadtest3 test program so that it works with VFSes that omit the
xCurrentTime() method and supply only xCurrentTimeInt64().

FossilOrigin-Name: 3b155855f3d5918f1df7dbd19783215b3da0ca3e
2015-11-30 19:15:25 +00:00
dan
d6b459c996 Add the "colUsed" field to the sqlite3_index_info structure passed to virtual table xBestIndex methods. To indicate the subset of the virtual table columns that may be required by the current scan.
FossilOrigin-Name: 47f10b7e5d8c1d965df891990090623444933cc9
2015-11-30 12:01:37 +00:00
drh
ecf0c275bb Disable testing with SQLITE_USER_AUTHENTICATION as the makefiles are not set
up to do that.

FossilOrigin-Name: 14bbcdc64ecc21f47aed8935858788928ca63107
2015-11-28 17:38:22 +00:00
dan
1acb539f4c Add the "colUsed" field to the sqlite3_index_info structure passed to virtual table xBestIndex methods. To indicate the subset of the virtual table columns that may be required by the current scan.
FossilOrigin-Name: 116b206494eb8ba963c7c5acfbf9e7b6db11c79c
2015-11-26 19:33:41 +00:00
dan
fab1d401f8 Fix a problem with the userauth extension and no-authentication databases. Run the tests for this extension as part of the Debug-One module in releasetest.tcl.
FossilOrigin-Name: 8b15621952889b4ba53b2ea3171fef7ef0479ddb
2015-11-26 15:51:55 +00:00
dan
1e93173ffc Update test_fs.c to include a virtual table that reads a file-system hierarchy. Use it to further test GLOB and LIKE support for virtual tables.
FossilOrigin-Name: 6ef6578c03b7cfbeaaf3627b9eea2febf501ace5
2015-11-25 18:07:46 +00:00
drh
5337dacbad Remove unused methods from the unix VFS.
FossilOrigin-Name: 228bd15bbb7a1e6e3e0d03832e7f39ba169356a8
2015-11-25 15:15:03 +00:00
dan
898f70bc28 Merge latest trunk changes with this branch.
FossilOrigin-Name: 99222bb3e5f9b2a9a10d9561a9fd8c0f717baaff
2015-11-24 17:44:26 +00:00
dan
43970dd774 Add further tests and related fixes for GLOB/REGEXP/LIKE support in virtual tables.
FossilOrigin-Name: c5e9fd0dc92a07db3d3b5f5c5ad8fb63b3425c2b
2015-11-24 17:39:01 +00:00
drh
6226ca2a6d Make the geteuid() system call overloadable using xSetSystemCall() on the
unix VFSes.

FossilOrigin-Name: 6c2ddea65e1871b2fcb4991c5b3e6992993db3ea
2015-11-24 15:06:28 +00:00
drh
7060ef9294 Add a test case for the fix of check-in [19d9f9ce691963310]
FossilOrigin-Name: 19a9c07b26a4123dc60abdcc84a956f88c352bab
2015-11-24 03:50:16 +00:00
drh
2edc5fd73a Remove an incorrect ALWAYS() macro. Fix for ticket [e5c6268dd807fa8950] -
a problem introduced in SQLite 3.9.0 and found by libFuzzer.

FossilOrigin-Name: 824ad96f72cb0c948ec98aca9d17a7e6790c575f
2015-11-24 02:10:52 +00:00
dan
07bdba86d5 Add experimental support for LIKE, GLOB and REGEXP to the virtual table interface.
FossilOrigin-Name: 277a5b4027d4c2caba8143228a4f7d6df899dbb4
2015-11-23 21:09:54 +00:00
dan
8836cbbcb4 Fix an obscure memory leak found by libfuzzer that may occur under some circumstances if expanding a "*" expression causes a SELECT to return more than 32767 columns.
FossilOrigin-Name: 60de5f23424552c98aa760ac89149a3d51f895be
2015-11-21 19:43:29 +00:00
drh
202923107d Do not allow table-valued function syntax on ordinary tables and views as those
objects are not table-valued functions.
Fix for ticket [73eba7ba5c7c0fc].

FossilOrigin-Name: ff5716b89f99d9c4568a39f1f52524528a631623
2015-11-21 13:24:46 +00:00
dan
aaea31439d Fix a problem with VACUUM and __hidden__ columns.
FossilOrigin-Name: 13995756ad8b80568aa2f74387788a8cab1123ef
2015-11-19 18:09:05 +00:00
dan
ba68f8f3f5 Fix problems with INSERT INTO ... SELECT ... statements that write to tables with __hidden__ columns.
FossilOrigin-Name: 59bd0ec7d4327852ee8c0206b2c59d0a12484db8
2015-11-19 16:46:46 +00:00
drh
03d69a6826 Only support the magic "__hidden__" column name prefix interpretation when
compiled with SQLITE_ENABLE_HIDDEN_COLUMNS.

FossilOrigin-Name: 5490646b2eb74ea8bd5ab2690f69b9c707a0165f
2015-11-19 13:53:57 +00:00
dan
ab5a8ee3e4 Add tests for views to hidden.test.
FossilOrigin-Name: 27d4b6f5756c7b19c00c95d46a77280c8b6f03a4
2015-11-18 20:59:47 +00:00
dan
d1ce65fc76 Add a test for the __hidden__ hack on this branch.
FossilOrigin-Name: ebf4bbffec58111a670c46a9eb469bfd2440b0b1
2015-11-18 20:07:12 +00:00
drh
96ceaf8680 Code simplification in sqlite3ColumnsFromExprList(). Update the %z format
code so that it works with buffers obtained from sqlite3DbMalloc().  Add a
testcase for the slow column name uniquifier.

FossilOrigin-Name: 9272426057b6cb2d913519ff4c97aa6e211f7d51
2015-11-14 22:04:22 +00:00
drh
6653fbe91f Fix a memory leak in the fuzzcheck utility.
FossilOrigin-Name: dfd6d9f4fbe902086f9158dfa5f37e781765a683
2015-11-13 20:52:49 +00:00
drh
d63fbb7103 Fix the releasetest-out.txt log output from releasetest.tcl so that it works
when the --jobs option is used.

FossilOrigin-Name: 6bb314a5022c8bae63f6cdb48652915e05c06a38
2015-11-13 12:52:34 +00:00
drh
29fbdb731b Disable two PRAGMA cache_spill tests when MEMORY_MANAGEMENT is enabled.
FossilOrigin-Name: ebda77aad4d964593606ded2fdb19259ef9ebb8e
2015-11-13 12:32:01 +00:00
drh
061d35c145 Change the error messages so that they begin can be grepped using '^!' instead
of '^ '.  There are far too many extraneous outputs that being with a space.

FossilOrigin-Name: 367ec0db49607559960d58891771113c205fd951
2015-11-13 00:03:14 +00:00
drh
d66b2e02ee Add a space before each line of error output in the test scripts so that all
errors can be conveniently located in logs by doing "grep '^ '".

FossilOrigin-Name: 9d532fb50d310df629ea65193f21dc9b3594ff5f
2015-11-12 21:42:40 +00:00
dan
d83f7ca114 Add support for the SQLITE_SQLLOG_CONDITIONAL environment variable to the logging code in test_sqllog.c. When defined, logging is only performed if the "<database>-sqllog" file is present in the file system when the main database is opened.
FossilOrigin-Name: cab8126be9f63dd596719b12704ba77c128282bc
2015-11-12 20:12:51 +00:00
drh
4f9c8ec62d Test cases. Minor problems fixed. All appears to work now.
FossilOrigin-Name: 9a431362dccbc9b8f93375f30a3b8955903cca79
2015-11-12 15:47:48 +00:00
drh
9b0cf34f81 First attempt at enhancing the "PRAGMA cache_spill" statement to accept a
cache threashold size.

FossilOrigin-Name: 549d42be0dac87dc04c3eeccfdc60615c3a6ad3f
2015-11-12 14:57:19 +00:00
dan
fe88fbfc82 Add test cases for WITH clauses.
FossilOrigin-Name: e7e65c7559ed43e7065adc2ec1bd242bf187b7c3
2015-11-07 17:51:39 +00:00
drh
6e7722669e Proposed fix for an infinite loop bug in the WITH clause semantic analysis
logic.

FossilOrigin-Name: 028475cb17a4b50baf0e9aba9bd3403d0a5d03b0
2015-11-07 17:48:21 +00:00