]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
8 years agoDo not attempt to build the code in ext/expert/sqlite3expert.c if
dan [Tue, 9 Jan 2018 14:30:49 +0000 (14:30 +0000)] 
Do not attempt to build the code in ext/expert/sqlite3expert.c if
SQLITE_OMIT_VIRTUALTABLE is defined.

FossilOrigin-Name: ba967ad2e38590fe2a51e814a087140089be5e6a06a795a958e70a8a47f6350f

8 years agoAttempt to fix the fileio.c extension so that it builds on MinGW-64.
drh [Tue, 9 Jan 2018 14:27:58 +0000 (14:27 +0000)] 
Attempt to fix the fileio.c extension so that it builds on MinGW-64.

FossilOrigin-Name: a7446d3217d39c96c884fbfb294dd320378255f3bfb34e35d15ba6d7c6698f53

8 years agoFix a zipfile problem with adding new directories to an archive.
dan [Tue, 9 Jan 2018 10:29:34 +0000 (10:29 +0000)] 
Fix a zipfile problem with adding new directories to an archive.

FossilOrigin-Name: 5fed67033c9dd4492bf8cfcf98874284581f448d8cc84fa5470dde239f218375

8 years agoFix a problem in zipfile.c found by -fsanitize.
dan [Tue, 9 Jan 2018 07:16:51 +0000 (07:16 +0000)] 
Fix a problem in zipfile.c found by -fsanitize.

FossilOrigin-Name: 4fe697fa6c2b45aec60c33eff1ce2ea97b8a2ca124ef0c0059930269d25cdb2e

8 years agoAvoid a compiler warning when building with newer versions of MinGW
drh [Tue, 9 Jan 2018 02:27:13 +0000 (02:27 +0000)] 
Avoid a compiler warning when building with newer versions of MinGW

FossilOrigin-Name: cba0206a15f30313e16a08634995ebfd5d325d83affb859a215e72509f539b4e

8 years agoImprove portability of compile-time MinGW detection for the command line shell.
mistachkin [Tue, 9 Jan 2018 00:28:24 +0000 (00:28 +0000)] 
Improve portability of compile-time MinGW detection for the command line shell.

FossilOrigin-Name: 4a7236140cb0f40fa846da4673a0d56218def1929d58cf016909ce881a681140

8 years agoFix harmless compiler warnings.
mistachkin [Tue, 9 Jan 2018 00:26:39 +0000 (00:26 +0000)] 
Fix harmless compiler warnings.

FossilOrigin-Name: 1adf4e60391326ba699260402c06604ea25b456e903157ecb05017e7ea954fc4

8 years agoTest cases for sqlite3_normalize(). normalize
drh [Mon, 8 Jan 2018 20:04:57 +0000 (20:04 +0000)] 
Test cases for sqlite3_normalize().

FossilOrigin-Name: 658f42257d56a3562dfa8e55023c6e497f55c565cd751d942de3a9e0cb2fa708

8 years agoUpdate the zipfile module so that it matches the documentation.
dan [Mon, 8 Jan 2018 19:59:59 +0000 (19:59 +0000)] 
Update the zipfile module so that it matches the documentation.

FossilOrigin-Name: 7e7e472fa91a2bad2e521d4d67f176c8eb9edc1a07b283e425ea0fa2b6abba1f

8 years agoSpecial handling of the NULL keyword. Sometimes it is a literal, and sometimes
drh [Mon, 8 Jan 2018 19:29:28 +0000 (19:29 +0000)] 
Special handling of the NULL keyword.  Sometimes it is a literal, and sometimes
it is a keyword.

FossilOrigin-Name: db5d138e97f22ad4d4d11dbef96df93696ba0e557809066bc263ca3c3898f349

8 years agoAdd IN-operator normalizating and the SQLITE_NORMALIZE_CLI compile-time
drh [Mon, 8 Jan 2018 19:18:27 +0000 (19:18 +0000)] 
Add IN-operator normalizating and the SQLITE_NORMALIZE_CLI compile-time
option for generating a stand-alone program.

FossilOrigin-Name: d77dbb398afa80c1b3373c55f278491e83d5c80ddc22dbc303876bdcbc127df9

8 years agoFix problems in the sqlite3expert.c code revealed by -fsanitize.
dan [Mon, 8 Jan 2018 17:34:15 +0000 (17:34 +0000)] 
Fix problems in the sqlite3expert.c code revealed by -fsanitize.

FossilOrigin-Name: 7a93dd784bfdbf01927979a61643796e0901d9ac285fe4214677838def93a9a4

8 years agoAdd an "ifcapable trace {}" block to a test in fkey1.test that uses SQL
dan [Mon, 8 Jan 2018 17:12:54 +0000 (17:12 +0000)] 
Add an "ifcapable trace {}" block to a test in fkey1.test that uses SQL
tracing.

FossilOrigin-Name: 7182591d351dde22ed2f6a60521d1d7c10a610d702e79693412efc6938167be0

