]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
9 years agoAvoid unnecessary work inside of verifyDbFile() in the unix VFS. unix-vfs-optimization
drh [Tue, 8 Dec 2015 14:37:16 +0000 (14:37 +0000)] 
Avoid unnecessary work inside of verifyDbFile() in the unix VFS.

FossilOrigin-Name: f3c0579e931799088e9a83757e25bae229120697

9 years agoAdd a test case of the form "WHERE a<2 OR a<3" using PRAGMA count_changes.
drh [Tue, 8 Dec 2015 04:18:33 +0000 (04:18 +0000)] 
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

9 years agoUpdate the TclKit download URL.
mistachkin [Tue, 8 Dec 2015 00:47:32 +0000 (00:47 +0000)] 
Update the TclKit download URL.

FossilOrigin-Name: 07e5199c6f868cc02a0b708865254056c4f3daf3

9 years agoUpdate MSVC batch build tool to the latest Windows 10 SDK version.
mistachkin [Mon, 7 Dec 2015 23:31:59 +0000 (23:31 +0000)] 
Update MSVC batch build tool to the latest Windows 10 SDK version.

FossilOrigin-Name: 2ad5017190334b7dd53294a30c3b3232e0c35869

9 years agoAdd the ".changes ON|OFF" command to the sqlite3.exe command-line shell, for
drh [Mon, 7 Dec 2015 21:46:19 +0000 (21:46 +0000)] 
Add the ".changes ON|OFF" command to the sqlite3.exe command-line shell, for
testing and verifying the sqlite3_changes() and
sqlite3_total_changes() interfaces.

FossilOrigin-Name: 9bbe1afc1521b111a0a93803b41ff04e0ee55630

9 years agoFix the openDirectory() routine in the unix VFS so that it works for databases
drh [Mon, 7 Dec 2015 18:18:33 +0000 (18:18 +0000)] 
Fix the openDirectory() routine in the unix VFS so that it works for databases
located in the root of the filesystem and for database files that have no
pathname at all.

FossilOrigin-Name: e7ae120d04cffafd9bc2b4ecd68571c17e05ed72

9 years agoChanges to avoid obscure, theoretical undefined behavior. This is preventative
drh [Mon, 7 Dec 2015 16:43:44 +0000 (16:43 +0000)] 
Changes to avoid obscure, theoretical undefined behavior. This is preventative
measures only - no actual problems observed on tested compilers.

FossilOrigin-Name: a9e819082ba19e72db03bba37edfb7702ff489a5

9 years agoRemove the dependence on "exec ls -U" from the vtabH.test module, as the -U
drh [Fri, 4 Dec 2015 13:44:07 +0000 (13:44 +0000)] 
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

9 years agoPrevent a segfault on Solaris in the test_fs.c due to differences in the
drh [Fri, 4 Dec 2015 03:27:45 +0000 (03:27 +0000)] 
Prevent a segfault on Solaris in the test_fs.c due to differences in the
definition of the dirent object.

FossilOrigin-Name: 042738ad3b769ad70fd7603f928d5b94a952267d

9 years agoFix typos in requirements text and update requirements marks. No changes
drh [Thu, 3 Dec 2015 22:33:55 +0000 (22:33 +0000)] 
Fix typos in requirements text and update requirements marks.  No changes
to code.

FossilOrigin-Name: 8534a46c06601ad35b97caee442371f24c718d0f

9 years agoImproved OOM recovery in the SELECT code generator logic.
drh [Thu, 3 Dec 2015 21:47:30 +0000 (21:47 +0000)] 
Improved OOM recovery in the SELECT code generator logic.

FossilOrigin-Name: e6521a436d464a42b87a7d5ba5cc98235b92440a

9 years agoMake the SQLITE_ENABLE_8_3_NAMES compile-time option available to
drh [Thu, 3 Dec 2015 20:50:10 +0000 (20:50 +0000)] 
Make the SQLITE_ENABLE_8_3_NAMES compile-time option available to
sqlite3_compileoption_used().

FossilOrigin-Name: 06338201f3f00151232e5c6a40edcdbea04d7553

9 years agoCleaner code and additional comments on the handling of 8+3 filenames when
drh [Thu, 3 Dec 2015 20:42:28 +0000 (20:42 +0000)] 
Cleaner code and additional comments on the handling of 8+3 filenames when
trying to find the name of a database file based on its journal filename,
in the unix VFS.

FossilOrigin-Name: 9e489a71f2aeb1f13f9ca6f106b9144d07ca25aa

