]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
7 years agoAdd new interfaces sqlite3_result_pointer(), and branch-3.8.6
drh [Fri, 21 Jul 2017 03:23:38 +0000 (03:23 +0000)] 
Add new interfaces sqlite3_result_pointer(), and
sqlite3_value_pointer() and use them to transfer the eponymous FTS3 column
pointer to the snippet() and offsets() routines.  This is a cherry-pick
of [f0f492245e95], which is in turn inspired by check-in [72de49f2].

FossilOrigin-Name: a66a5b397b1e1c456df40a5407c4a41d2f116d0dc5dd2e9c99b878d2026c566b

10 years agoPrevent a virtual table from being destroyed while it is in use. Also: replace Vdbe...
dan [Thu, 21 May 2015 17:24:32 +0000 (17:24 +0000)] 
Prevent a virtual table from being destroyed while it is in use. Also: replace Vdbe.inVtabMethod with sqlite3.nVDestroy.  Simplify the EXPLAIN output for P4.pVtab to only show the sqlite3_vtab pointer. Cherrypick of [cbeb9a1aed8c].

FossilOrigin-Name: b3bb660af9472e2c511d1fe87b5193256f74c0db

10 years agoAvoid ever writing before the start of an allocated buffer in the DIRECT_OVERFLOW_REA...
dan [Thu, 21 May 2015 17:21:05 +0000 (17:21 +0000)] 
Avoid ever writing before the start of an allocated buffer in the DIRECT_OVERFLOW_READ code. Fix for [e3a290961a6]. Cherrypick of [c3c15d20c691].

FossilOrigin-Name: 31b13eb52894db75b52b6419bd9ec980b4c3ac43

10 years agoFix a problem in test file e_reindex.test. Cherrypick of [5b3de9390f2f].
dan [Wed, 20 May 2015 20:50:59 +0000 (20:50 +0000)] 
Fix a problem in test file e_reindex.test. Cherrypick of [5b3de9390f2f].

FossilOrigin-Name: 80633682d714e5bedc129d8f579a46cc7c2040e6

10 years agoFix a problem causing the fts3 integrity-check to fail if run inside a transaction...
dan [Wed, 20 May 2015 20:34:37 +0000 (20:34 +0000)] 
Fix a problem causing the fts3 integrity-check to fail if run inside a transaction. Cherrypick of [3b925189a75e].

FossilOrigin-Name: 7d7d633c71bb36bed98bc2c77d3268cc26fbac3e

10 years agoEnsure that tables names are dequoted exactly once by the trigger and FK logic. Cherr...
dan [Wed, 20 May 2015 20:30:37 +0000 (20:30 +0000)] 
Ensure that tables names are dequoted exactly once by the trigger and FK logic. Cherrypick of [59e92bd9521f] and [9d887b92f808].

FossilOrigin-Name: bd357739d74bfc97064e515645bce0834e586649

10 years agoFix an obscure problem with "INSERT INTO tbl(cols) SELECT" statements where the SELEC...
dan [Wed, 20 May 2015 20:27:00 +0000 (20:27 +0000)] 
Fix an obscure problem with "INSERT INTO tbl(cols) SELECT" statements where the SELECT is a compound with an ORDER BY and "cols" is a strict subset of tbl's columns. Cherrypick of [718d5d0eab04].

FossilOrigin-Name: 3cd2b7722186ad2b2a581b7f7e7782c59536e523

10 years agoFix a potential NULL pointer deference on a corrupt database schema. Cherrypick of...
dan [Wed, 20 May 2015 20:24:10 +0000 (20:24 +0000)] 
Fix a potential NULL pointer deference on a corrupt database schema. Cherrypick of [dc61b292d8ea].

FossilOrigin-Name: 7f3943fb01490180055312363cdd8a47642f4e9d

10 years agoFix a bug caused by cherrypicking from a branch that assumes sqlite3_stricmp() can...
dan [Wed, 20 May 2015 20:21:49 +0000 (20:21 +0000)] 
Fix a bug caused by cherrypicking from a branch that assumes sqlite3_stricmp() can handle NULL arguments.

FossilOrigin-Name: 2c649cdf7e058cf490597ffbddd5dc1eb5c3b346

10 years agoWhen parsing the schema, ignore any SQL that does not begin with "CREATE". Cherrypick...
dan [Wed, 20 May 2015 19:57:02 +0000 (19:57 +0000)] 
When parsing the schema, ignore any SQL that does not begin with "CREATE". Cherrypick of [d3c00d61581c].

FossilOrigin-Name: 0da229b81ad29d731789c86abadf2abc9bfcd738

10 years agoDetect and report oversized records constructed from multiple zeroblobs. Cherrypick...
dan [Wed, 20 May 2015 19:53:17 +0000 (19:53 +0000)] 
Detect and report oversized records constructed from multiple zeroblobs. Cherrypick of [9e139afd9211].