8 years agoRemove a superfluous define from the 'fileio' extension when compiled for Win32.
mistachkin [Mon, 8 Jan 2018 17:09:05 +0000 (17:09 +0000)] 
Remove a superfluous define from the 'fileio' extension when compiled for Win32.

FossilOrigin-Name: 6dcba6693f064b0e21360c5eab18abe4a1534f6699b5d7b92e60eab6be14c347

8 years agoFix a malloc/sqlite3_free mismatch in the shell tool code.
dan [Mon, 8 Jan 2018 17:05:32 +0000 (17:05 +0000)] 
Fix a malloc/sqlite3_free mismatch in the shell tool code.

FossilOrigin-Name: fe053b2ecdc04b918367fa503bf10292fd7cd84a6929670857b2e9153df4d1f9

8 years agoFirst code for an auxiliary function that will normalize an SQL statement.
drh [Mon, 8 Jan 2018 16:54:26 +0000 (16:54 +0000)] 
First code for an auxiliary function that will normalize an SQL statement.

FossilOrigin-Name: 84814aac81e54f03430f180926156ab0fc01e22bbce2bb228b698ea0d4a588ea

8 years agoFix compilation of 'sqltclsh.exe' for MSVC.
mistachkin [Mon, 8 Jan 2018 14:24:08 +0000 (14:24 +0000)] 
Fix compilation of 'sqltclsh.exe' for MSVC.

FossilOrigin-Name: abb112d9e1a51c1c2f15d1e5f3dc161c9a947841f69a56715f5f1c62603096b2

8 years agoAvoid the use of utimensat() on older unix platforms.
drh [Sun, 7 Jan 2018 23:28:10 +0000 (23:28 +0000)] 
Avoid the use of utimensat() on older unix platforms.

FossilOrigin-Name: 90cb01d8d6ac12d0b88f2952a75aeefa81ba66f5e4a5377fdd8b9f86aec8e927

8 years agoRemove the dependency on test_windirent.h from the generated shell.c file.
drh [Sun, 7 Jan 2018 21:58:17 +0000 (21:58 +0000)] 
Remove the dependency on test_windirent.h from the generated shell.c file.

FossilOrigin-Name: 0a50c9e3bb0dbdaaec819ac6453276ba287b475ea322918ddda1ab3a1ec4b58b

8 years agoModify the sqltclsh startup script to look for a properly formatted
drh [Sun, 7 Jan 2018 20:38:10 +0000 (20:38 +0000)] 
Modify the sqltclsh startup script to look for a properly formatted
SQLAR at the end of the executable.  Fix the CLI so that it automatically
links against appendvfs and so that the --append command-line option works.

FossilOrigin-Name: 67c4a8c6881e33b830aa27c80e7e3d697a4222939edd77cd5ca77ece16471ea4

8 years agoImproved comments on the sqlar.c and compress.c extensions that describe
drh [Sun, 7 Jan 2018 19:52:28 +0000 (19:52 +0000)] 
Improved comments on the sqlar.c and compress.c extensions that describe
the differences between the "zlib format" used by SQLAR, the raw deflate
format used by ZIP, and the custom format used by compress.c.  No changes
to code.

FossilOrigin-Name: c13415c5caf06eaa73086c500907451dfcdfd1354ac4a9ab63edb7255edbfa1b

8 years agoThe shell detects and opens ZIP archives using the zipfile extension.
drh [Sat, 6 Jan 2018 21:46:01 +0000 (21:46 +0000)] 
The shell detects and opens ZIP archives using the zipfile extension.

FossilOrigin-Name: 05c99eb8cefbb3366b6d4ae91e10aa0c82bdf5ea361f4b3375413783af9167ac

8 years agoIn the shell, include the ".archive" command only if compiling with
drh [Sat, 6 Jan 2018 19:19:50 +0000 (19:19 +0000)] 
In the shell, include the ".archive" command only if compiling with
SQLITE_HAVE_ZLIB.  Add ".archive" to the ".help" output.

FossilOrigin-Name: 366469f5603367fabcadfc9ffe8cd1e23c649fea49a560178ca0858a16a7e4d1

8 years agoBetter whitespace in the "CREATE TABLE sqlar()" statement for the ".ar"
drh [Sat, 6 Jan 2018 15:49:57 +0000 (15:49 +0000)] 
Better whitespace in the "CREATE TABLE sqlar()" statement for the ".ar"
command.

FossilOrigin-Name: 252ee55a7fc0b068b707af27bd912e684c28320996e78f0675217046b8c2fb49

8 years agoImproved output from ".schema --indent" when a column definition is followed
drh [Sat, 6 Jan 2018 15:46:20 +0000 (15:46 +0000)] 
Improved output from ".schema --indent" when a column definition is followed
by a comment.

FossilOrigin-Name: 87da7efff07327278b1437f862ed8683c2d5d6ada7ea7461601a58f9762646b4

8 years agoRemove a trailing tab from the Makefile for MSVC.
mistachkin [Sat, 6 Jan 2018 14:44:29 +0000 (14:44 +0000)] 
Remove a trailing tab from the Makefile for MSVC.