9 years agoMake the sqlite3_status64(), sqlite3_strlike(), and
drh [Thu, 3 Dec 2015 13:43:07 +0000 (13:43 +0000)] 
Make the sqlite3_status64(), sqlite3_strlike(), and
sqlite3_db_cacheflush() APIs available to loadable extensions.

FossilOrigin-Name: a78e865607194718e2ef958879dbf549ac3c9970

9 years agoFix threadtest3 so that it builds using the autoconf build system.
dan [Thu, 3 Dec 2015 12:01:54 +0000 (12:01 +0000)] 
Fix threadtest3 so that it builds using the autoconf build system.

FossilOrigin-Name: d96de532cc4a192cfebae900701dcee0a7d29273

9 years agoImprove concurrency in test_multiplex.c. Add a switch to "threadtest3" allowing it...
dan [Thu, 3 Dec 2015 11:51:18 +0000 (11:51 +0000)] 
Improve concurrency in test_multiplex.c. Add a switch to "threadtest3" allowing it to run using the multiplexor VFS.

FossilOrigin-Name: 9d2c62b04e3a9ac5d9adea2aac7ec3f3bc3e88bd

9 years agoA unix VFS change replaces fsync() with fstat() when using SQLITE_NO_SYNC, so
drh [Thu, 3 Dec 2015 01:48:32 +0000 (01:48 +0000)] 
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

9 years agoRemove unreachable branches from the decltype computation logic in the query
drh [Wed, 2 Dec 2015 19:46:12 +0000 (19:46 +0000)] 
Remove unreachable branches from the decltype computation logic in the query
planner.

FossilOrigin-Name: 4f2bcff94c672312805be1400050a7026f93a9d7

9 years agoHave the sqlite3_column_decltype() API report the declared types for the left-most...
dan [Wed, 2 Dec 2015 18:59:44 +0000 (18:59 +0000)] 
Have the sqlite3_column_decltype() API report the declared types for the left-most SELECT statement in a compound SELECT.

FossilOrigin-Name: 3e1d71fcaf57c0223ab9a7366c8607f8f66bb21c

9 years agoFix an incorrect, though harmless, assert() in the unix VFS.
drh [Wed, 2 Dec 2015 17:40:13 +0000 (17:40 +0000)] 
Fix an incorrect, though harmless, assert() in the unix VFS.

FossilOrigin-Name: 4692ae84f93530e27d7c106a60236355e176b7fd

9 years agoRemove more (dead) SQLITE_FCNTL_WAL_BLOCK logic from wal.c - code that was
drh [Wed, 2 Dec 2015 16:10:16 +0000 (16:10 +0000)] 
Remove more (dead) SQLITE_FCNTL_WAL_BLOCK logic from wal.c - code that was
missed during the [e1d5320ca08933] check-in.

FossilOrigin-Name: 58c15c6af964563ac7ece8606d16730ccf9ee72b

9 years agoRemove an unreachable branch from the unixMapfile() routine of the unix VFS.
drh [Wed, 2 Dec 2015 15:44:39 +0000 (15:44 +0000)] 
Remove an unreachable branch from the unixMapfile() routine of the unix VFS.

FossilOrigin-Name: b50f67bc46e65fe4e51667d48b4add58706a9443

9 years agoMinor simplifications to the unix VFS.
drh [Wed, 2 Dec 2015 13:11:03 +0000 (13:11 +0000)] 
Minor simplifications to the unix VFS.

FossilOrigin-Name: 2f13c16b45685ec6850cbd9da79e8198bad6a491

9 years agoChange the SQLITE_NO_SYNC compile-time option to call fstat() in place of
drh [Wed, 2 Dec 2015 02:33:36 +0000 (02:33 +0000)] 
Change the SQLITE_NO_SYNC compile-time option to call fstat() in place of
fsync() rather than being a total no-op.

FossilOrigin-Name: f64ea8a052af9790d5e6987cbd5e81d77da6f172

9 years agoFix a (harmless) off-by-one error in the unix VFS logic that fsync()s a
drh [Wed, 2 Dec 2015 02:08:30 +0000 (02:08 +0000)] 
Fix a (harmless) off-by-one error in the unix VFS logic that fsync()s a
directory after deleting a file.

FossilOrigin-Name: 3d02711a709a7e708edb0ea8ca5d17b39dd307f6

9 years agoSimplification of the logic used to take the process-wide lock in the
drh [Wed, 2 Dec 2015 01:04:33 +0000 (01:04 +0000)] 
Simplification of the logic used to take the process-wide lock in the
unix-excl VFS.

