drh
da2e5862d1
Merge all recent changes from trunk.
...
FossilOrigin-Name: a353a8515fb2eff86042d0c33e39772f4d04e0b3
2014-08-06 02:03:35 +00:00
drh
bc5cf3813e
Fix typos in the opcode documentation. Comment changes only. No changes
...
to code.
FossilOrigin-Name: 717245d48714c08156c9b7636aaa6c3a402bad66
2014-08-06 01:08:07 +00:00
drh
0c4de2d96d
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
2014-08-06 00:29:06 +00:00
drh
1cfc9aa993
Ensure that aggregate functions are not used when evaluating a default
...
value for a table column.
Candidate fix for ticket [3a88d85f36704eebe134f7].
FossilOrigin-Name: 29ba812825bf06ef230f2480bba0579653f0a52d
2014-08-05 21:31:08 +00:00
drh
42191f6248
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
2014-08-05 19:16:22 +00:00
drh
2c5e35ffd1
Rename the internal Schema.flags field to Schema.schemaFlags.
...
FossilOrigin-Name: 5ae80b3c8f032528359c8c762505ce24da8db96f
2014-08-05 11:04:21 +00:00
drh
4336b0e64a
Improved VdbeCoverage() macros. A few minor simplifications to generated
...
VDBE code.
FossilOrigin-Name: 01f60027ad1841051fa493a646141445f8971357
2014-08-05 00:53:51 +00:00
drh
2c3ea0694f
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
2014-08-04 21:26:58 +00:00
drh
7248a8b2b9
Further enhancements to IN-operator processing.
...
FossilOrigin-Name: 7fdf26da1d2f40b80f9e44ff6f5af22ace8f95f3
2014-08-04 18:50:54 +00:00
drh
a976979b6e
Refinements to the enhanced IN-operator logic.
...
FossilOrigin-Name: 92ba2821468ecbfac2469161d81c873de67b2243
2014-08-04 16:39:39 +00:00
drh
bb53ecb1db
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
2014-08-02 21:03:33 +00:00
mistachkin
16d511a664
Remove (newly) incorrect preprocessor check to fix build on WinRT.
...
FossilOrigin-Name: ba7826542908eac2e14789d183d0b3e35b143fed
2014-08-02 20:44:13 +00:00
drh
4c259e9f40
A better comment on the generated code for the NULL-in-RHS-of-IN detection
...
logic.
FossilOrigin-Name: 9bc1c730a366e75b760b58e7a343d39165b2a469
2014-08-01 21:12:35 +00:00
drh
6be515ebe0
Improved detection and handling of NULL values on the RHS of a IN operator.
...
FossilOrigin-Name: 468e730036edac22cfeb9ea3515aa16e6bcd6650
2014-08-01 21:00:53 +00:00
drh
e21a6e1dfe
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
2014-08-01 18:00:24 +00:00
drh
5c3e9cf9de
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
2014-08-01 15:51:36 +00:00
drh
e80c9b9ad5
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
2014-08-01 15:34:36 +00:00
drh
3a85625d87
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
2014-08-01 14:46:57 +00:00
drh
cefc87fca5
Enhance the PRAGMA integrity_check command to detect UNIQUE and NOT NULL
...
constraint violations.
FossilOrigin-Name: 9abcf2698c09f4f6a44a68e74f9f6b538f3253d6
2014-08-01 01:40:33 +00:00
drh
5f1d1d9c87
Refactoring: Change "pIndex->onError!=OE_None" to use a macro:
...
"IsUniqueIndex(pIndex)". Easier to understand that way.
FossilOrigin-Name: e75b26ee357bb3d3c1a539b05d633ebf314726d7
2014-07-31 22:59:04 +00:00
drh
37e08081f3
Omit a pointless OP_Null when processing a value-list RHS of an IN operator
...
where the LHS is a rowid.
FossilOrigin-Name: 1361450a9dfe9476e8df98f370a3695752252245
2014-07-31 20:16:08 +00:00
mistachkin
202cb64189
Optimizations to the OS sub-type checking in the Win32 VFS.
...
FossilOrigin-Name: 1e5489faff093d6a8e538061e45532f9050e9459
2014-07-31 18:54:01 +00:00
dan
f6296cafc5
Add a missing call to "test_sqlite3_log" to multiplex.test.
...
FossilOrigin-Name: 0708f9df23a325349f658741358c5994b5c4c873
2014-07-31 18:14:37 +00:00
dan
e8559837e6
Fix a leaked statement handle in pager2.test.
...
FossilOrigin-Name: 47457b0488abcbec2137abf706c1d677563b9ea5
2014-07-31 17:35:40 +00:00
drh
4387006c18
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
2014-07-31 15:44:44 +00:00
mistachkin
0174ffa976
Re-integrate the recent changes from the 'winMutex' branch back into the Win32 mutex subsystem.
...
FossilOrigin-Name: 5360ecb0b8891d0c27f3f02d81b6c7b548361a10
2014-07-30 23:11:16 +00:00
drh
d42d0bed94
Add three new static mutexes for use by the application. This is a partial
...
import of changes from the threads branch.
FossilOrigin-Name: 3aad01960f92c5e77dba64ac1a6c6b063378fb97
2014-07-30 21:10:12 +00:00
drh
c0fea3cf53
Add a new sqlite3FaultSim() call to vdbePmaReaderSeek() to facilitate
...
tests of error handling in the sorter.
FossilOrigin-Name: 655d8cfc752b3f5f63521a57f2155f8e14aaf7c4
2014-07-30 18:47:12 +00:00
drh
c690461ea1
Mark some invariants in the vdbesort.c logic when SQLITE_MAX_WORKER_THREADS==0.
...
FossilOrigin-Name: 721cd965859c9ccc24d2a1d2851c914229e584b3
2014-07-30 17:21:37 +00:00
drh
a1a8298c2e
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
2014-07-30 15:43:05 +00:00
drh
bd1c881a91
Merge recent trunk changes, and especially the fix for the CREATE UNIQUE INDEX
...
problem of ticket [9a6daf340df99ba9].
FossilOrigin-Name: 5b50a8380b2b678c1646ff303e3696efc1d7d92c
2014-07-30 14:44:24 +00:00
drh
ac50232d0f
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
2014-07-30 13:56:48 +00:00
mistachkin
0479c6ab9b
Disable an assert that is sometimes generated spuriously.
...
FossilOrigin-Name: bd9ee0ea69181526cfc3cadac33a5ec5190112b0
2014-07-29 21:44:13 +00:00
mistachkin
a7f37491a7
Enhancements and updates to the Win32 mutex subsystem.
...
FossilOrigin-Name: ca9868cdae19045dc522490b34dee0f14d928ebe
2014-07-29 19:54:03 +00:00
mistachkin
acd57ea0c2
Update return value checking to conform to the beginthreadex() specs.
...
FossilOrigin-Name: 3144a16f91364b455e54e6030714e1c12ab0bdb7
2014-07-29 19:00:43 +00:00
mistachkin
7c2231cf3b
Add a couple more assert statements.
...
FossilOrigin-Name: 4e816db235025c7998c649fddabfd807290a08b9
2014-07-29 18:53:01 +00:00
drh
b92284de11
Fix unreachable branches in the threads.c module.
...
FossilOrigin-Name: 3175e366bbf7579ec9ab27214b0a4e5cd27ea204
2014-07-29 18:46:30 +00:00
mistachkin
edd93c3349
Merge updates from trunk.
...
FossilOrigin-Name: 08c9a4ea6353900095a471365a8611a443f5f399
2014-07-29 18:03:36 +00:00
drh
cd4b637760
Fix a harmless compiler warning.
...
FossilOrigin-Name: 216d21d0e62b3c0ad49f3cb395c845bf4f17ac61
2014-07-29 17:22:12 +00:00
mistachkin
b1ac2bc8da
Make the Win32 thread handles are available after the threads exit.
...
FossilOrigin-Name: 565c5af7a75ad5c759ce1a61dab3a61c42819644
2014-07-29 16:37:53 +00:00
drh
19f30dc171
Fix the threads build on Windows when SQLITE_MAX_WORKER_THREADS is greater
...
than 0.
FossilOrigin-Name: f37db3a03d95b508066745613029b7dd1240b31c
2014-07-29 15:18:00 +00:00
drh
011b2e5dd3
Merge the R-Tree fix and the new SQLITE_TESTCTRL_ISINIT test control from
...
trunk.
FossilOrigin-Name: b2f7eb3cc27ecf9a6a88907991148bca1a7d54b3
2014-07-29 14:16:42 +00:00
drh
43cfc230ab
Add the SQLITE_TESTCTRL_ISINIT file control.
...
FossilOrigin-Name: 8b651d4d6cde7efbc0cc7155948f477477be100e
2014-07-29 14:09:21 +00:00
dan
57ff60b19b
Have calls to the xFilter() method of rtree virtual tables ensure that cursor is initialized before proceeding. Fix for [d2889096e7bdeac].
...
FossilOrigin-Name: 8cc41b0bf365af47c2061ffe44c86018945dd239
2014-07-29 11:54:18 +00:00
mistachkin
d6918657d8
Enhancements and updates to the Win32 mutex subsystem.
...
FossilOrigin-Name: 18984c321049a759f6619cfa17fb3f4e7b3e08ea
2014-07-29 05:49:02 +00:00
mistachkin
fc129698e0
Add some asserts to the Win32 mutex subsystem.
...
FossilOrigin-Name: e8f2dc5fadae96252649875c234fcdef1108bd48
2014-07-29 00:42:39 +00:00
drh
2b49327d08
Fix the build on windows.
...
FossilOrigin-Name: 2773a5f9879a106a89a3d0bc3c5bfdcb2fe43c7c
2014-07-29 00:23:08 +00:00
drh
bde27aaa5a
Remove an unnecessary parameter from vdbeMergeEngineStep(). Rename a couple
...
other routines to be more descriptive of what they do.
FossilOrigin-Name: f2407a40f339fa6c2cec194f78ae7c93655b1ec1
2014-07-28 20:16:41 +00:00
drh
d906514d98
Rename vdbeIncrMergerInit() to vdbeMergeEngineInit() - a much more accurate
...
name.
FossilOrigin-Name: 5b084a2dd581141b2d0cd9d1a5975625f65ec34d
2014-07-28 19:58:41 +00:00
drh
8a4865f139
In vdbesort.c, rename vdbeSorterDoCompare() to vdbeMergeEngineCompare() and
...
move it closer to the one place where it is called. Other minor comment
changes.
FossilOrigin-Name: 09d50d9f0fe7df26dadb0a332731683a07a89fde
2014-07-28 18:57:40 +00:00