FossilOrigin-Name: 00cc26e34d2b81f140b031aa2f9ae0e2a4835cdd261d68f94b3e18a1388ca73d

8 years agoMinor tweaks to the Makefile for MSVC.
mistachkin [Sat, 6 Jan 2018 14:43:33 +0000 (14:43 +0000)] 
Minor tweaks to the Makefile for MSVC.

FossilOrigin-Name: 2f6cc5d8a0d9d961d1daf46e8725f7373f740afa788cf99ede9689f49d3a54ec

8 years agoAdd the appendvfs extension and code for the sqltclsh.exe executable.
drh [Sat, 6 Jan 2018 13:42:27 +0000 (13:42 +0000)] 
Add the appendvfs extension and code for the sqltclsh.exe executable.

FossilOrigin-Name: b0a43e325c53ec0df50fd41acffbbee65eac47b9318868e6959cd39da66fa8d6

8 years agoFix the appendvfs so that it leaves sqlite3_file->pMethods as NULL if it appendvfs
drh [Sat, 6 Jan 2018 13:33:21 +0000 (13:33 +0000)] 
Fix the appendvfs so that it leaves sqlite3_file->pMethods as NULL if it
fails to open.

FossilOrigin-Name: 46b341e3ad11b807ae50f001b970299de7ea0d523dbb639ee10f1d5aca5d958b

8 years agoAdd sqltclsh.exe to the windows makefile.
drh [Sat, 6 Jan 2018 04:34:05 +0000 (04:34 +0000)] 
Add sqltclsh.exe to the windows makefile.

FossilOrigin-Name: a6d5c7c2aabd70b4fb2bd8f6278f70272a5bd166adf2f7225ea582e10a46fafa

8 years agoMake sure i64 and u64 typedefs are available throughout shell.c.
drh [Fri, 5 Jan 2018 21:01:37 +0000 (21:01 +0000)] 
Make sure i64 and u64 typedefs are available throughout shell.c.

FossilOrigin-Name: 656fb5aab32f40412389e43de209867cedee1589533949cc8c01ba24218ea434

8 years agoFix the shell.c.in amalgamator script so that it avoids generating
drh [Fri, 5 Jan 2018 20:30:54 +0000 (20:30 +0000)] 
Fix the shell.c.in amalgamator script so that it avoids generating
redundant typedef statements.

FossilOrigin-Name: 6c53c740cb4f62305689ea0a73beca83e71ed86707094e850bed975965c8c9f2

8 years agoMinGW does not define the S_ISLNK macro; therefore, define it in the shell when needed.
mistachkin [Fri, 5 Jan 2018 20:26:06 +0000 (20:26 +0000)] 
MinGW does not define the S_ISLNK macro; therefore, define it in the shell when needed.

FossilOrigin-Name: 73023febbe57495a22db05904bd6ddff439d6c25970cbe87e0ba4a923f3e8a29

8 years agoSkip running the 'zipfile' test if the necessary static package cannot be loaded.
mistachkin [Fri, 5 Jan 2018 20:13:33 +0000 (20:13 +0000)] 
Skip running the 'zipfile' test if the necessary static package cannot be loaded.

FossilOrigin-Name: 5bc816ec4010c20407396a1051e9f9b0a360ca27c0a99dafa867225cf974e306

8 years agoFix shell compilation with MinGW by including the 'dirent.h' header.
mistachkin [Fri, 5 Jan 2018 20:08:46 +0000 (20:08 +0000)] 
Fix shell compilation with MinGW by including the 'dirent.h' header.

FossilOrigin-Name: dfe510b51046a53c7f5c54fe73ec9de3364923eabd4b909c11984552e6bea406

8 years agoFix the autoconf makefile so that it builds testfixture correctly.
drh [Fri, 5 Jan 2018 19:49:54 +0000 (19:49 +0000)] 
Fix the autoconf makefile so that it builds testfixture correctly.

FossilOrigin-Name: fbfe04c0b4f261789cbda3d2e98d12508181c283eab0bb757b081f0383e891bd

8 years agoSync up the autoconf Makefile for MSVC.
mistachkin [Fri, 5 Jan 2018 19:28:16 +0000 (19:28 +0000)] 
Sync up the autoconf Makefile for MSVC.

FossilOrigin-Name: da8712bdb8f69dee9efb42b74d0b2ec10043f281c5f93e2724078bdf1370ecb1

8 years agoThe 'releasetest' tool should pass the TCLDIR macro for MSVC to nmake.
mistachkin [Fri, 5 Jan 2018 19:27:19 +0000 (19:27 +0000)] 
The 'releasetest' tool should pass the TCLDIR macro for MSVC to nmake.

FossilOrigin-Name: eaa9c0dda73808f1458f9968be59947636fbd4781c9fc535eb50bcaf790093c1