FossilOrigin-Name: 4a08f6b8bb0d4f5e565fd05a48d0b1af04b9eb2d

10 years agoDo not allow virtual table constructors to be called recursively. Cherrypick of ...
dan [Wed, 20 May 2015 19:50:57 +0000 (19:50 +0000)] 
Do not allow virtual table constructors to be called recursively. Cherrypick of [0a72726da215]

FossilOrigin-Name: 023a29baf0de7e4d2e7a7b5bc184bbad6eb34b8d

10 years agoAvoid signed integer overflow when converting oversized in-line integer
dan [Wed, 20 May 2015 19:48:55 +0000 (19:48 +0000)] 
Avoid signed integer overflow when converting oversized in-line integer
widths and precisions in printf(). Cherrypick of [c494171f77dc], [5ce4e7d7651e], [95625ef3adc3] and [8e4ac2ce2441].

FossilOrigin-Name: b330c7ff6fd1230cde2c246ba0f9d81f056ea61f

10 years agoEnsure that comparison operators do not mess up the MEM_Dyn flag on registers
dan [Wed, 20 May 2015 19:44:12 +0000 (19:44 +0000)] 
Ensure that comparison operators do not mess up the MEM_Dyn flag on registers
when reverting affinity changes. Cherrypick of [02e3c88fbf6a].

FossilOrigin-Name: 4125477e63fd3a71dce262e0866d3e39cec765f1

10 years agoFix a problem causing collation sequence names to be dequoted multiple times under...
dan [Wed, 20 May 2015 19:34:18 +0000 (19:34 +0000)] 
Fix a problem causing collation sequence names to be dequoted multiple times under some circumstances. Cherrypick of [eddc05e7bb31].

FossilOrigin-Name: fc1a4f293c6e29f570098d1fc52d21b32a081476

10 years agoSilently ignore any attempt to add a prefix index for prefixes zero bytes in size...
dan [Wed, 20 May 2015 19:32:18 +0000 (19:32 +0000)] 
Silently ignore any attempt to add a prefix index for prefixes zero bytes in size to an fts3/4 table. Or any prefix index size so large that it overflows a 32-bit signed integer. Cherrypick of [ad4b19d2ac0889a2].

FossilOrigin-Name: ff7be4db8473fa850088e9b66231ba241a7543eb

10 years agoVersion 3.8.6.1 version-3.8.6.1
drh [Wed, 22 Oct 2014 14:22:11 +0000 (14:22 +0000)] 
Version 3.8.6.1

FossilOrigin-Name: 1581c30c389acb2af2c7040d3583c89d48f9bea5

10 years agoUpdate the version number to 3.8.6.1
drh [Wed, 22 Oct 2014 03:00:22 +0000 (03:00 +0000)] 
Update the version number to 3.8.6.1

FossilOrigin-Name: cad7f8d697540b31b98fcfbc5cd2173d5007db33

