Commit Graph

16603 Commits

Author SHA1 Message Date
drh 64bcb8cfbb Comment improvements. Put ALWAYS and NEVER macros on three unreachable
branches.

FossilOrigin-Name: 397617009e07004596476d6f5644fdf84c376f54
2016-08-26 03:42:57 +00:00
drh a28f85b076 Remove an unreachable branch from sqlite3ExprAffinity()
FossilOrigin-Name: 9d96f61481704e5ec399ee425f0ebb246902ecc5
2016-08-26 01:02:09 +00:00
drh 3cc19132da Merge recent changes from trunk.
FossilOrigin-Name: 5789aab8ef59ae1cdfdae123b078ee03da6e08ed
2016-08-25 22:31:44 +00:00
drh fb82820a38 Fix the sqlite3_trace_v2() interface so that it goes disabled if either the
callback or mask arguments are zero, in accordance with the documentation.

FossilOrigin-Name: 37e6c54b1afc634844026b3fe874dd2d550c6558
2016-08-25 22:06:37 +00:00
drh e347d3e813 Refactor the sqlite3ExprCodeIN() routine for improved maintainability.
FossilOrigin-Name: b56705ae6374db9db82613ef89faa1a1e6b00a18
2016-08-25 21:14:34 +00:00
drh 0a1082aec2 Another fix in the IN-operator algorithm description.
FossilOrigin-Name: f474aeac4fa62d87e73189868d7c7a295ffb7265
2016-08-25 17:47:36 +00:00
drh 1373c3a8c5 Further refinement of the in-operator.md documentation.
FossilOrigin-Name: df0648373a50006ca18d692e12552d1d53d549e3
2016-08-25 17:40:32 +00:00
drh ecb87ac88d Improvements to IN operator code generator comments. Avoid unnecessary
Copy operations on the LHS of the IN operator.

FossilOrigin-Name: b6344298783a1207cba3f635939ddc9ba922ab67
2016-08-25 15:46:25 +00:00
drh ee0f22fd3b Corrections to the IN-operator notes.
FossilOrigin-Name: 25033ee94538289ba7e0147da30a18300047123f
2016-08-25 14:23:59 +00:00
drh 539f2fef03 Add notes on the implementation of the IN operator.
FossilOrigin-Name: d256b2caeb9e3eb5dd88bb569ec71f91e9991c81
2016-08-25 14:00:15 +00:00
drh 18016ad2bb Simplified VDBE code for the vector NOT IN null-scanning loop.
FossilOrigin-Name: 7ae504e62e9bbbbd85a676f3c3922b7fd0cc73d2
2016-08-24 21:54:47 +00:00
drh 72e26dec86 Improved extended comments of comparison operators when the SQLITE_STOREP2
flags is set on P5.  No changes to non-debug code.

FossilOrigin-Name: bbc1b016164ed0793e07302614384d52119463e0
2016-08-24 21:24:04 +00:00
drh 62659b2a80 In sqlite3FindInIndex(), improve internal comments and avoid an
unreachable branch.

FossilOrigin-Name: 55945fc12f8157e32e6850e41575c0c6422d29e7
2016-08-24 18:51:23 +00:00
mistachkin 24b6b81cb0 Sync up the MSVC autoconf makefile.
FossilOrigin-Name: 77f7c31a3aa44798cfa5f557242caffb593ce7af
2016-08-24 18:21:58 +00:00
drh 321e828d03 Fix more unreachable branches.
FossilOrigin-Name: 6099c180db55396d6307538a5428ae5ef1b82d10
2016-08-24 17:49:07 +00:00
drh d0b67a8654 Add a NEVER() on an unreachable branch in comparisonAffinity().
FossilOrigin-Name: 505a2f20eac62d4e170f003255c8984e4f3b0918
2016-08-24 15:37:31 +00:00
dan 7887d7f24d Fix a buffer overrun in the code for handling IN(...) operators when the LHS of the operator contains indexed columns or expressions.
FossilOrigin-Name: f41a0391b732a8c4ad188163f34a0f4a22237bb5
2016-08-24 12:22:17 +00:00
drh ac6b47d164 The previous OOM fix was bad. Back it out and replace it with a better one.
FossilOrigin-Name: 1e3bc3698a4b779e6af8e3c727929c4dbddf3edb
2016-08-24 00:51:48 +00:00
drh 894241c847 Avoid a potential null-pointer dereference following an OOM.
FossilOrigin-Name: 25f6ed8de4df9c9890d4a352a6d11084433e82ea
2016-08-24 00:25:27 +00:00
drh e835bc1285 Simplify the row value misuse error message.
FossilOrigin-Name: 838c50a5bf46fd0340839d577fa28ba02b4f2034
2016-08-23 19:02:55 +00:00
drh 66860af3dd Fix a problem with rowvalue UPDATE when the rowvalue is not the left-most and
the RHS is a multi-column subquery.