8 years agoFor the MSVC Makefile, the 'sqlite3_checker.exe' target requires the Tcl library.
mistachkin [Fri, 5 Jan 2018 19:25:52 +0000 (19:25 +0000)] 
For the MSVC Makefile, the 'sqlite3_checker.exe' target requires the Tcl library.

FossilOrigin-Name: 38109a47ffa977f1f962af2e183285d4e5db6fac2344868c5f1de64779dd0839

8 years agoAdd the ".ar" command to the command-line shell.
drh [Fri, 5 Jan 2018 19:01:05 +0000 (19:01 +0000)] 
Add the ".ar" command to the command-line shell.

FossilOrigin-Name: 148b8aee78e40cab9a758a920589bd3ca8fc1c45cc93598bc50d96b85cd17e6c

8 years agoFix a bug introduced by efforts to reduce compiler warnings in sqlar-shell-support
drh [Fri, 5 Jan 2018 18:51:25 +0000 (18:51 +0000)] 
Fix a bug introduced by efforts to reduce compiler warnings in
check-in [364ac333b030f0]

FossilOrigin-Name: 1d6cee9ad448b10e69f351ef9dbec09110c5b189cba8734e637f41abe8f35bf8

8 years agoIn the Makefile for MSVC, the default target should not include binaries that link...
mistachkin [Fri, 5 Jan 2018 17:40:38 +0000 (17:40 +0000)] 
In the Makefile for MSVC, the default target should not include binaries that link against the Tcl library.

FossilOrigin-Name: 5c6d0a1d58533feb4ea6926f4d3611664a275ad216492b424056276da38e84a2

8 years agoMore adjustments to MSVC Makefile dependencies for zlib.
mistachkin [Fri, 5 Jan 2018 17:12:13 +0000 (17:12 +0000)] 
More adjustments to MSVC Makefile dependencies for zlib.

FossilOrigin-Name: bb650e5d14642b925c5ea65ba7991b35c4e941405d2557d542b99c66ca4bc130

8 years agoFix compiler warnings.
mistachkin [Fri, 5 Jan 2018 17:10:49 +0000 (17:10 +0000)] 
Fix compiler warnings.

FossilOrigin-Name: 19aabccfe34c956599f33cd3ddc846816adc06784c2496838f1ef53059e038e5

8 years agoFix missing dependencies for shell.c in all makefiles.
drh [Fri, 5 Jan 2018 16:23:43 +0000 (16:23 +0000)] 
Fix missing dependencies for shell.c in all makefiles.

FossilOrigin-Name: 45495d3e256fef4d0669754726878ed17248fc781397ebb0421149ee9492f977

8 years agoIn the Makefile for MSVC, only attempt to link against Tcl when it is needed. Also...
mistachkin [Fri, 5 Jan 2018 16:05:51 +0000 (16:05 +0000)] 
In the Makefile for MSVC, only attempt to link against Tcl when it is needed.  Also, only compile 'zipfile.c' when use of zlib is enabled.

FossilOrigin-Name: a33ad33cf031edee273afa4735c8564870465be22962a9c277e4ac43a307ff2c

8 years agoAdd some missing #ifdefs for building without zlib.
mistachkin [Fri, 5 Jan 2018 16:03:52 +0000 (16:03 +0000)] 
Add some missing #ifdefs for building without zlib.

FossilOrigin-Name: c63fb1700c0f67d90857b1f3859c203880d0939f356a64d8ae7cafc814ea72bf

8 years agoFix compiler warnings.
drh [Fri, 5 Jan 2018 14:55:43 +0000 (14:55 +0000)] 
Fix compiler warnings.

FossilOrigin-Name: 364ac333b030f0e3372937df723f1098183da87913ba0e8ae162864ee24a50d3

8 years agoFix an LSM problem causing the wrong amount of "auto-work" to be performed
dan [Fri, 5 Jan 2018 11:34:18 +0000 (11:34 +0000)] 
Fix an LSM problem causing the wrong amount of "auto-work" to be performed
under fairly obscure circumstances.

FossilOrigin-Name: a4876672edea4e96103efd2463ce9a34a0b994a8744c941660940578aafbd454

8 years agoFix an LSM crash that could occur if LSM_CONFIG_AUTOFLUSH was set to 0.
dan [Fri, 5 Jan 2018 07:57:54 +0000 (07:57 +0000)] 
Fix an LSM crash that could occur if LSM_CONFIG_AUTOFLUSH was set to 0.

FossilOrigin-Name: 05346f83d587e6049da0e8ec5f62c749daa9e80359cf48f8c37e333e6a1e7d2a

8 years agoRevise detection of 'tclsh.exe' in the Makefile for MSVC.
mistachkin [Fri, 5 Jan 2018 01:22:37 +0000 (01:22 +0000)] 
Revise detection of 'tclsh.exe' in the Makefile for MSVC.

FossilOrigin-Name: 45fabd868dc690894f5a911d373a3d6410ba2d95d177307a42009afc8ae296cc

8 years agoEnhance the 'zlib' build target for MSVC.
mistachkin [Fri, 5 Jan 2018 01:00:17 +0000 (01:00 +0000)] 
Enhance the 'zlib' build target for MSVC.