10 years agoCall fsync() right after ftruncate() when in journal_mode=TRUNCATE and
drh [Wed, 22 Oct 2014 02:43:14 +0000 (02:43 +0000)] 
Call fsync() right after ftruncate() when in journal_mode=TRUNCATE and
when synchronous=FULL in order to ensure that transactions are durable
across a power loss that happens moments after the commit.  Proposed
fix for [https://bugzilla.mozilla.org/show_bug.cgi?id=1072773].  This
is a cherry-pick of [3e922208b68563]

FossilOrigin-Name: 674848070ec296874f555aaaea511987648bf94e

10 years agoVersion 3.8.6 version-3.8.6
drh [Fri, 15 Aug 2014 11:46:33 +0000 (11:46 +0000)] 
Version 3.8.6

FossilOrigin-Name: 9491ba7d738528f168657adb43a198238abde19e

10 years agoFix an assert that can fail if the database file is corrupted.
dan [Thu, 14 Aug 2014 19:53:37 +0000 (19:53 +0000)] 
Fix an assert that can fail if the database file is corrupted.

FossilOrigin-Name: 3f45b8192dad7fb1f027cbaa694046e3c1b3e278

10 years agoFix typos in comments used to help generate documentation. No changes to code.
drh [Thu, 14 Aug 2014 13:06:25 +0000 (13:06 +0000)] 
Fix typos in comments used to help generate documentation.  No changes to code.

FossilOrigin-Name: 13a2d90a2869c53b79754de39045bbbdbc7688e3

10 years agoAdd icon to the Windows shell executable. This is a resource change only, no changes...
mistachkin [Thu, 14 Aug 2014 02:59:51 +0000 (02:59 +0000)] 
Add icon to the Windows shell executable.  This is a resource change only, no changes to code.

FossilOrigin-Name: f5cce9db109a2bbe9a05b4c01b076a51d5fad8ba

10 years agoMinor change to unixDelete for VxWorks with a DOS filesystem.
drh [Wed, 13 Aug 2014 11:39:42 +0000 (11:39 +0000)] 
Minor change to unixDelete for VxWorks with a DOS filesystem.

FossilOrigin-Name: f01d42cc8b00d2b7c4f14defcb05fdc493cf1bfd

10 years agoFix where9.test so that it works with the "no_optimization" permutation.
dan [Tue, 12 Aug 2014 20:13:22 +0000 (20:13 +0000)] 
Fix where9.test so that it works with the "no_optimization" permutation.

FossilOrigin-Name: d46adf9d8f741838b9c30f915231d6a3986c3591

10 years agoFix compilation issue in the Win32 VFS when manually defining SQLITE_WIN32_NO_ANSI.
mistachkin [Tue, 12 Aug 2014 16:13:37 +0000 (16:13 +0000)] 
Fix compilation issue in the Win32 VFS when manually defining SQLITE_WIN32_NO_ANSI.

FossilOrigin-Name: 6715991296886c2a02b9a285a1e61189ad1f79c0

10 years agoImprove the comments associated with SQLITE_TEST_REALLOC_STRESS and add
drh [Tue, 12 Aug 2014 14:29:20 +0000 (14:29 +0000)] 
Improve the comments associated with SQLITE_TEST_REALLOC_STRESS and add
an extra assert() to prove an assumption.

FossilOrigin-Name: 35c454616321d480ecbc4efdf6869bbcdf0d3aa2

10 years agoRun a test with TEST_REALLOC_STRESS and OMIT_LOOKASIDE defined as part of releasetest...
dan [Tue, 12 Aug 2014 14:06:13 +0000 (14:06 +0000)] 
Run a test with TEST_REALLOC_STRESS and OMIT_LOOKASIDE defined as part of releasetest.tcl on Linux/x86-64.

FossilOrigin-Name: a1baf3a7b177728cdfcd6d9345a0d6bf0a8887c0

10 years agoIf SQLITE_TEST_REALLOC_STRESS is defined, extend the op-code array used by virtual...
dan [Tue, 12 Aug 2014 13:38:52 +0000 (13:38 +0000)] 
If SQLITE_TEST_REALLOC_STRESS is defined, extend the op-code array used by virtual-machine programs by one element at a time, instead of doubling its size with each realloc().

FossilOrigin-Name: 4c291827224b84487a38e7ccba2edabc0f15b5ba

10 years agoFix typos in the VxWorks code of os_unix.c.
drh [Tue, 12 Aug 2014 12:19:25 +0000 (12:19 +0000)] 
Fix typos in the VxWorks code of os_unix.c.

FossilOrigin-Name: 19682e8fdc4a3b7884dba3e4387763e435ec16e6

10 years agoAdd a test to ensure that the problem fixed by [a179e41e40] does not recur.
dan [Tue, 12 Aug 2014 09:36:08 +0000 (09:36 +0000)] 
Add a test to ensure that the problem fixed by [a179e41e40] does not recur.

FossilOrigin-Name: 31356f2cae26278660e6bd360ad35e57261d977c

10 years agoFix an assert() statement in the SELECT code generator that was
drh [Tue, 12 Aug 2014 01:23:07 +0000 (01:23 +0000)] 
Fix an assert() statement in the SELECT code generator that was
incorrect following an OOM error.

FossilOrigin-Name: a179e41e40dba4c19a488985f77777acd27b689d

10 years agoModify GetVersionEx Win32 VFS fix for use with the test suite.
mistachkin [Mon, 11 Aug 2014 17:51:23 +0000 (17:51 +0000)] 
Modify GetVersionEx Win32 VFS fix for use with the test suite.

FossilOrigin-Name: fd2221768b45d9006bbb2919a4977cf2791826d6

10 years agoFurther clarification and typo fixes for the previous comment change.
drh [Mon, 11 Aug 2014 17:41:53 +0000 (17:41 +0000)] 
Further clarification and typo fixes for the previous comment change.

FossilOrigin-Name: 87ef9e2f293afd89901fed6be45b0f0052df6846

10 years agoClarify the comment explaining the meaning of the SQLITE_WIN32_GETVERSIONEX
drh [Mon, 11 Aug 2014 17:40:30 +0000 (17:40 +0000)] 
Clarify the comment explaining the meaning of the SQLITE_WIN32_GETVERSIONEX
macro in the Windows VFS.

FossilOrigin-Name: 69714287dbbdbf4ef2a2c5e99ed740ae7d27e051

10 years agoFix for #ifdef issue with GetVersionEx in the Win32 VFS.
mistachkin [Mon, 11 Aug 2014 17:38:38 +0000 (17:38 +0000)] 
Fix for #ifdef issue with GetVersionEx in the Win32 VFS.

FossilOrigin-Name: 1a0d466dd48163c86de4774035fe4a30c1c55311

10 years agoAdd a few more requirements tests.
drh [Mon, 11 Aug 2014 17:37:27 +0000 (17:37 +0000)] 
Add a few more requirements tests.

FossilOrigin-Name: b5652439d5d770f0edeb80c8f55fa7cc515482e3

10 years agoUpdates to evidence marks and requirements. No changes to code.
drh [Mon, 11 Aug 2014 15:54:11 +0000 (15:54 +0000)] 
Updates to evidence marks and requirements.  No changes to code.

FossilOrigin-Name: 62d38308b519a5362f559b296a0cf1acccf8f673

10 years agoFix harmless compiler warnings.
drh [Mon, 11 Aug 2014 14:21:32 +0000 (14:21 +0000)] 
Fix harmless compiler warnings.

FossilOrigin-Name: 52b03f045edf6fc29f9ba9a5cac53a59f0feb0eb

10 years agoChanges that will perhaps enable SQLite to work better on VxWorks.
drh [Mon, 11 Aug 2014 13:53:30 +0000 (13:53 +0000)] 
Changes that will perhaps enable SQLite to work better on VxWorks.

FossilOrigin-Name: de27c742c0dcda20b51339598bf6094a8dcf5fb9

10 years agoUpdate requirements marks. No changes to code.
drh [Fri, 8 Aug 2014 18:26:20 +0000 (18:26 +0000)] 
Update requirements marks.  No changes to code.

FossilOrigin-Name: 7556bd9aa5db1b9cd92d0e48effcda9fe96f3128

10 years agoImprovements to the way the query planner handles sorting costs, so that
drh [Fri, 8 Aug 2014 17:49:55 +0000 (17:49 +0000)] 
Improvements to the way the query planner handles sorting costs, so that
very large sorting costs do not overwhelm the loop costs.

FossilOrigin-Name: bdaa6947371a60a31b6a13267b0ba6e46df2a8ce

10 years agoFix a buffer overrun in the previous commit. query-planner-fix
dan [Fri, 8 Aug 2014 17:25:33 +0000 (17:25 +0000)] 
Fix a buffer overrun in the previous commit.

FossilOrigin-Name: 43c59c85436dc8001c81f4aac7f5231b13d741cb

10 years agoBecause SQLite internally calculates query plan costs using a logarithmic scale,...
dan [Fri, 8 Aug 2014 16:52:28 +0000 (16:52 +0000)] 
Because SQLite internally calculates query plan costs using a logarithmic scale, very large estimated sorting costs can cause all other estimated costs to be rounded down to zero. In these cases break ties between plans with the same total cost by comparing the costs with sorting excluded. This is an alternative fix for the same problem as addressed by [2af630c572].

FossilOrigin-Name: 299b9570279ded7158d22349ef93384286a5c755

10 years agoThe SQLITE_IOERR_BLOCKED extended error code is not longer used, so remove
drh [Fri, 8 Aug 2014 15:38:11 +0000 (15:38 +0000)] 
The SQLITE_IOERR_BLOCKED extended error code is not longer used, so remove
assert() statements and documentation for that error code.  Also make other
documentation improvements.

FossilOrigin-Name: 36b7c5cefcad6bad044806092593c84876fee8bc

10 years agoReworking the documentation on integer result codes. This is a comment
drh [Fri, 8 Aug 2014 12:51:42 +0000 (12:51 +0000)] 
Reworking the documentation on integer result codes.  This is a comment
and documentation change only.  There are no changes to code.

FossilOrigin-Name: 54f1df7b63166f14b2f0d5955c546820e5cbdec9

10 years agoWhen the estimated sorting cost overwhelms the estimated lookup cost, ensure
drh [Thu, 7 Aug 2014 20:42:33 +0000 (20:42 +0000)] 
When the estimated sorting cost overwhelms the estimated lookup cost, ensure
that lookup costs are still taken into account when selecting a lookup
algorithm.

FossilOrigin-Name: 2af630c5720a4d71f22a952af29346a09bd8dfd0

10 years agoClarify the computation of compatible isOrdered by in the plan solver of
drh [Thu, 7 Aug 2014 20:37:01 +0000 (20:37 +0000)] 
Clarify the computation of compatible isOrdered by in the plan solver of
the query planner.

FossilOrigin-Name: b5e8fd575a80334160de0aac8084ed5cd28816a5

10 years agoRemove the extraneous debugging printf() from the previous check-in.
drh [Thu, 7 Aug 2014 20:25:37 +0000 (20:25 +0000)] 
Remove the extraneous debugging printf() from the previous check-in.

FossilOrigin-Name: 8f04d2c0084afa6381e78847c9aa296498d448cb

10 years agoWhen the estimated cost to do a sort overwhelms the estimated cost to do
drh [Thu, 7 Aug 2014 16:50:00 +0000 (16:50 +0000)] 
When the estimated cost to do a sort overwhelms the estimated cost to do
individual table lookups, make sure that the table lookup costs are still
taken into consideration when selecting the lookup algorithm.

FossilOrigin-Name: ec5d84ba69c100d9565425ed74040a49e410ea03

10 years agoA couple more harmless compiler warnings eliminated.
drh [Wed, 6 Aug 2014 18:50:51 +0000 (18:50 +0000)] 
A couple more harmless compiler warnings eliminated.

FossilOrigin-Name: bcf6d775f90f4d1ba018a1b965f2f710df130f01

10 years agoFix two more harmless compiler warnings. Make sure the fts3_unicode2.c file
drh [Wed, 6 Aug 2014 17:49:13 +0000 (17:49 +0000)] 
Fix two more harmless compiler warnings.  Make sure the fts3_unicode2.c file
is in sync with mkunicode.tcl.

FossilOrigin-Name: a2a60307ea68a3230952a56cb65369ba0a208967

10 years agoFix harmless compiler warnings. In the command-line shell, report if the
drh [Wed, 6 Aug 2014 14:36:53 +0000 (14:36 +0000)] 
Fix harmless compiler warnings.  In the command-line shell, report if the
".system" command returns a non-zero result.

FossilOrigin-Name: 1202e9771f6d699dbf5268368108a3527d06d799

10 years agoFix an obsolete comment in the func.c source file. No changes to code.
drh [Wed, 6 Aug 2014 11:58:40 +0000 (11:58 +0000)] 
Fix an obsolete comment in the func.c source file.  No changes to code.

FossilOrigin-Name: 5c6bb57d90bad32785d6d9cdf110a825bbc5ec73

10 years agoOn the windows VFS, do not try to make InterlockedCompareExchange an
drh [Wed, 6 Aug 2014 11:57:54 +0000 (11:57 +0000)] 
On the windows VFS, do not try to make InterlockedCompareExchange an
overloadable function, since sometimes it is a macro.

FossilOrigin-Name: ab1a751e1304749bef5bc5c833f9abed8950f7d0

10 years agoIn the Win32 VFS, work around InterlockedCompareExchange() being a macro on some...
mistachkin [Wed, 6 Aug 2014 03:06:01 +0000 (03:06 +0000)] 
In the Win32 VFS, work around InterlockedCompareExchange() being a macro on some platforms (e.g. x64).

FossilOrigin-Name: 7be244ce129d6502f3a3e3f3e8a1dd61ef71d878

10 years agoFix typos in the opcode documentation. Comment changes only. No changes
drh [Wed, 6 Aug 2014 01:08:07 +0000 (01:08 +0000)] 
Fix typos in the opcode documentation.  Comment changes only.  No changes
to code.

FossilOrigin-Name: 717245d48714c08156c9b7636aaa6c3a402bad66

10 years agoA simpler fix for ticket [3a88d85f36704eebe1] - one that uses less code.
drh [Wed, 6 Aug 2014 00:29:06 +0000 (00:29 +0000)] 
A simpler fix for ticket [3a88d85f36704eebe1] - one that uses less code.
The error message is not quite as good, but as this error has apparently
not previously occurred in over 8 years of heavy use, that is not seen as
a serious problem.

FossilOrigin-Name: 0ad1ed8ef0b5fb5d8db44479373b2b93d8fcfd66

10 years agoEnsure that aggregate functions are not used when evaluating a default
drh [Tue, 5 Aug 2014 21:31:08 +0000 (21:31 +0000)] 
Ensure that aggregate functions are not used when evaluating a default
value for a table column.
Candidate fix for ticket [3a88d85f36704eebe134f7].

FossilOrigin-Name: 29ba812825bf06ef230f2480bba0579653f0a52d

10 years agoAdd the ability to evaluate IN operators as a sequence of comparisons as
drh [Tue, 5 Aug 2014 19:16:22 +0000 (19:16 +0000)] 
Add the ability to evaluate IN operators as a sequence of comparisons as
an alternative to the long-standing algorithm of building a lookup table.
Use the new implementation in circumstances where it is likely to be faster,
such as when the RHS of the IN changes between successive evaluations.

FossilOrigin-Name: 952868216854e8355edf57af62bd1a6bcb70ce61

10 years agoRename the internal Schema.flags field to Schema.schemaFlags.
drh [Tue, 5 Aug 2014 11:04:21 +0000 (11:04 +0000)] 
Rename the internal Schema.flags field to Schema.schemaFlags.

FossilOrigin-Name: 5ae80b3c8f032528359c8c762505ce24da8db96f

10 years agoImproved VdbeCoverage() macros. A few minor simplifications to generated IN-operator-improvements
drh [Tue, 5 Aug 2014 00:53:51 +0000 (00:53 +0000)] 
Improved VdbeCoverage() macros.  A few minor simplifications to generated
VDBE code.

FossilOrigin-Name: 01f60027ad1841051fa493a646141445f8971357

10 years agoPart of the change in the previous check-in was incorrect and can result
drh [Mon, 4 Aug 2014 21:26:58 +0000 (21:26 +0000)] 
Part of the change in the previous check-in was incorrect and can result
in an incorrect UPDATE for WITHOUT ROWID tables.  This check-in fixes the
problem.

FossilOrigin-Name: ee5f6eae57a656d09a4b3f7fbef664b2c696ddb4

10 years agoFurther enhancements to IN-operator processing.
drh [Mon, 4 Aug 2014 18:50:54 +0000 (18:50 +0000)] 
Further enhancements to IN-operator processing.

FossilOrigin-Name: 7fdf26da1d2f40b80f9e44ff6f5af22ace8f95f3

10 years agoRefinements to the enhanced IN-operator logic.
drh [Mon, 4 Aug 2014 16:39:39 +0000 (16:39 +0000)] 
Refinements to the enhanced IN-operator logic.

FossilOrigin-Name: 92ba2821468ecbfac2469161d81c873de67b2243

10 years agoEnhancements to the code generator for the IN operator that result in much
drh [Sat, 2 Aug 2014 21:03:33 +0000 (21:03 +0000)] 
Enhancements to the code generator for the IN operator that result in much
faster queries in some cases, for example when the RHS of the IN operator
changes for each row of a large table scan.

FossilOrigin-Name: 436e884215e2b33ca3fbb555362237b12827c07a

10 years agoRemove (newly) incorrect preprocessor check to fix build on WinRT.
mistachkin [Sat, 2 Aug 2014 20:44:13 +0000 (20:44 +0000)] 
Remove (newly) incorrect preprocessor check to fix build on WinRT.

FossilOrigin-Name: ba7826542908eac2e14789d183d0b3e35b143fed

10 years agoA better comment on the generated code for the NULL-in-RHS-of-IN detection
drh [Fri, 1 Aug 2014 21:12:35 +0000 (21:12 +0000)] 
A better comment on the generated code for the NULL-in-RHS-of-IN detection
logic.

FossilOrigin-Name: 9bc1c730a366e75b760b58e7a343d39165b2a469

10 years agoImproved detection and handling of NULL values on the RHS of a IN operator.
drh [Fri, 1 Aug 2014 21:00:53 +0000 (21:00 +0000)] 
Improved detection and handling of NULL values on the RHS of a IN operator.

FossilOrigin-Name: 468e730036edac22cfeb9ea3515aa16e6bcd6650

10 years agoRemove an unnecessary OP_Null in the IN-operator logic. Attempt to clarify
drh [Fri, 1 Aug 2014 18:00:24 +0000 (18:00 +0000)] 
Remove an unnecessary OP_Null in the IN-operator logic.  Attempt to clarify
comments explaining the IN-operator code, though it is not clear that the
comments are correct even yet - more work to be done.

FossilOrigin-Name: c11e55fabbc718cb324ecd3540453c25db98f50c

10 years agoClean up the IN operator code generation logic to make it easier to reason
drh [Fri, 1 Aug 2014 15:51:36 +0000 (15:51 +0000)] 
Clean up the IN operator code generation logic to make it easier to reason
about.  In the process, improve code generation to omit some unused OP_Null
operations.

FossilOrigin-Name: 7c6fbcfe6ed5739e8e4639b7b123fbf9828cbfc0

10 years agoThe idea of coding IN operator with a short list on the RHS as an OR expression
drh [Fri, 1 Aug 2014 15:34:36 +0000 (15:34 +0000)] 
The idea of coding IN operator with a short list on the RHS as an OR expression
turns out to be helpful.  If the list is of length 1 or 2, the OR expression
is very slightly faster, but the ephemeral table approach is clearly better for
all list lengths greater than 2.  Better to keep the code simple.

FossilOrigin-Name: e13175d3579e1045165bab091b3b28951d691704

10 years agoBegin making changes to the IN operator in an attempt to make it run faster
drh [Fri, 1 Aug 2014 14:46:57 +0000 (14:46 +0000)] 
Begin making changes to the IN operator in an attempt to make it run faster
and to make the code easier to understand.

FossilOrigin-Name: ee0fd6aaf94cda1dce3fe752bfe3b0f83e0043f1

10 years agoEnhance the PRAGMA integrity_check command to detect UNIQUE and NOT NULL
drh [Fri, 1 Aug 2014 01:40:33 +0000 (01:40 +0000)] 
Enhance the PRAGMA integrity_check command to detect UNIQUE and NOT NULL
constraint violations.

FossilOrigin-Name: 9abcf2698c09f4f6a44a68e74f9f6b538f3253d6

10 years agoRefactoring: Change "pIndex->onError!=OE_None" to use a macro:
drh [Thu, 31 Jul 2014 22:59:04 +0000 (22:59 +0000)] 
Refactoring:  Change "pIndex->onError!=OE_None" to use a macro:
"IsUniqueIndex(pIndex)".  Easier to understand that way.

FossilOrigin-Name: e75b26ee357bb3d3c1a539b05d633ebf314726d7

10 years agoOmit a pointless OP_Null when processing a value-list RHS of an IN operator
drh [Thu, 31 Jul 2014 20:16:08 +0000 (20:16 +0000)] 
Omit a pointless OP_Null when processing a value-list RHS of an IN operator
where the LHS is a rowid.

FossilOrigin-Name: 1361450a9dfe9476e8df98f370a3695752252245

10 years agoOptimizations to the OS sub-type checking in the Win32 VFS.
mistachkin [Thu, 31 Jul 2014 18:54:01 +0000 (18:54 +0000)] 
Optimizations to the OS sub-type checking in the Win32 VFS.

FossilOrigin-Name: 1e5489faff093d6a8e538061e45532f9050e9459

10 years agoAdd a missing call to "test_sqlite3_log" to multiplex.test.
dan [Thu, 31 Jul 2014 18:14:37 +0000 (18:14 +0000)] 
Add a missing call to "test_sqlite3_log" to multiplex.test.

FossilOrigin-Name: 0708f9df23a325349f658741358c5994b5c4c873

10 years agoFix a leaked statement handle in pager2.test.
dan [Thu, 31 Jul 2014 17:35:40 +0000 (17:35 +0000)] 
Fix a leaked statement handle in pager2.test.

FossilOrigin-Name: 47457b0488abcbec2137abf706c1d677563b9ea5

10 years agoDeactivate the DISTINCT in a SELECT on the right-hand side of an IN operator,
drh [Thu, 31 Jul 2014 15:44:44 +0000 (15:44 +0000)] 
Deactivate the DISTINCT in a SELECT on the right-hand side of an IN operator,
since it should not make any difference in the output but dues consume extra
memory and CPU time.

FossilOrigin-Name: f4cb53651b1e352fae7378878b830a902bcd9248

10 years agoRe-integrate the recent changes from the 'winMutex' branch back into the Win32 mutex...
mistachkin [Wed, 30 Jul 2014 23:11:16 +0000 (23:11 +0000)] 
Re-integrate the recent changes from the 'winMutex' branch back into the Win32 mutex subsystem.

FossilOrigin-Name: 5360ecb0b8891d0c27f3f02d81b6c7b548361a10

10 years agoAdd three new static mutexes for use by the application. This is a partial
drh [Wed, 30 Jul 2014 21:10:12 +0000 (21:10 +0000)] 
Add three new static mutexes for use by the application.  This is a partial
import of changes from the threads branch.

FossilOrigin-Name: 3aad01960f92c5e77dba64ac1a6c6b063378fb97

10 years agoAdd the "eForce" parameter to the sqlite3_multiplex_shutdown() entry point
drh [Wed, 30 Jul 2014 15:43:05 +0000 (15:43 +0000)] 
Add the "eForce" parameter to the sqlite3_multiplex_shutdown() entry point
in test_multiplex.c.  Shutdown is forced if true.  Shutdown is not done if
there are pending database connections and eForce is false, but an error log
entry is made instead.

FossilOrigin-Name: c7303d0139f7e7f4fa7060b52942e6c6c6d4b622

10 years agoEnsure that the correct number of columns in a UNIQUE index are checked for
drh [Wed, 30 Jul 2014 13:56:48 +0000 (13:56 +0000)] 
Ensure that the correct number of columns in a UNIQUE index are checked for
uniqueness, regardless of whether or not the original table has a ROWID or
if the columns are NOT NULL, etc.  Ticket [9a6daf340df99ba93c].

FossilOrigin-Name: 6b785e92f279cb65746834d5cd25594fd3333342

10 years agoEnhancements and updates to the Win32 mutex subsystem.
mistachkin [Tue, 29 Jul 2014 19:54:03 +0000 (19:54 +0000)] 
Enhancements and updates to the Win32 mutex subsystem.

FossilOrigin-Name: ca9868cdae19045dc522490b34dee0f14d928ebe

10 years agoMerge updates from trunk. winMutex
mistachkin [Tue, 29 Jul 2014 18:03:36 +0000 (18:03 +0000)] 
Merge updates from trunk.

FossilOrigin-Name: 08c9a4ea6353900095a471365a8611a443f5f399

10 years agoAdd the SQLITE_TESTCTRL_ISINIT file control.
drh [Tue, 29 Jul 2014 14:09:21 +0000 (14:09 +0000)] 
Add the SQLITE_TESTCTRL_ISINIT file control.

FossilOrigin-Name: 8b651d4d6cde7efbc0cc7155948f477477be100e

10 years agoHave calls to the xFilter() method of rtree virtual tables ensure that cursor is...
dan [Tue, 29 Jul 2014 11:54:18 +0000 (11:54 +0000)] 
Have calls to the xFilter() method of rtree virtual tables ensure that cursor is initialized before proceeding. Fix for [d2889096e7bdeac].

FossilOrigin-Name: 8cc41b0bf365af47c2061ffe44c86018945dd239

10 years agoEnhancements and updates to the Win32 mutex subsystem.
mistachkin [Tue, 29 Jul 2014 05:49:02 +0000 (05:49 +0000)] 
Enhancements and updates to the Win32 mutex subsystem.

FossilOrigin-Name: 18984c321049a759f6619cfa17fb3f4e7b3e08ea

10 years agoRemove an unreachable branch from the sqlite3_value_numeric_type() interface.
drh [Sat, 26 Jul 2014 20:12:56 +0000 (20:12 +0000)] 
Remove an unreachable branch from the sqlite3_value_numeric_type() interface.

FossilOrigin-Name: 5350229b52b18a4961858a30538c5c75e5bd3048

10 years agoAvoid unnecessary no-op calls to applyNumericAffinity() for a small
drh [Sat, 26 Jul 2014 16:47:23 +0000 (16:47 +0000)] 
Avoid unnecessary no-op calls to applyNumericAffinity() for a small
performance improvement.

FossilOrigin-Name: 413d7287977702fa651c0140bd5cf29021fe3e79

10 years agoTry to fix harmless compiler warnings reported by Fortify.
drh [Fri, 25 Jul 2014 21:35:39 +0000 (21:35 +0000)] 
Try to fix harmless compiler warnings reported by Fortify.

FossilOrigin-Name: e0fa6fdc14ac5458f9200cbae124f8025ea534ea

10 years agoImproved comments on VDBE opcodes, for better documentation. No code
drh [Fri, 25 Jul 2014 18:37:42 +0000 (18:37 +0000)] 
Improved comments on VDBE opcodes, for better documentation.  No code
or logic changes.

FossilOrigin-Name: 2d32e4876e0b162730f81e5c2658be12d64a9a99

10 years agoAdd constraints (enforced only when SQLITE_DEBUG is enabled) on the use of
drh [Fri, 25 Jul 2014 18:01:06 +0000 (18:01 +0000)] 
Add constraints (enforced only when SQLITE_DEBUG is enabled) on the use of
OP_Next and OP_Prev.

FossilOrigin-Name: 2230c74f1efa591770176c9b40e920724a3c39e1

10 years agoImprove the performance of the ANALYZE command by taking advantage of
drh [Thu, 24 Jul 2014 23:23:26 +0000 (23:23 +0000)] 
Improve the performance of the ANALYZE command by taking advantage of
UNIQUE constraints on indices.

FossilOrigin-Name: 114dcf33670fd98a1ebbac0e44f66b2d8bcccddf

10 years agoFix a bug in the whereRangeSkipScanEst() procedure (added by
drh [Thu, 24 Jul 2014 22:41:20 +0000 (22:41 +0000)] 
Fix a bug in the whereRangeSkipScanEst() procedure (added by
check-in [d09ca6d5efad3e4cfa]) where it fails to consider the possibility
of a ROWID column when computing the affinity of a table column.

FossilOrigin-Name: 6aea2258dd7d3967900cefe4cd0af48a7ee7e169

10 years agoAvoid trying to allocation zero bytes when analyzing a unique non-null index. faster-analyze
drh [Thu, 24 Jul 2014 20:25:16 +0000 (20:25 +0000)] 
Avoid trying to allocation zero bytes when analyzing a unique non-null index.

FossilOrigin-Name: 85e2badeeb7f7599eb6fd35512f9bd524f0b1b3f

10 years agoAvoid change tests when analyzing single-column unique indexes after
drh [Thu, 24 Jul 2014 19:54:20 +0000 (19:54 +0000)] 
Avoid change tests when analyzing single-column unique indexes after
getting past the initial NULL entries.

FossilOrigin-Name: 4690e99c07024f40fafba1db8e4487b287b788a9

10 years agoAdd the readfile(FILENAME) and writefile(FILENAME,CONTENT) SQL functions to
drh [Thu, 24 Jul 2014 12:39:59 +0000 (12:39 +0000)] 
Add the readfile(FILENAME) and writefile(FILENAME,CONTENT) SQL functions to
the command-line shell.

FossilOrigin-Name: fb1048cb2b613a0dbfe625a5df05e9dcd736a433

10 years agoAdd support for hexadecimal integer literals in the parser.
drh [Thu, 24 Jul 2014 12:19:41 +0000 (12:19 +0000)] 
Add support for hexadecimal integer literals in the parser.

FossilOrigin-Name: f8f79f28785db716b10c3bc9d6652b98253fd125