FossilOrigin-Name: e149e6b93a9afb3d574309c0db60e221e24078f7
2016-08-23 18:30:10 +00:00
drh abb9d5f189 Fix an uninitialized variable in CASE expression code generation.
FossilOrigin-Name: c8ffae05e13033ec7425bf0f002df31f550bb7f1
2016-08-23 17:30:55 +00:00
drh 6ae3ab0036 Fix the SQLITE_USER_AUTHENTICATION login check so that the SQLITE_AUTH_USER
error code correctly propagates and is not overwritten by SQLITE_ERROR.

FossilOrigin-Name: c640489db2037f1a284d7b85fa753ccdac1b8f79
2016-08-23 14:42:15 +00:00
drh cbfe1101b3 Add support for the SQLITE_DBCONFIG_MAINDBNAME configuration option.
FossilOrigin-Name: 7839519349c7371cdb4e16a215eacd27004cbc62
2016-08-22 20:10:01 +00:00
drh 12abf408ff Fix the vector BETWEEN operator so that it only evaluates the left-most
vector expression once.  Add support for vector comparisons in the CASE
operator.

FossilOrigin-Name: 07e69f43a294d35b5145a2b0242ee42d50adab14
2016-08-22 14:30:05 +00:00
drh db45bd5e82 Reinstate the mechanism in BETWEEN that avoids evaluating the first expression
more than once, but fix the affinity extractor so that it works with this
mechanism.  The de-duplication of the first expression still does not work
for vector expressions, though.

FossilOrigin-Name: 2f39987f21bd6dae8d2be610a1fd5f06f8878e9e
2016-08-22 00:48:58 +00:00
drh 84b19a3da1 The docs promise the in "x BETWEEN y AND z" the x expression is only evaluated
once.  That is no longer true, and so some tests are failing.  This needs to
be fixed before merging to trunk.

FossilOrigin-Name: e50d264fdc2f08d19202c68f73f18df301cb233d
2016-08-20 22:49:28 +00:00
drh d832da7f40 Further comment enhancements. No changes to code.
FossilOrigin-Name: d4562a9e7b1eaff41466210e3a0caaf374ec5a92
2016-08-20 21:11:25 +00:00
drh 76dbe7a8d0 Clarification of code comments in expr.c. Clean up the implementations
of sqlite3ExprIsVector() and sqlite3ExprVectorSize() slightly.

FossilOrigin-Name: 4fb66d6592b141a4a71359250dbd1ac454569cb9
2016-08-20 21:02:38 +00:00
drh 8bd0d58e1c Fixes for problems following OOM errors.
FossilOrigin-Name: 9041ee4a6f0e8389297f887f1431ab5cfe783390
2016-08-20 18:06:14 +00:00
drh 9854260bca Do not duplicate the Expr.pLeft subtree of a TK_SELECT_COLUMN node.
FossilOrigin-Name: 8384c77ebb3f65fbc54c199885926f2066f0b140
2016-08-20 17:00:16 +00:00
dan f358009a93 Fix a segfault that could occur if a query that used a vector comparison contained certain types of syntax errors.
FossilOrigin-Name: 203f07c5e140e74cf91d0c1e20135c21236f0fc1
2016-08-20 15:01:24 +00:00
drh 9e730f0bb8 Improvements to the vector comparison splitter in exprAnalyze().
FossilOrigin-Name: a3ffd283bc931b04170ef737e56bced33d27f06d
2016-08-20 12:00:05 +00:00
drh 8762ec1935 Improvements to comments. No code changes.
FossilOrigin-Name: 4165d20f64d778a4e48f511a37cfced8579d4dbe
2016-08-20 01:06:22 +00:00
drh a1251bc40d Add support for vector assignments in the SET clause of an UPDATE statement.
FossilOrigin-Name: f320d47d6b7b08d9552c8444004bc256348bda90
2016-08-20 00:51:37 +00:00
drh fc7f27b9d2 Change the way TK_SELECT_COLUMN is handled so that the subquery is only
generated once even if part of the vector comparison is used for indexing
and the other part is now.  This change also is a pathway to vector assignment
in UPDATE statements.