FossilOrigin-Name: 0bc3b76ec9b83f3034e282ea0369a53673e2cb64dde42e8cf5e800f6d642d527

8 years agoAdd missing #ifdef.
mistachkin [Fri, 5 Jan 2018 00:53:03 +0000 (00:53 +0000)] 
Add missing #ifdef.

FossilOrigin-Name: a0e18aea0950f5ebdf4112f826ff64d24e8660b341031132dcb65bb15579ef1c

8 years agoIn the 'fileio' extension code for Win32, use the FILE_FLAG_BACKUP_SEMANTICS flag...
mistachkin [Thu, 4 Jan 2018 23:49:08 +0000 (23:49 +0000)] 
In the 'fileio' extension code for Win32, use the FILE_FLAG_BACKUP_SEMANTICS flag when setting the file times, just in case the file is actually a directory.

FossilOrigin-Name: 4f3444060057127bce81787ed83cb5225cdbdd577596bc3fb06a40be2208f238

8 years agoRemove 'timespec' related code from the shell that has no effect and a (now) superflu...
mistachkin [Thu, 4 Jan 2018 22:50:52 +0000 (22:50 +0000)] 
Remove 'timespec' related code from the shell that has no effect and a (now) superfluous 'timespec' typedef from the Win32 dirent header file.

FossilOrigin-Name: 57dac995dd028e4b7c8ce6806f5769831715c1bb9b886318fceb3fa50563d537

8 years agoGet the shell enhancements compiling with MSVC.
mistachkin [Thu, 4 Jan 2018 22:46:08 +0000 (22:46 +0000)] 
Get the shell enhancements compiling with MSVC.

FossilOrigin-Name: 335387f9e0d4569097d34cd99cd332b38a282e9b7ae25f088eb47df5c25837ef

8 years agoMerge in all recent trunk enhancements.
drh [Thu, 4 Jan 2018 19:54:55 +0000 (19:54 +0000)] 
Merge in all recent trunk enhancements.

FossilOrigin-Name: 406f79183736b6ad360169b837172afef2c82a4312f5787db08c54167a44b15e

8 years agoRemove the snarky "_supported_" qualifier from the name of the
drh [Thu, 4 Jan 2018 19:20:37 +0000 (19:20 +0000)] 
Remove the snarky "_supported_" qualifier from the name of the
sqlite_offset() SQL function.

FossilOrigin-Name: a6eee0fcd89d3958f8720ebdb5f0a8558b4795d747128091dae283eb81c4f74f

8 years agoFix a broken documentation hyperlink. No code changes.
drh [Thu, 4 Jan 2018 16:40:44 +0000 (16:40 +0000)] 
Fix a broken documentation hyperlink.  No code changes.

FossilOrigin-Name: d91e3f3d343d281af374dd23eea333e61228539023ad5c5aea622085e5863bc7

8 years agoFix compiler warnings on Windows.
drh [Wed, 3 Jan 2018 23:54:18 +0000 (23:54 +0000)] 
Fix compiler warnings on Windows.

FossilOrigin-Name: 512b8e40c4ce2066d230b5f007bd704dc3577e21c55131ef07d90bf2fcf91b40

8 years agoNew test cases and fixes for minor problems.
drh [Wed, 3 Jan 2018 23:40:02 +0000 (23:40 +0000)] 
New test cases and fixes for minor problems.

FossilOrigin-Name: e0da2cc382e0db33d0423372133115f52c77bd0093dbf816c7e88a0aad5f6582

8 years agoMiscellaneous code and comment cleanup.
drh [Wed, 3 Jan 2018 22:48:38 +0000 (22:48 +0000)] 
Miscellaneous code and comment cleanup.

FossilOrigin-Name: fa6069fb3b0a4411fd6661dec7de40ece3064a2fe4b94ebfbda9e5e524e04e86

8 years agoReplace sqlite3_memdb_config() with sqlite3_deserialize(). Remove the
drh [Wed, 3 Jan 2018 19:03:31 +0000 (19:03 +0000)] 
Replace sqlite3_memdb_config() with sqlite3_deserialize().  Remove the
"db memdb" command from the TCL interface, replacing it with "db serialize"
and "db deserialize".

FossilOrigin-Name: 2f6e9df9f0c5a9e5b1acb99cfa9486850cc1822d35b0989e779a7a10f3b1f1ac

8 years agoReplace the sqlite3_memdb_ptr() interface with the more general
drh [Wed, 3 Jan 2018 16:49:52 +0000 (16:49 +0000)] 
Replace the sqlite3_memdb_ptr() interface with the more general
sqlite3_serialize() interface.

FossilOrigin-Name: 8cf2ed4eff6d2e0958656e23384b05ead2128b678b0b69a591878af4190cd077

8 years agoSimplify the "sqlite3" command in the TCL interface. The filename is now
drh [Wed, 3 Jan 2018 13:20:02 +0000 (13:20 +0000)] 
Simplify the "sqlite3" command in the TCL interface.  The filename is now
optional.  There is a new --memdb option with an argument that is the blob
to which the database content should be initialized.