FossilOrigin-Name: 73defd52bb0e3e5db763d3bfbeebc972b645867e

9 years agoRemove all traces of SQLITE_FCNTL_WAL_BLOCK from the unix VFS - that feature
drh [Wed, 2 Dec 2015 00:05:26 +0000 (00:05 +0000)] 
Remove all traces of SQLITE_FCNTL_WAL_BLOCK from the unix VFS - that feature
had been disabled for a long time and never actually worked.

FossilOrigin-Name: e1d5320ca089336e26d200305b744b06ce883be4

9 years agoSimplification to the posix_fallocate() replacement used for the
drh [Tue, 1 Dec 2015 22:09:42 +0000 (22:09 +0000)] 
Simplification to the posix_fallocate() replacement used for the
SQLITE_FCNTL_SIZE_HINT file control in the unix VFS.

FossilOrigin-Name: 74934d3f60ad9f6550297410eada0f288e0123c4

9 years agoAdd the SQLITE_LIKE_DOESNT_MATCH_BLOBS compile-time option.
drh [Tue, 1 Dec 2015 21:23:07 +0000 (21:23 +0000)] 
Add the SQLITE_LIKE_DOESNT_MATCH_BLOBS compile-time option.

FossilOrigin-Name: 9e1d6d4c391ff90077f0d1cdeb567969fee9f747

9 years agoThe test_fs.c test module now works on Windows.
drh [Tue, 1 Dec 2015 17:48:45 +0000 (17:48 +0000)] 
The test_fs.c test module now works on Windows.

FossilOrigin-Name: e3d8628456848a70035bbdeca6dc6c21f688b9a5

9 years agoSimplification to the read and write primatives in the unix VFS.
drh [Tue, 1 Dec 2015 16:21:35 +0000 (16:21 +0000)] 
Simplification to the read and write primatives in the unix VFS.

FossilOrigin-Name: 9eefa449792f03c4c149edcbc6b9b7692617994c

9 years agoAdd experimental support for the 'test_fs' test module on Win32. testFsWin32
mistachkin [Mon, 30 Nov 2015 23:29:07 +0000 (23:29 +0000)] 
Add experimental support for the 'test_fs' test module on Win32.

FossilOrigin-Name: f3ffb3aeea95712e92919fd5071741327add9643

9 years agoAdd the SQLITE_PRINTF_PRECISION_LIMIT compile-time option.
drh [Mon, 30 Nov 2015 22:52:14 +0000 (22:52 +0000)] 
Add the SQLITE_PRINTF_PRECISION_LIMIT compile-time option.

FossilOrigin-Name: ecad75d69e0d5c83dd3584d363e557e84b65f7f2

9 years agoFix a problem in xFullPathname for the unix VFS. The problem was found by
drh [Mon, 30 Nov 2015 22:22:23 +0000 (22:22 +0000)] 
Fix a problem in xFullPathname for the unix VFS.  The problem was found by
Kostya Serebryany using libFuzzer.

FossilOrigin-Name: bb1e2c4df0b81327923f121dd6c002845486a314

9 years agoThe EOVERFLOW errors from fstat() is not possible unless SQLite has been
drh [Mon, 30 Nov 2015 20:36:26 +0000 (20:36 +0000)] 
The EOVERFLOW errors from fstat() is not possible unless SQLite has been
compiled with SQLITE_DISABLE_LFS.

FossilOrigin-Name: 8cfb7a50bb70ba1e021c1d12d31563e98a20d291

9 years agoFix the threadtest3 test program so that it works with VFSes that omit the
drh [Mon, 30 Nov 2015 19:15:25 +0000 (19:15 +0000)] 
Fix the threadtest3 test program so that it works with VFSes that omit the
xCurrentTime() method and supply only xCurrentTimeInt64().

FossilOrigin-Name: 3b155855f3d5918f1df7dbd19783215b3da0ca3e

9 years agoAdd the "colUsed" field to the sqlite3_index_info structure passed to virtual table...
dan [Mon, 30 Nov 2015 12:01:37 +0000 (12:01 +0000)] 
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

9 years agoSimplifications to the locking logic in the unix-dotfile VFS.
drh [Mon, 30 Nov 2015 00:05:39 +0000 (00:05 +0000)] 
Simplifications to the locking logic in the unix-dotfile VFS.

FossilOrigin-Name: 583813525888c7e106f3e8cb46c1a507006daee6