FossilOrigin-Name: d8feea7dcde83179bff303072426561cfe825e58
2016-08-20 00:07:01 +00:00
drh 8d25cb90cd Replace the magic number (-2) with its symbol XN_EXPR in the
exprMightBeIndexed() routine.  No logic changes.

FossilOrigin-Name: d4a5af69cc3bde6f8c02075c07b4d47a0252392d
2016-08-19 19:58:06 +00:00
drh 39a11819f3 Improved comments on sqlite3CodeSubquery(). No changes to code.
FossilOrigin-Name: acea4ee136def4815d22eec240c5903a72bde9bd
2016-08-19 19:12:58 +00:00
drh a15a8bc822 Show the WhereTerm.iField value on debugging output, when it is non-zero.
FossilOrigin-Name: 931c95358d8bc02f3e3d8ee4e545a07b2d2c97e8
2016-08-19 18:40:17 +00:00
drh 4602b8e89d Fix an obsolete comment on codeEqualityTerm(). No changes to code.
FossilOrigin-Name: d07be5afb0a915769382dfd815403f8832cb3eec
2016-08-19 18:28:00 +00:00
drh b684fd5c4a Merge recent enhancements from trunk.
FossilOrigin-Name: b17872363b60edab05a5d382a44038aad91e4d9f
2016-08-19 15:41:24 +00:00
drh 05a41ee9ec Merge the VACUUM attached database enhancement from trunk.
FossilOrigin-Name: 12d5e38d269ede27cd38a031a395915301fffe56
2016-08-19 15:17:51 +00:00
drh fcc31545bc Enhance the VACUUM command so that it can operate on an attached database.
FossilOrigin-Name: 083f9e6270fa4faa402b91231271da4f3915c79f
2016-08-19 15:15:55 +00:00
drh 6a754dc767 Disable row counting on queries run while doing a VACUUM.
FossilOrigin-Name: ad35ef116296e5d6aaeb9ef260bf35bee3bd6d20
2016-08-19 15:12:38 +00:00
drh 9ef5e7708a Add the capability to VACUUM an attached database by specifying the schema
name as an argument to the VACUUM command.  Since version 2.0, VACUUM has
accepted an argument which was silently ignored.  Now it has meaning.

FossilOrigin-Name: 29d63059b4d2bb612523ac55ebfef040d054a64f
2016-08-19 14:20:56 +00:00
drh da84dcae54 Add the SQLITE_DBCONFIG_MAINDBNAME interface.
FossilOrigin-Name: d6e3d5796c9991ca0af45ed92ce36f55efc02348
2016-08-18 22:44:22 +00:00
drh 61ea610cd0 Change the name of Db.zName to Db.zDbSName for improved long-term code
maintainability.

FossilOrigin-Name: cb9865e14db1c0076618f13400151112f84960cb
2016-08-18 22:19:03 +00:00
drh e59be01072 Fix a zName to zDbSName conversion missed in the previous check-in.
FossilOrigin-Name: d7cf423cdccada2b0a4b7cc79ccf5f35d6f43212
2016-08-18 20:56:39 +00:00
drh 03181c8c27 Fix a SQL NULL handling bug in the vector IN operator code generation.
FossilOrigin-Name: 936146b12e27784f15a68fe65732c6d92c3a12f3
2016-08-18 19:04:57 +00:00
drh 48cb3a7600 Display SELECT_COLUMN expressions in the .wheretrace debugging output.
FossilOrigin-Name: 3b27a5da100037f75a4efc15e0354a6aa94194f8
2016-08-18 18:09:10 +00:00