FossilOrigin-Name: 47398ae77236a92f6b9345aa397361b6df127a9a2895c0771d506b0be10822b9

8 years agoFix typo in the Makefile for MSVC.
mistachkin [Wed, 3 Jan 2018 12:39:35 +0000 (12:39 +0000)] 
Fix typo in the Makefile for MSVC.

FossilOrigin-Name: e5c6ade8ee596eaffd98d1d7ce9c7c968cd2d45f206603b894026e7ad7ac15b6

8 years agoAdd another test case (found by OSSFuzz) for the problem fixed in
drh [Wed, 3 Jan 2018 01:47:30 +0000 (01:47 +0000)] 
Add another test case (found by OSSFuzz) for the problem fixed in
check-in [2846458a] and described by ticket [dc3f932f5a147771].
No changes to code.

FossilOrigin-Name: 4165fae920a1176c68bfaa1f2cfe17df7f8dd8793519d458b71e3e63670b5495

8 years agoAdd support for the "memdb" VFS and the sqlite3_memdb_ptr() and
drh [Wed, 3 Jan 2018 01:28:46 +0000 (01:28 +0000)] 
Add support for the "memdb" VFS and the sqlite3_memdb_ptr() and
sqlite3_memdb_config() interfaces, to enable an SQLite database to be
manipulated as an in-memory object.

FossilOrigin-Name: fb2ac2d2fa6374084f3325b41b257c7a3ace43aade4b666ec4be93b6b70dc39a

8 years agoFix code indentation. No logic changes.
drh [Tue, 2 Jan 2018 21:29:42 +0000 (21:29 +0000)] 
Fix code indentation.  No logic changes.

FossilOrigin-Name: e115f2583499df0c7ee991d372bed4b89aa717b10a4e4b10977864390cb4fc11

8 years agoIn the constraint resolution logic, be careful not to cache column values
drh [Tue, 2 Jan 2018 18:11:11 +0000 (18:11 +0000)] 
In the constraint resolution logic, be careful not to cache column values
in registers whose initialization might be bypassed by an OP_NoConflict opcode.
Fix for ticket [dc3f932f5a147771] reported by OSSFuzz.

FossilOrigin-Name: 2846458af5d029a8e4fdcc8f50873a44e57897bbfe6aee8a23a01ffc34c5579f

8 years agoEnhance the memvfs extension so that it can be read/write.
drh [Tue, 2 Jan 2018 16:02:50 +0000 (16:02 +0000)] 
Enhance the memvfs extension so that it can be read/write.

FossilOrigin-Name: 04c9197d589666299aef86ee6a56df63448c050274c9fba4af94f932752be237

8 years agoUpdates to the sqlite3_file_control() documentation. No changes to code.
drh [Tue, 2 Jan 2018 13:48:48 +0000 (13:48 +0000)] 
Updates to the sqlite3_file_control() documentation.  No changes to code.

FossilOrigin-Name: 240e32ab1f2a18e3c9b92f577b1cc8f8ecb4c68c44eac863d859491e042cb72a

8 years agoDo not attempt to use pragma_module_list in the command-line shell unless
drh [Tue, 2 Jan 2018 12:50:40 +0000 (12:50 +0000)] 
Do not attempt to use pragma_module_list in the command-line shell unless
it has been compiled with -DSQLITE_INTROSPECTION_PRAGMAS.

FossilOrigin-Name: 39ca5fcd31c902cbade4da05125b0dbf2bc5e2b8901af1645f113c9d3dbc8209

8 years agoThe ".schema" command in the command-line shell now shows the structure of
drh [Tue, 2 Jan 2018 00:04:37 +0000 (00:04 +0000)] 
The ".schema" command in the command-line shell now shows the structure of
table-valued functions and eponymous virtual tables if they are named on the
".schema" command line.  Example:  ".schema sql%" shows the structure of
the "sqlite_dbstat" and "sqlite_stmt" virtual tables.

FossilOrigin-Name: f80f6651df0b2843c6c9619a8f3e05c56cd50363402800a2e166e6eb664f7768

8 years agoImproved name quoting and escaping in the auxiliary column info section
drh [Mon, 1 Jan 2018 21:49:43 +0000 (21:49 +0000)] 
Improved name quoting and escaping in the auxiliary column info section
of the ".schema" output for views and virtual tables.

FossilOrigin-Name: d64b14e37d9624bf5d86059ddd091170d8e6d341a8043f84548b9b3dbb96a908

8 years agoIn the output of ".schema", show the column names of virtual tables and
drh [Mon, 1 Jan 2018 21:28:25 +0000 (21:28 +0000)] 
In the output of ".schema", show the column names of virtual tables and
views in a separate comment.

FossilOrigin-Name: 2234a87fa905312b23f46d52e06cff7cacbf23b187e16c4398a42e6bdae0ee9f