9 years agoFix the sqldiff utility program so that it works for schemas that have
drh [Sun, 29 Nov 2015 21:46:19 +0000 (21:46 +0000)] 
Fix the sqldiff utility program so that it works for schemas that have
tables with zero-length column names.

FossilOrigin-Name: 64263ccb8f9835c615242de6e28db24f953422fa

9 years agoImprovements to temporary file creation logic in the unix VFS.
drh [Sat, 28 Nov 2015 21:49:53 +0000 (21:49 +0000)] 
Improvements to temporary file creation logic in the unix VFS.

FossilOrigin-Name: d6e177fd09c83d46adc5b5d36e9a439aa5397450

9 years agoAdd the SQLITE_FCNTL_VFS_POINTER file control which obtains a pointer to
drh [Sat, 28 Nov 2015 18:06:36 +0000 (18:06 +0000)] 
Add the SQLITE_FCNTL_VFS_POINTER file control which obtains a pointer to
the top-level VFS in use by a database connection.

FossilOrigin-Name: 7c6a809e25138950f50554e1fb96e0b6ebbe0bd4

9 years agoDisable testing with SQLITE_USER_AUTHENTICATION as the makefiles are not set
drh [Sat, 28 Nov 2015 17:38:22 +0000 (17:38 +0000)] 
Disable testing with SQLITE_USER_AUTHENTICATION as the makefiles are not set
up to do that.

FossilOrigin-Name: 14bbcdc64ecc21f47aed8935858788928ca63107

9 years agoThe first argument to SQLITE_CONFIG_PAGECACHE, SQLITE_CONFIG_SCRATCH, and
drh [Thu, 26 Nov 2015 22:12:41 +0000 (22:12 +0000)] 
The first argument to SQLITE_CONFIG_PAGECACHE, SQLITE_CONFIG_SCRATCH, and
SQLITE_CONFIG_HEAP must always be a pointer.

FossilOrigin-Name: 5e14cadff09d7425c8e1cc5e817f2b0609e52a46

9 years agoAdd the "colUsed" field to the sqlite3_index_info structure passed to virtual table... vtab-colused
dan [Thu, 26 Nov 2015 19:33:41 +0000 (19:33 +0000)] 
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

9 years agoFix a problem with the userauth extension and no-authentication databases. Run the...
dan [Thu, 26 Nov 2015 15:51:55 +0000 (15:51 +0000)] 
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

9 years agoSimplify logic for syncing directories after creating or deleting a file in
drh [Thu, 26 Nov 2015 10:37:05 +0000 (10:37 +0000)] 
Simplify logic for syncing directories after creating or deleting a file in
the unix VFS.

FossilOrigin-Name: eb180b4f04d412dcd0af138e2dd7f62fbb5ac439

9 years agoSmall simplification to the xOpen method in the unix VFS.
drh [Thu, 26 Nov 2015 02:21:05 +0000 (02:21 +0000)] 
Small simplification to the xOpen method in the unix VFS.

FossilOrigin-Name: 96e7d638ecdabbf84a152036eb01d408d142839e

9 years agoSimplify the temporary filename generator and the time-of-day functions in
drh [Wed, 25 Nov 2015 23:13:14 +0000 (23:13 +0000)] 
Simplify the temporary filename generator and the time-of-day functions in
the unix VFS.

FossilOrigin-Name: 6c5621ce1b1a65913b088ed8be65f9b689260d2c

9 years agoFix harmless compiler warnings in test_fs.c. Fix typos and clean up the text
drh [Wed, 25 Nov 2015 18:40:38 +0000 (18:40 +0000)] 
Fix harmless compiler warnings in test_fs.c.  Fix typos and clean up the text
of the documentation for sqlite3_strglob() and sqlite3_strlike().

FossilOrigin-Name: 697b20534c2d780cdd8cc165d2930f6e56480770

9 years agoUpdate test_fs.c to include a virtual table that reads a file-system hierarchy. Use...
dan [Wed, 25 Nov 2015 18:07:46 +0000 (18:07 +0000)] 
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

9 years agoMake the xAccess method of the unix VFS smaller and faster.
drh [Wed, 25 Nov 2015 18:03:33 +0000 (18:03 +0000)] 
Make the xAccess method of the unix VFS smaller and faster.

FossilOrigin-Name: 191aef986ffc4ef34d813e417e52a4ec820b0300

9 years agoRemove unused methods from the unix VFS.
drh [Wed, 25 Nov 2015 15:15:03 +0000 (15:15 +0000)] 
Remove unused methods from the unix VFS.