8 years agoMinor simplification to the ".schema" logic in the command-line shell.
drh [Mon, 1 Jan 2018 20:11:23 +0000 (20:11 +0000)] 
Minor simplification to the ".schema" logic in the command-line shell.

FossilOrigin-Name: add45c47288248ca3745e0fceb5e0d9062a852d173d93ff2ff1a0f8fdf3237dc

8 years agoEnable the introspection pragmas for command-line shell builds.
drh [Mon, 1 Jan 2018 19:33:12 +0000 (19:33 +0000)] 
Enable the introspection pragmas for command-line shell builds.

FossilOrigin-Name: 0b04223f256f5c1e06fa6e899727815ebf650f2dfcf8f36d6cbfb6cb62d4ead8

8 years agoHave zipfile support DELETE commands.
dan [Sat, 30 Dec 2017 18:32:27 +0000 (18:32 +0000)] 
Have zipfile support DELETE commands.

FossilOrigin-Name: 01d4e866fb7b01aeada537d41c4a47747c7810e2028f51077ee5b8b78c348954

8 years agoRearrange things a bit so that writing to a zipfile does not invert the order
dan [Sat, 30 Dec 2017 14:26:29 +0000 (14:26 +0000)] 
Rearrange things a bit so that writing to a zipfile does not invert the order
of objects it contains.

FossilOrigin-Name: f69e8194bfa7de436c96028730ebd57f186d2e6207792e172e1aa38c7f4211c9

8 years agoUpdate ext/misc/zipfile.c to support creating and adding entries to existing
dan [Fri, 29 Dec 2017 20:19:03 +0000 (20:19 +0000)] 
Update ext/misc/zipfile.c to support creating and adding entries to existing
zip archives.

FossilOrigin-Name: 2dec2dec592c0726ebe87b841b9c8d493dea7074a99f278eb1bf0b744d658a9d

8 years agoAdd support for the sqlite_unsupported_offset() SQL function if and only
drh [Fri, 29 Dec 2017 17:21:21 +0000 (17:21 +0000)] 
Add support for the sqlite_unsupported_offset() SQL function if and only
if compiled using -DSQLITE_ENABLE_OFFSET_SQL_FUNC.  Use that definition
when compiling the command-line shell.

FossilOrigin-Name: 4f1f1f521ae6da96b899e10bfeff6bc1ab7a45de0705076febaae20b441f48c6

8 years agoStricter test cases. location-function
drh [Fri, 29 Dec 2017 16:37:33 +0000 (16:37 +0000)] 
Stricter test cases.

FossilOrigin-Name: 9406c0a685fd5ff3516a66402b0514a1440652822a5eecf0b7af85929f3079e8

8 years agoFix a typo in the MSVC makefile.
drh [Fri, 29 Dec 2017 15:19:03 +0000 (15:19 +0000)] 
Fix a typo in the MSVC makefile.

FossilOrigin-Name: 89e5720a8d8d46d4e2f16f15678e91336117e64abc977174e2b345a30308d0d2

8 years agoChange the function name to sqlite_unsupported_offset(X). Only enable the
drh [Fri, 29 Dec 2017 15:04:49 +0000 (15:04 +0000)] 
Change the function name to sqlite_unsupported_offset(X).  Only enable the
function if compiled with -DSQLITE_ENABLE_OFFSET_SQL_FUNC.  The makefiles add
that definition to shell builds.

FossilOrigin-Name: 7a7f826e324b1a2c332e2f1d0740fd0babffcaca6275a798572f02ad367b99ab

8 years agoEnhance location(X) so that it works with indexes and WITHOUT ROWID tables.
drh [Fri, 29 Dec 2017 14:33:54 +0000 (14:33 +0000)] 
Enhance location(X) so that it works with indexes and WITHOUT ROWID tables.
The function might return an offset to the main table or to an index,
depending on whether the column X would be loaded from the main table or
from the index.

FossilOrigin-Name: dd94d6a880dfec4bddd247239b815b84964f804d24841e25f33f1d46a4b5274d

8 years agoMerge recent enhancements from trunk.
drh [Fri, 29 Dec 2017 13:35:09 +0000 (13:35 +0000)] 
Merge recent enhancements from trunk.

FossilOrigin-Name: 6251e438f2a76170fd1e95aa512a46086ed88ab93b9b97a1dba97c4558689305

8 years agoAdd test cases for the undocumented behavior of duplicate columns on an
drh [Fri, 29 Dec 2017 12:50:43 +0000 (12:50 +0000)] 
Add test cases for the undocumented behavior of duplicate columns on an
INSERT or UPDATE.

FossilOrigin-Name: f4349c0c26611de8a7d5beb99431a575cf531cdeb0ca2413efabcf0a61e6f424

8 years agoThe output of sqlite3_trace() now shows each command of a trigger as it is
drh [Wed, 27 Dec 2017 22:09:53 +0000 (22:09 +0000)] 
The output of sqlite3_trace() now shows each command of a trigger as it is
evaluated.  This feature involved major changes to the parser, such as
removing the ExprSpan object and replacing it with a new mechanism for
capturing the original SQL text of phrases in the input SQL.

FossilOrigin-Name: 0fdf97efe5df745510c6b4b377a8ee5683a3a237630bfbd0f56e57c7c6e5b246

8 years agoOmit all sqlite3_trace() output from the triggers associated with span-refactor
drh [Wed, 27 Dec 2017 21:30:34 +0000 (21:30 +0000)] 
Omit all sqlite3_trace() output from the triggers associated with
foreign key constraints.

FossilOrigin-Name: fda08e3d10cc850664a356efdafcfc68187053849e1b00991b0b35d892a6776b

8 years agoImprove the shell tool ".ar --list --verbose" command.
dan [Wed, 27 Dec 2017 21:13:21 +0000 (21:13 +0000)] 
Improve the shell tool ".ar --list --verbose" command.

FossilOrigin-Name: b64681a644c419bb98d00980a6cb56ef5a0aff5ef5321955631f0b4c88aac283

8 years agoShow the text of individual statements within a trigger, as they
drh [Wed, 27 Dec 2017 20:38:35 +0000 (20:38 +0000)] 
Show the text of individual statements within a trigger, as they
execute, as comments in the output from sqlite3_trace() and sqlite3_trace_v2().

FossilOrigin-Name: fe3d2b97d8945e6a9636472f77bcdc92cc5dda8b3e6e3a4fcbdd0a212ea5b9aa

8 years agoAdd and use the internal sqlite3DbSpanDup() interface.
drh [Wed, 27 Dec 2017 19:43:22 +0000 (19:43 +0000)] 
Add and use the internal sqlite3DbSpanDup() interface.

FossilOrigin-Name: a8e1545cb7aacb6a26a8c92a3ad4a3d584d150c3a00d2828c8adbb1ee19fcb6d

8 years agoMerge recent enhancements from trunk.
drh [Wed, 27 Dec 2017 19:27:26 +0000 (19:27 +0000)] 
Merge recent enhancements from trunk.

FossilOrigin-Name: 76373091354f27577e5235e96cfaa4b31429a38d1e0e1d6e094c4cc323b92a0a

8 years agoHave the shell tool ".ar --list" and ".ar --extract" commands support zip
dan [Wed, 27 Dec 2017 18:54:11 +0000 (18:54 +0000)] 
Have the shell tool ".ar --list" and ".ar --extract" commands support zip
files. Currently the "-zip" switch is required.

FossilOrigin-Name: a532a0f6fd59e81086d46f09151ba7fb26725198231d902c71d0f95cb01dbe91

8 years agoEnhance the Lemon parser generator so that it creates a faster parser at the
drh [Wed, 27 Dec 2017 18:19:06 +0000 (18:19 +0000)] 
Enhance the Lemon parser generator so that it creates a faster parser at the
cost of slightly larger parser tables.  Add the ability to measure coverage
of the generated state machine when compiling with the -DYYCONVERGE option.
In SQLite, add the SQLITE_TESTCTRL_PARSER_COVERAGE test-control to query the
new parser coverage feature.

FossilOrigin-Name: 1b22b42e59793af19c69a2e5f6822883cc2687d4a0d9b9280bbff885276c6baa

8 years agoThe previous check-in had an error in the coverage reporting logic. lemon-improvements
drh [Wed, 27 Dec 2017 17:36:58 +0000 (17:36 +0000)] 
The previous check-in had an error in the coverage reporting logic.

FossilOrigin-Name: ec9b19eb652e81cd3c8a5595eb39aac3aca4abe72136c4b65c9cc257594a9c92

8 years agoChange the coverage measurement logic in the lemon-generated parser so that
drh [Wed, 27 Dec 2017 17:14:50 +0000 (17:14 +0000)] 
Change the coverage measurement logic in the lemon-generated parser so that
it only checks for coverage of state/lookahead pairs that are valid syntax.
It turns out that some states are unreachable if the lookahead is not valid
syntax, because the states are only reachable through a shift following a
reduce, and the reduce does not happen if the lookahead is a syntax error.

FossilOrigin-Name: 9dce46508772bd0f9e940c4d44933154044bb58c1b3511dd0143287bf795dd6b

8 years agoIn the lemon-generated parser, do not report the End-of-input character and
drh [Wed, 27 Dec 2017 16:13:22 +0000 (16:13 +0000)] 
In the lemon-generated parser, do not report the End-of-input character and
the wildcard character as missed coverage.

FossilOrigin-Name: 3fe964873da16c0e0b1c4f1945f965d4137df7a307acd6a3eb6585ffbaa2afd1

8 years agoIn LEMON, fix an off-by-one error that can make the lookahead table one
drh [Wed, 27 Dec 2017 15:21:16 +0000 (15:21 +0000)] 
In LEMON, fix an off-by-one error that can make the lookahead table one
byte too smal.

FossilOrigin-Name: 93792bc58a2eccc7e07b14307388350bb376db32c5055b79a44e4fa8ff91d58e