FossilOrigin-Name: 228bd15bbb7a1e6e3e0d03832e7f39ba169356a8

9 years agoSimplification of the error code translator in os_unix.c. Code cleanup only.
drh [Wed, 25 Nov 2015 14:00:07 +0000 (14:00 +0000)] 
Simplification of the error code translator in os_unix.c.  Code cleanup only.
The logic is unchanged.

FossilOrigin-Name: 2a20f793fdf6a2e88b679a7bd4e8ccf2935df049

9 years agoFix the fts5 "prefix=" option to match the documentation (space separated list, multi...
dan [Wed, 25 Nov 2015 11:56:24 +0000 (11:56 +0000)] 
Fix the fts5 "prefix=" option to match the documentation (space separated list, multiple prefix= options supported). The undocumented comma-separated format (compatible with fts4) still works.

FossilOrigin-Name: 11eb8e877e2ba859ef6b44318f286597186dfaf2

9 years agoEnhancement the virtual table interface to support LIKE, GLOB, and REGEXP
drh [Wed, 25 Nov 2015 01:57:42 +0000 (01:57 +0000)] 
Enhancement the virtual table interface to support LIKE, GLOB, and REGEXP
operators.  Also add the sqlite3_strlike() interface, which might be useful
as part of the implementation of LIKE on some virtual tables.

FossilOrigin-Name: a6bfd4692c3f8b107546fbcaeb985d2c1817b3c1

9 years agoAdd the sqlite3_strlike() interface, which might be useful for implementing vtab-like-operator
drh [Tue, 24 Nov 2015 21:23:59 +0000 (21:23 +0000)] 
Add the sqlite3_strlike() interface, which might be useful for implementing
LIKE operators on virtual tables.

FossilOrigin-Name: e70ec71d6883f2f8fc75301ff985bccb5aa06127

9 years agoFix a problem in whereexpr.c causing a crash while processing a user-function taht...
dan [Tue, 24 Nov 2015 18:16:15 +0000 (18:16 +0000)] 
Fix a problem in whereexpr.c causing a crash while processing a user-function taht accepts zero arguments.

FossilOrigin-Name: 069e51b19c773aa3017a8d307c8daa0766c224ba

9 years agoFix harmless compiler warnings in the TCL test harness logic.
drh [Tue, 24 Nov 2015 18:04:39 +0000 (18:04 +0000)] 
Fix harmless compiler warnings in the TCL test harness logic.

FossilOrigin-Name: 2fba7a96566b5448f527a4ec6a26e860c4889813

9 years agoMerge latest trunk changes with this branch.
dan [Tue, 24 Nov 2015 17:44:26 +0000 (17:44 +0000)] 
Merge latest trunk changes with this branch.

FossilOrigin-Name: 99222bb3e5f9b2a9a10d9561a9fd8c0f717baaff

9 years agoAdd further tests and related fixes for GLOB/REGEXP/LIKE support in virtual tables.
dan [Tue, 24 Nov 2015 17:39:01 +0000 (17:39 +0000)] 
Add further tests and related fixes for GLOB/REGEXP/LIKE support in virtual tables.

FossilOrigin-Name: c5e9fd0dc92a07db3d3b5f5c5ad8fb63b3425c2b

9 years agoRemove from os_unix.c pointless logic that tries to prevent a recurrence of
drh [Tue, 24 Nov 2015 16:40:23 +0000 (16:40 +0000)] 
Remove from os_unix.c pointless logic that tries to prevent a recurrence of
a warning message that can only occur once.

FossilOrigin-Name: 20256177072caa4f2b4114038ad1c8f6e26bc562

9 years agoFix a comment typo in the unix VFS. No changes to code.
drh [Tue, 24 Nov 2015 15:12:47 +0000 (15:12 +0000)] 
Fix a comment typo in the unix VFS.  No changes to code.

FossilOrigin-Name: 32e138796c66c88e8cbb77aa3a4282a38d1f959a

9 years agoMake the geteuid() system call overloadable using xSetSystemCall() on the
drh [Tue, 24 Nov 2015 15:06:28 +0000 (15:06 +0000)] 
Make the geteuid() system call overloadable using xSetSystemCall() on the
unix VFSes.

FossilOrigin-Name: 6c2ddea65e1871b2fcb4991c5b3e6992993db3ea

9 years agoAdd a test case for the fix of check-in [19d9f9ce691963310]
drh [Tue, 24 Nov 2015 03:50:16 +0000 (03:50 +0000)] 
Add a test case for the fix of check-in [19d9f9ce691963310]

FossilOrigin-Name: 19a9c07b26a4123dc60abdcc84a956f88c352bab

9 years agoRemove an incorrect ALWAYS() macro. Fix for ticket [e5c6268dd807fa8950] -
drh [Tue, 24 Nov 2015 02:10:52 +0000 (02:10 +0000)] 
Remove an incorrect ALWAYS() macro.  Fix for ticket [e5c6268dd807fa8950] -
a problem introduced in SQLite 3.9.0 and found by libFuzzer.

FossilOrigin-Name: 824ad96f72cb0c948ec98aca9d17a7e6790c575f

9 years agoAdd a clarifying comment to the virtual table test module 'test8'.
mistachkin [Tue, 24 Nov 2015 01:17:01 +0000 (01:17 +0000)] 
Add a clarifying comment to the virtual table test module 'test8'.

FossilOrigin-Name: e92f97a6794440eb9d64e21218d39cb0e297a98e

9 years agoDo not try to eliminate No-ops at the end of VDBE program as this can cause
drh [Tue, 24 Nov 2015 00:49:44 +0000 (00:49 +0000)] 
Do not try to eliminate No-ops at the end of VDBE program as this can cause
problems for some DISTINCT handling algorithms, and does not improve
performance.  This also fixes an assertion fault found by libFuzzer.

FossilOrigin-Name: 19d9f9ce691963310fa73ac5ff728ea8dea9d2b2

9 years agoAdd experimental support for LIKE, GLOB and REGEXP to the virtual table interface.
dan [Mon, 23 Nov 2015 21:09:54 +0000 (21:09 +0000)] 
Add experimental support for LIKE, GLOB and REGEXP to the virtual table interface.

FossilOrigin-Name: 277a5b4027d4c2caba8143228a4f7d6df899dbb4

9 years agoFix an obscure memory leak found by libfuzzer that may occur under some circumstances...
dan [Sat, 21 Nov 2015 19:43:29 +0000 (19:43 +0000)] 
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

9 years agoFix over-length source code lines. No logic changes.
drh [Sat, 21 Nov 2015 17:27:42 +0000 (17:27 +0000)] 
Fix over-length source code lines.  No logic changes.

FossilOrigin-Name: 198d191b2f5ef7d63ac0093c701955c9052fd734

9 years agoDo not allow table-valued function syntax on ordinary tables and views as those
drh [Sat, 21 Nov 2015 13:24:46 +0000 (13:24 +0000)] 
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

9 years agoRefactor the VdbeCursor object. It is now slightly smaller and faster and is
drh [Fri, 20 Nov 2015 19:22:01 +0000 (19:22 +0000)] 
Refactor the VdbeCursor object.  It is now slightly smaller and faster and is
easier to understand.

FossilOrigin-Name: 9b1d174d862500a627840008ffac4c8419dc97e2

9 years agoIn the OP_Column opcode, only test the btree payload size for exceeding the
drh [Fri, 20 Nov 2015 13:33:56 +0000 (13:33 +0000)] 
In the OP_Column opcode, only test the btree payload size for exceeding the
string length limit if the payload does not fit on a single page.

FossilOrigin-Name: 35c7f6cba6febf2480de01fca9d61b8065bf1c12

9 years agoEnhancements to a comment in sqliteInt.h. No changes to code.
drh [Fri, 20 Nov 2015 13:17:29 +0000 (13:17 +0000)] 
Enhancements to a comment in sqliteInt.h.  No changes to code.

FossilOrigin-Name: 5446ae64d7f92444ca40aae2108015d1d77bc03f

9 years agoFix problems with the way the IsHiddenColumn() macro is defined.
drh [Thu, 19 Nov 2015 18:11:20 +0000 (18:11 +0000)] 
Fix problems with the way the IsHiddenColumn() macro is defined.

FossilOrigin-Name: 126b998cf163dcdd5a222634f1e929f04db3c700

9 years agoFix a problem with VACUUM and __hidden__ columns.
dan [Thu, 19 Nov 2015 18:09:05 +0000 (18:09 +0000)] 
Fix a problem with VACUUM and __hidden__ columns.

FossilOrigin-Name: 13995756ad8b80568aa2f74387788a8cab1123ef

9 years agoWhen manifesting a view as part of an DELETE or UPDATE, be sure to include
drh [Thu, 19 Nov 2015 17:55:11 +0000 (17:55 +0000)] 
When manifesting a view as part of an DELETE or UPDATE, be sure to include
the hidden columns in the manifestation.

FossilOrigin-Name: 28df5dc4a9569f388af2ee0d1f016afbea132277

9 years agoFix problems with INSERT INTO ... SELECT ... statements that write to tables with...
dan [Thu, 19 Nov 2015 16:46:46 +0000 (16:46 +0000)] 
Fix problems with INSERT INTO ... SELECT ... statements that write to tables with __hidden__ columns.

FossilOrigin-Name: 59bd0ec7d4327852ee8c0206b2c59d0a12484db8

9 years agoCreate the new TK_ASTERISK token to represent the "*" in "SELECT *". Formerly
drh [Thu, 19 Nov 2015 16:33:31 +0000 (16:33 +0000)] 
Create the new TK_ASTERISK token to represent the "*" in "SELECT *".  Formerly
that operator was TK_ALL, which was also used for UNION ALL.  Less confusion if
they operator symbols are distinct.

FossilOrigin-Name: 201ac6d449431dadc6b29faecd68b559bd64bc9f

9 years agoIf compiled with SQLITE_ENABLE_HIDDEN_COLUMNS, then columns in ordinary
drh [Thu, 19 Nov 2015 14:11:58 +0000 (14:11 +0000)] 
If compiled with SQLITE_ENABLE_HIDDEN_COLUMNS, then columns in ordinary
tables and views that have names beginning with "__hidden__" are omitted from
the "*" expansion in SELECT statements and from the automatic list of columns
following the table name in an INSERT INTO statement.

FossilOrigin-Name: 011904cad2be2ce34e2f37ffae8ff2f1044a2969

9 years agoOnly support the magic "__hidden__" column name prefix interpretation when hidden-columns-in-tables
drh [Thu, 19 Nov 2015 13:53:57 +0000 (13:53 +0000)] 
Only support the magic "__hidden__" column name prefix interpretation when
compiled with SQLITE_ENABLE_HIDDEN_COLUMNS.

FossilOrigin-Name: 5490646b2eb74ea8bd5ab2690f69b9c707a0165f

9 years agoFix a 10-year-old misguided attempt at parser performance improvement that
drh [Thu, 19 Nov 2015 13:21:31 +0000 (13:21 +0000)] 
Fix a 10-year-old misguided attempt at parser performance improvement that
actually made parsing slightly slower.

FossilOrigin-Name: 3833cbac0706ecac9a641d70b786d26f7e1a42b1

9 years agoGet the __hidden__ column mechanism working on views with INSTEAD OF triggers.
drh [Wed, 18 Nov 2015 21:22:02 +0000 (21:22 +0000)] 
Get the __hidden__ column mechanism working on views with INSTEAD OF triggers.

FossilOrigin-Name: 20c1e9ce75cc0b5f7456379f35a4fe24edd98088

9 years agoAdd tests for views to hidden.test.
dan [Wed, 18 Nov 2015 20:59:47 +0000 (20:59 +0000)] 
Add tests for views to hidden.test.

FossilOrigin-Name: 27d4b6f5756c7b19c00c95d46a77280c8b6f03a4

9 years agoHonor the "__hidden__" prefix on the columns of views.
drh [Wed, 18 Nov 2015 20:57:50 +0000 (20:57 +0000)] 
Honor the "__hidden__" prefix on the columns of views.

FossilOrigin-Name: 3071ba2bdbda7018d0a285eceb04b8527209ec1e

9 years agoAdd a test for the __hidden__ hack on this branch.
dan [Wed, 18 Nov 2015 20:07:12 +0000 (20:07 +0000)] 
Add a test for the __hidden__ hack on this branch.

FossilOrigin-Name: ebf4bbffec58111a670c46a9eb469bfd2440b0b1

9 years agoIf a table column name begins with "__hidden__" then do not include that
drh [Wed, 18 Nov 2015 18:43:15 +0000 (18:43 +0000)] 
If a table column name begins with "__hidden__" then do not include that
column in "*" expansions in SELECT statements, nor fill in that column in
an INSERT INTO that omits the column list.  <b>This branch is a
proof-of-concept only and is not intended to ever be merged into trunk.</b>

FossilOrigin-Name: 2dbffb3a3b20dba7d7d86c8ad2e34633f616c78a

9 years agoWhen using mmap mode on Win32, use a read-only mapping by default. Write to the datab...
mistachkin [Tue, 17 Nov 2015 21:42:32 +0000 (21:42 +0000)] 
When using mmap mode on Win32, use a read-only mapping by default. Write to the database file using WriteFile(). Unless SQLITE_MMAP_READWRITE is defined, in which case use a read/write mapping and write into the file using memcpy().

FossilOrigin-Name: 4f521b5bb36a1117db324e92dcf80abd2f1a5bc1

9 years agoWhen using mmap mode on unix, use a read-only mapping by default. Write to the databa...
dan [Tue, 17 Nov 2015 20:56:06 +0000 (20:56 +0000)] 
When using mmap mode on unix, use a read-only mapping by default. Write to the database file using write(). Unless SQLITE_MMAP_READWRITE is defined, in which case use a read/write mapping and write into the file using memcpy().

FossilOrigin-Name: 67c5d3c646c8198c8637069140aca952b802df25

9 years agoFix uninitialized variable in the command line shell.
mistachkin [Tue, 17 Nov 2015 19:17:14 +0000 (19:17 +0000)] 
Fix uninitialized variable in the command line shell.

FossilOrigin-Name: dc2ac024d31a898bbc3e7fc824d806e63e993234

9 years agoFix harmless compiler warning.
mistachkin [Tue, 17 Nov 2015 19:16:39 +0000 (19:16 +0000)] 
Fix harmless compiler warning.

FossilOrigin-Name: eea26b6caea37422c9b46a7a3a538b0c9575f392

9 years agoAdd testfixture command "vfs_current_time_int64". Returns the value returned by the...
dan [Mon, 16 Nov 2015 15:28:54 +0000 (15:28 +0000)] 
Add testfixture command "vfs_current_time_int64". Returns the value returned by the xCurrentTimeInt64 method of the default VFS.

FossilOrigin-Name: f79d5b1853b3d4316ea08de8206ffca33e44c395

9 years agoIn the shell tool, avoid testing if (sqlite3_vfs.xGetCurrentInt64) is NULL for a...
dan [Mon, 16 Nov 2015 08:54:10 +0000 (08:54 +0000)] 
In the shell tool, avoid testing if (sqlite3_vfs.xGetCurrentInt64) is NULL for a version 1 VFS. This field is only defined for version 2 and greater.

FossilOrigin-Name: ad5fcaa583ef743d143b6c030e0d78019709fe71

9 years agoFix the column name uniquifier so that it works with zero-length column names.
drh [Sun, 15 Nov 2015 11:13:49 +0000 (11:13 +0000)] 
Fix the column name uniquifier so that it works with zero-length column names.

FossilOrigin-Name: 791761ebac26c82ab67bdf867117ec5b5d8b20b0

9 years agoCode simplification in sqlite3ColumnsFromExprList(). Update the %z format
drh [Sat, 14 Nov 2015 22:04:22 +0000 (22:04 +0000)] 
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

9 years agoUse a hash table to improve the preformance of column name uniqueness checking.
drh [Sat, 14 Nov 2015 20:52:43 +0000 (20:52 +0000)] 
Use a hash table to improve the preformance of column name uniqueness checking.

FossilOrigin-Name: 5b08f29f458c600401860c7d70d8174cf61e69f8

9 years agoUse randomness to prevent showness in the generated-column-name uniqueness
drh [Sat, 14 Nov 2015 16:47:23 +0000 (16:47 +0000)] 
Use randomness to prevent showness in the generated-column-name uniqueness
checking.

FossilOrigin-Name: 6266712968a2cdcd6f5a3007d60c2cf1b3faf912

9 years agoFix a memory leak in the fuzzcheck utility.
drh [Fri, 13 Nov 2015 20:52:49 +0000 (20:52 +0000)] 
Fix a memory leak in the fuzzcheck utility.

FossilOrigin-Name: dfd6d9f4fbe902086f9158dfa5f37e781765a683

9 years agoAdd the "--enable-static-shell" option to the amalgamation autoconf script. If set...
dan [Fri, 13 Nov 2015 16:59:00 +0000 (16:59 +0000)] 
Add the "--enable-static-shell" option to the amalgamation autoconf script. If set (the default) the compiled shell tool is statically linked against sqlite3.o. Otherwise, it is linked against libsqlite3.so.

FossilOrigin-Name: 499a02a34316cada9e197ef1d2e77c4cd75c41be

9 years agoAdd the --transaction option to the sqldiff tool.
drh [Fri, 13 Nov 2015 13:15:42 +0000 (13:15 +0000)] 
Add the --transaction option to the sqldiff tool.

FossilOrigin-Name: 8882d1f3ef0fc53d7c19918c3af43c5bdd79e88f