Commit Graph

16796 Commits

Author SHA1 Message Date
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
dan 783e778f38 Fix other minor problems with the fts5 snippet() function.
FossilOrigin-Name: b56b2a85cf377686727f3929208ede43f797cf76
2016-08-20 17:23:45 +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
dan c9e75fb23a Register any built-in fts5 module before loading automatic extensions. This allows automatic extensions to register fts5 tokenizers and auxiliary functions.
FossilOrigin-Name: b10e31dce8e590e1ba30f512374a8c16656bcc72
2016-08-19 18:37:35 +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
dan 7ca1ea16ff Have the fts5 snippet() function avoid favouring snippets that begin with sentences that do not contain search terms. Add an extra bias in favour of the first sentence in the document.
FossilOrigin-Name: d8180af2adfc101dfce95a0498b5cd7b30643b30
2016-08-19 14:25: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
drh db97e56217 Display VECTOR expressions in .wheretrace and .selecttrace debugging output.
FossilOrigin-Name: 157347e2580e5078c4081d602e9d1a82d194e719
2016-08-18 17:55:57 +00:00
drh c8d0b0b9d4 Since the TK_VECTOR token is not actually used by the parser, make it an
extra token code added by the tool/addopcodes.tcl script during parser build.

FossilOrigin-Name: b40b202c1f82808d2240e87b22f1e78b2208cb26
2016-08-18 15:36:03 +00:00
drh 5ea494425f Merge recent enhancements from trunk.
FossilOrigin-Name: 4768a1066cb9c7627064d7efec44188d6755cb03
2016-08-18 15:21:16 +00:00
drh a79e10b665 Simplify the vector comparison code generator logic, and the resulting
VDBE code.

FossilOrigin-Name: e2ad0b5d8e1e83118c12889150aca2f2a6b2bdde
2016-08-18 15:15:29 +00:00
dan b39a5ac229 Adjust some tests to account for recent changes to the fts5 snippet function.
FossilOrigin-Name: 184ecbe9c0c3280a22cdeda5c7836a7b280c3e1f
2016-08-18 14:47:48 +00:00
drh 69c338263a Rename the Db.zName field to Db.zDbSName to make it more descriptive and to
distinguish it from all of the other "zName" variables scattered throughout
the code.

FossilOrigin-Name: 92a22f01343a898455fd61c3b8e7d7c954f5b569
2016-08-18 14:33:11 +00:00
dan e7036202bc Bias the fts5 snippet() function to return snippets that look like they start at the start of sentences.
FossilOrigin-Name: 60de159476edbd48dc363f7f77f09c32ea68422f
2016-08-17 19:05:12 +00:00
dan 8c2b1fde58 Fix a problem in the fts5 snippet() auxiliary function.
FossilOrigin-Name: a861713cc6a3868a1c89240e8340bc7b2b9559da
2016-08-17 11:14:39 +00:00
drh 0f832ddc06 Fix a bug in destructor processing of Lemon. That has no impact on the
SQLite grammar.  The bug was introduced by prior work to optimize the
Lemon-generated parser used by SQLite.

FossilOrigin-Name: f9035b8e2ea331801402bcb62b203ab092949770
2016-08-16 16:46:40 +00:00
dan 0f5a186c4c Questionable changes to support interruptible checkpoint in ZipVFS.
FossilOrigin-Name: c7a9f26d118c7a453d45fa73efa4d1ab79301659
2016-08-13 14:30:23 +00:00
drh 0f825a7e26 Remove an unnecessary stack variable from sqlite3VdbeExec().
FossilOrigin-Name: c54bd9c82dd34951dc87848c0b19fcccaef928db
2016-08-13 14:17:02 +00:00
drh af69eda63e Improvements to commits. No code changes.
FossilOrigin-Name: 18f5a3bee4f870be4644a6042a20081c46edb7d0
2016-08-13 13:03:46 +00:00
drh a2f629251f Fix to the vector less-than operator. All legacy tests passing now.
FossilOrigin-Name: ec70a67ebc997f457be4d52d8affc37e142dc3ff
2016-08-13 12:37:47 +00:00
dan 460d38f15e Fix an fts5 problem with corrupt database handling found by address-sanitizer.
FossilOrigin-Name: e22252e1da4cd9e41b970970a1c4f466aa6cc133
2016-08-13 10:34:12 +00:00
drh 79752b6e63 Attempt to simplify the logic and generated code for vector comparisons.
Basic comparison operators are working, but there are many indexing test
failures still to be worked through.

FossilOrigin-Name: dfc028cfbe7657d20727a2670ecadb1575eb8cbb
2016-08-13 10:02:17 +00:00
dan 3b96d1e2e4 Fix a buffer overread in fts5.
FossilOrigin-Name: fcfbee6c7d33a9ae7feb46044a0c2fe680460d39
2016-08-13 06:38:31 +00:00
dan 7fb8990688 Have wal file checkpoints exit early if the sqlite3_interrupt() API function is called.
FossilOrigin-Name: 8a5f41c7b1718507524adef1a2730e99cf53270a
2016-08-12 16:21:15 +00:00
drh 471b4b92bd Add VdbeCoverage() macros on newly added VDBE branch operations.
FossilOrigin-Name: 381aa73141db8ec59adbcb09e71af660ee4ae5ce
2016-08-12 11:25:49 +00:00
drh a48d7e7749 Fix a post-OOM memory leak.
FossilOrigin-Name: 14009b32b955b42cfd5f0c2ce7d4b3ce19ce201e
2016-08-12 11:01:20 +00:00
dan 1bf4ca7c42 Add the "modeof=<filename>" URI parameter to os_unix.c - used to specify a file to copy permissions from when a new database is created. Also allow passing NULL as the second parameter to sqlite3rbu_vacuum().
FossilOrigin-Name: ed406d31ff54ee3de8db91690a966e5c561f8f94
2016-08-11 18:05:47 +00:00
drh 088645b090 Merge recent changes from trunk.
FossilOrigin-Name: 959677b97ba15f786936c762e2e68df1151d7ed0
2016-08-11 12:31:21 +00:00
dan 17994e3bca Fix some problems with handling "no such collation sequence" errors.
FossilOrigin-Name: 8278be06fa69e3266866220bdaf5be45a5fcfa23
2016-08-11 12:01:52 +00:00
dan 6ff4627d5d Fix a 1 byte buffer overwrite in the "sqldiff --rbu" command.
FossilOrigin-Name: ab83d7077da80ddbcf399d0797d79e964dc64f0e
2016-08-11 09:55:55 +00:00
drh c73bd0a5cc Fix a harmless compiler warning in FTS5.
FossilOrigin-Name: 2ea0c8b46eefd4874f021f8dfd344be751f2034f
2016-08-11 01:24:56 +00:00
drh 93ca3933d1 Optimization to sqlite3WhereExprUsage().
FossilOrigin-Name: 95493058fcf40306727a281f21c5a2a0011b7d02
2016-08-10 20:02:21 +00:00
drh e104dd3cc3 List of MATCH operator names in isMatchOfColumn() should be constant.
FossilOrigin-Name: 7319d676aaf95ba7391379f4cdf193b6aa898893
2016-08-10 19:43:29 +00:00
drh 922802c44e Performance enhancement in the expression walker.
FossilOrigin-Name: ebccbd96094ac64de39dbd0d220d3a7afd8cd40e
2016-08-10 18:56:32 +00:00
drh f5dbe7f8d8 Tweaks to pcache1TruncateUnsafe() to make it slightly smaller and faster and
easier to test.

FossilOrigin-Name: 059f4e2efefb7b9deaf539110c19bceaeb10c6ce
2016-08-10 15:02:49 +00:00
drh 167fbbe195 Rearrange the code inside sqlite3RunParser() routine so that sqlite3Parser()
is only called from a single place.  This allows sqlite3Parser() to be
in-lined, which results in a 0.25% overall performance gain.

FossilOrigin-Name: 25d1d02b3ea126ade22b2a72649ae55509aa1777
2016-08-10 14:40:00 +00:00
drh 765fecf010 Increment the version number to 3.15.
FossilOrigin-Name: 8c2701e70ab2553d7a586ff5fe7afa02d8c63199
2016-08-10 13:34:16 +00:00
drh 701b68879c Improved comments on the lempar.c parser template. Adjust the
YY_SHIFT_USE_DFLT constant in the Lemon-generated parser tables so as
to guarantee that it is always out of range of the yy_lookahead[] table.

FossilOrigin-Name: 83622f3f50030e4d6abafb99d99742928aaf157c
2016-08-10 13:30:43 +00:00
drh d9fabbcc5b Fix pcache1TruncateUnsafe() run faster for the case where iLimit is
very close to iMaxKey.

FossilOrigin-Name: b07a26df06a2ffb946ff8a1cc7f43eaf701a94b5
2016-08-10 11:50:12 +00:00
drh c83db9e4e1 Performance optimization in the yy_find_shift_action() routine of the
Lemon-generated parser.

FossilOrigin-Name: ba6663beefcc8060e6f3be6ab37c13fdbb08b7de
2016-08-10 01:43:30 +00:00
drh 8d57d7af23 Fix harmless compiler warning.
FossilOrigin-Name: 9a5a4f6e3bc265fecf79a7f63d14abbf239da636
2016-08-09 21:01:52 +00:00
dan ccf03677a3 Minor update to the way fts5 column filters are parsed.
FossilOrigin-Name: 14864f2b8470fe98dbd17f59963bf1be8d4962f9
2016-08-09 19:48:37 +00:00
dan 882ef0b8c0 Have fts5 interpret column lists that begin with a "-" character as "match any column except" lists.
FossilOrigin-Name: e517545650631d1e8a7ee63c6646a8b183a0a894
2016-08-09 19:26:57 +00:00
dan 9cd4933ec1 Add rowvalue5.test, which should have been part of the previous commit on this branch.
FossilOrigin-Name: ea03e219ced87777f0c3c6bbb0274078dbb829e2
2016-08-09 05:48:40 +00:00
dan 6256c1c242 Fix some cases involving row values and virtual tables.
FossilOrigin-Name: 156a41f30a0afd9a70e6c26470dcc468a11bd402
2016-08-08 20:15:41 +00:00
dan 1d9bc9b7a0 Fix the EXPLAIN QUERY PLAN output for row value range constaints that use an index.
FossilOrigin-Name: bb60651163553c5e46bf7b2805490570cea647b8
2016-08-08 18:42:08 +00:00
dan adeb970da2 Merge trunk changes with this branch.
FossilOrigin-Name: 0e927a7e0250a65fd8e97b322cd69e93fadd13f0
2016-08-08 16:52:11 +00:00
drh e22c375659 Version 3.14
FossilOrigin-Name: d5e98057028abcf7217d0d2b2e29bbbcdf09d6de
2016-08-08 13:40:27 +00:00
drh 6da466e4f4 Fix documentation typos. No changes to code.
FossilOrigin-Name: ebc396a19fa79bea208ecda277ffff5d02166d0b
2016-08-07 18:52:11 +00:00
dan e099b67c20 Have the TEA package build without SQLITE_OMIT_DEPRECATED. As it uses recently deprecated interfaces sqlite3_profile() and sqlite3_trace().
FossilOrigin-Name: 95578898835b933901603bd4d5e063f1219a016f
2016-08-05 20:54:45 +00:00
dan 43c1ce390f Undo commit [f250166bb]. It is required to handle IO and other errors that occur within a VACUUM of a Zipvfs database.
FossilOrigin-Name: ae72513af37cd806a6d94aaa7c47a740e119d3b1
2016-08-05 16:16:26 +00:00
drh 5360b55c6c Remove an incorrect ALWAYS() statement and add a test case to show when
the condition is sometimes false.

FossilOrigin-Name: 0f57effa3642e66a863f32cc7fba86d167084af3
2016-08-05 15:34:42 +00:00
drh 0aafa9c89c Fix a very obscure problem following OOM in sqlite3_declare_vtab().
FossilOrigin-Name: 68eac74874d0646369bef3650c6cb271cca62ab4
2016-08-05 14:35:47 +00:00
drh 70ae0e93ec Revert the SQLITE_APICALL changes for now. That changes needs further
research before it is released.  Deferred until 3.15.

FossilOrigin-Name: 9adda385267d1a0ecff259b42a284913668441a2
2016-08-04 13:23:28 +00:00
drh cc15313cc9 Add the experimental SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION compile-time option.
When enabled, the "unknown function" error is suppressed for EXPLAIN and
a no-op function named "unknown()" is substituted.  This facilitiates using
the command-line shell to analyze queries from applications that contain
many application-defined functions that are not normally available to the
shell.

FossilOrigin-Name: b7f30a9ff20d580fdaecdcf2b644d09ad6c2575e
2016-08-04 12:35:17 +00:00
drh dd545d3bf2 Make sure the ORDER BY LIMIT optimization is not applied if the inner-most
loop can only have a single iteration and is hence not really a loop.

FossilOrigin-Name: 13e3bd3de6b434b6182ef36be108d7ee0be8ca53
2016-08-04 09:09:44 +00:00
dan 3d1fb1dd75 Fix a problem with estimating the number of rows visited by a query that uses a multi-column IN(SELECT...) constraint.
FossilOrigin-Name: 3c2f908f5b7312570cfa74afcf4252a857cb5237
2016-08-03 18:00:49 +00:00
dan 2c628ea9d9 Fix another problem involving vector range constraints and mixed ASC/DESC indexes.
FossilOrigin-Name: 1559f4c43473e107f7196eea3ee91c53ede22999
2016-08-03 16:39:04 +00:00
dan d66e5794d1 Fix stat4-based cost estimates for vector range constraints.
FossilOrigin-Name: 18af74abc8ceae47ab9fbee3e3e5bb37db8fcba5
2016-08-03 16:14:33 +00:00
drh c0d269e96c Fix a typo in a comment in btree.c. No changes to code.
FossilOrigin-Name: 722c12816347ee9fce7a090cfebef2c5841e7445
2016-08-03 14:51:16 +00:00
drh a36e01a772 Fix the --help output on fuzzcheck so that it fix in an 80-character window.
FossilOrigin-Name: b91444b5db8465f09d112455e722c888b3f94329
2016-08-03 13:40:54 +00:00
dan 78f9bb6c71 Add new test file rowvaluefault.test.
FossilOrigin-Name: e496b2d63984311e6ae117677e6c2417ae24b6bc
2016-08-02 20:45:56 +00:00
drh c330887291 Fix a unused variable that comes up with -DSQLITE_OMIT_DATETIME_FUNCS.
FossilOrigin-Name: e2f9919e34c70761e4e275eeffca8ccf9159223c
2016-08-02 20:42:24 +00:00
mistachkin 3dffcf911f The 'replace.tcl' tool should use Unix line-endings.
FossilOrigin-Name: 50de96314f75494dc1f5b14d62c595a70c4e0638
2016-08-02 19:29:56 +00:00
dan 51d82d1d24 Add tests and fixes for vector operations that use sub-queries with different combinations of LIMIT, OFFSET and ORDER BY clauses.
FossilOrigin-Name: 092b1c5ff53c9f3cfed079c46e3353d93f99303e
2016-08-02 18:50:15 +00:00
dan f9b2e05c75 Fix SQLITE_OMIT_SUBQUERY builds.
FossilOrigin-Name: 339f85f414a484e44d2502d1ff7281caf9b7c838
2016-08-02 17:45:00 +00:00
dan d05a7144cd Fix a problem with vector range constraints and mixed ASC/DESC indexes.
FossilOrigin-Name: e2ad30c8b5366fd8e50f36c62345ed03ec613c47
2016-08-02 17:07:51 +00:00
dan 080508a186 Merge latest trunk changes into this branch.
FossilOrigin-Name: d468101b421e073e9debd7381bde1d36af31369e
2016-08-02 16:24:10 +00:00
dan 95a08c065a Add missing comments and make some code on this branch clearer.
FossilOrigin-Name: 6937677cc2c2db6b21f997559f88a339466cd15b
2016-08-02 16:18:35 +00:00
drh b7203cde29 Updates to requirements marks. No changes to code.
FossilOrigin-Name: b23c10ac8f65bc88a6c7d88e140217222eb4cbe5
2016-08-02 13:26:34 +00:00
dan 914b7e4238 Fix a problem introduced by [77948b5eceab92a7] causing duplicate calls to be made to the xSavepoint() method of virtual tables under some circumstances.
FossilOrigin-Name: e64a4173d2899acf13b73e6e28f2e164fd638a75
2016-08-02 11:29:16 +00:00
drh 38b802dfd7 Fix harmless compiler warnings in sqlite3_status().
FossilOrigin-Name: 7c38a79cdd42aaa45715aea330d10ca859098837
2016-08-02 08:45:26 +00:00
drh 19eb77bbe0 Update the wordcount.c test program and add a new script "time-wordcount.sh"
for additional performance testing.

FossilOrigin-Name: d8ef9f58643f13dd3d16dcde0d829ae08324f04b
2016-08-01 21:17:53 +00:00
dan 553168c706 Fix a problem with vector range constraints involving the rowid column. And other issues.
FossilOrigin-Name: 3ef75d45ebcd8ede91596d69e55fe7d685008a60
2016-08-01 20:14:31 +00:00
drh b0df540d7a Fix other harmless compiler warnings.
FossilOrigin-Name: 90d2c490fc2ed4e073711b84f989ca4d496dcfb5
2016-08-01 17:06:44 +00:00
dan 4df049faec Remove a duplicate typedef from loadext.c (remaining copy is in sqlite3ext.h).
FossilOrigin-Name: fd184e5a8f4577aa9a817eb55e771d8d1021b946
2016-08-01 16:57:30 +00:00
dan d7d19b7137 Add an extra compiler switch to loadext.test to ensure that it picks up the correct version of sqlite3.h when building a test extension.
FossilOrigin-Name: e57fa6af32a1d1bf7be64b26850730f7e714b6c6
2016-08-01 16:50:50 +00:00
dan 870a0705fe Fix a problem with IN(...) constraints where the LHS is a sub-select that is an aggregate query.
FossilOrigin-Name: 1f4dba87da4a44ad26223ad965731164c0d9bad9
2016-08-01 16:37:43 +00:00
drh 8ef24b8deb Update releasetest.tcl to automatically do one round of tests with
USE_STDCALL=1 when running on Windows with MSVC.

FossilOrigin-Name: a6a112de485eb9d15f6fa75568dcb876f00abb64
2016-08-01 15:00:00 +00:00
drh 32c83c8b9e Avoid making unnecessary changes to the signatures of the
sqlite3_auto_extension() and sqlite3_cancel_auto_extension() interfaces.

FossilOrigin-Name: b6ea2f21f602031ef4dbd47462ac11b0bb0d5de6
2016-08-01 14:35:48 +00:00
dan 5c288b929a Fix problems with vector == comparisons and NULL values.
FossilOrigin-Name: 059d0d05354e6efab7892c97b339ffa0b5303587
2016-07-30 21:02:33 +00:00
mistachkin 19e76b2a7c Fix harmless compiler warning seen with MSVC.
FossilOrigin-Name: 390a38a142d36d2c57b3f21aab72edcde450125d
2016-07-30 18:54:54 +00:00
dan cb17ce9300 Merge latest trunk with this branch.
FossilOrigin-Name: 63ae02d084a332250ff6fd8d8c80e53bf5422a68
2016-07-30 17:59:39 +00:00
dan 625015e0c9 Remove the EP_Vector expression flag.
FossilOrigin-Name: e9d9c6d46b46160fad6aa6e3441a65a09157515f
2016-07-30 16:39:28 +00:00
dan 19ff12dd76 Fix some issues with vector range constraints and the column cache. Also vector range constraints and rowid columns.
FossilOrigin-Name: 42607366bfc2dceb1013797a973b3b8df75dcb4d
2016-07-29 20:58:19 +00:00
dan 145b4ea519 Change the way "(a, b) = (SELECT *)" expressions are handled in where.c if there is an index on one of the columns only.
FossilOrigin-Name: 4dfebff2924f46284d5b9cda69175f79b29d6028
2016-07-29 18:12:12 +00:00
mistachkin 11f69b879c Using the header file 'intrin.h' requires MSVC 2005 or later.
FossilOrigin-Name: 9fae75c08b7d3b3e13734193ad8398ef6971cbac
2016-07-29 17:36:27 +00:00
mistachkin be56ad31b7 For test 'shell1-5.0', disable round-trip testing for characters in the range 0xE0 to 0xEF on Linux, due to intermittent shell portability issues.
FossilOrigin-Name: 544c990afd3b64064cc4d970ec5d7eb23eeb9914
2016-07-29 04:12:18 +00:00
mistachkin d62c07d42e Fix typo in a test file interactive output string.
FossilOrigin-Name: 4fedd7902371935e1374ca7df3ffd4c4cf93959b
2016-07-29 02:04:36 +00:00
drh 50972b71e1 Merge additional linkage macro changes from the branch.
FossilOrigin-Name: 8b0eb22ee12b23421dcb8dbeb46909d813788a0b
2016-07-29 01:55:42 +00:00
drh e363d50db8 Further refinement to the calling convention macros.
FossilOrigin-Name: 45588de385d2a721b3e9f04beb6c7b789dd27d42
2016-07-29 01:49:36 +00:00
mistachkin df27352e37 Merge updates from trunk.
FossilOrigin-Name: 71ffa195f5a48280ee522d80ab82e8cdea636961
2016-07-29 01:47:18 +00:00
mistachkin fefe82876c Update the autoconf makefile for MSVC.
FossilOrigin-Name: 2daf20980d4cb9ed36372778ae1f3e595e503549
2016-07-29 01:46:57 +00:00
drh 99bbcc8287 Undo some unhelpful changes to skip-scan scoring that were added
by the check-in [9e2b2681] that improved scoring of index scan.

FossilOrigin-Name: c7d51934a4f30d096bb79fc509fc9dd0df5d89a4
2016-07-29 01:32:36 +00:00
mistachkin c08556844e Add macro necessary for building several extensions when the __stdcall calling convention is not in use.
FossilOrigin-Name: bc8c9b55ddf5227dc6b2116486f4a19bf54fce2b
2016-07-29 01:31:49 +00:00
mistachkin 2d45d7bfab Missed a couple Tcl command deletion callbacks.
FossilOrigin-Name: fc5c187602acceedf7152b6927616d134f779a8f
2016-07-28 23:58:25 +00:00
mistachkin afe18262b4 Use the SQLITE_TCLAPI macro in several extensions that were missed in the previous check-in.
FossilOrigin-Name: df2543652b835353c03956dfbd3e35e5b191372e
2016-07-28 23:54:45 +00:00
mistachkin 85bd982ba0 More compiler warning fixes for GCC related to the auto-extension mechanism.
FossilOrigin-Name: b8218129bc848c61fa6910feae4141dac6ad86fc
2016-07-28 22:53:10 +00:00
mistachkin 78d5e02f99 The return type used by the auto-extension entry points is 'int', not 'void'.
FossilOrigin-Name: bf9c86c74f30136a106f37603a6c7dcc76caf41d
2016-07-28 22:46:53 +00:00
mistachkin 177d0f0b47 Make sure all the auto-extension mechanism function signatures match up precisely.
FossilOrigin-Name: 87ba69b5ca4a8e4ef2bbaaf07a0ff13fc5cd4721
2016-07-28 22:38:31 +00:00
mistachkin 44e95d4f02 Make the extension auto-loading mechanism work with the __stdcall calling convention. Also, fix a couple Tcl command calling conventions missed in the previous check-in.
FossilOrigin-Name: 3ea567c4b07b2a7a027b9b5cb8250ab687803698
2016-07-28 22:23:26 +00:00
dan 7b35a77b1a Fix further issues with multi-column IN(...) operators. Also some error handling cases surrounding row values.
FossilOrigin-Name: cc3f6542bec99b00d2698889bcea2aa0b587efa0
2016-07-28 19:47:15 +00:00
mistachkin e37f7397c9 The 'sqlite3ext.h' content should be processed before being included in the amalgamation.
FossilOrigin-Name: cbe1de4799df4d512bc175f51ed99c6ec6d5a4d1
2016-07-28 19:28:35 +00:00
drh 3a22fdab9a Decorate all interfaces with calling convention macros.
FossilOrigin-Name: fd784887e125bf95f4799ad09cbcba6795173487
2016-07-28 18:55:57 +00:00
mistachkin c0bebc1dcf All SQLite API functions and callbacks in the 'sqlite3ext.h' header file must be decorated with the calling convention.
FossilOrigin-Name: 97fc6e4328fe72cdd10f11a4b4bc9ce14bdc537f
2016-07-28 18:49:20 +00:00
drh a8914faaaa Disable the authorizer callback when reparsing the schema. This avoids
undesirable authorization failures following an ALTER TABLE.

FossilOrigin-Name: 805d01cdabb48a69eb986a7f084e53eb25d76b7f
2016-07-28 18:38:13 +00:00
mistachkin 7c60b26691 Fixup reserved function pointers in the Tcl stubs table and several macros containing Tcl function pointers.
FossilOrigin-Name: 959cd0131a5c717679b6e250229794679efe7f69
2016-07-28 18:18:53 +00:00
mistachkin a121cc7c60 Adjustments to get 'testfixture.exe' compiling with Tcl 8.6 when __stdcall is enabled.
FossilOrigin-Name: 90e89ec9c8efff057a9e43c612427fc5c97ab52d
2016-07-28 18:06:52 +00:00
drh aa0325872f Improvements to the way the COMPILER compile-time option is set when compiling
with Clang.

FossilOrigin-Name: 81f9cf86c48f3cd43755ded4dc97388ec650f8af
2016-07-28 17:24:16 +00:00
mistachkin 7617e4a8a4 Make sure the SQLITE_TCLAPI macro is always defined.
FossilOrigin-Name: f2f1323cc4d2ad2d6794dbfae8d50b747213e85d
2016-07-28 17:11:20 +00:00
mistachkin f27a80cf18 More work on getting the 'testfixture.exe' target to work correctly.
FossilOrigin-Name: 36b72fd609cf151f3db0e65b450d7cd515f2ac49
2016-07-28 16:09:52 +00:00
mistachkin fe0c0d2088 Modify the mksqlite3h.tcl tool to handle the syscall typedef specially.
FossilOrigin-Name: 478a84efa6ea13629227ba8970c8ef8545d31074
2016-07-28 15:38:34 +00:00
drh 4194ff6598 Change mksqlite3h.tcl to automatically insert the SQLITE_CALLBACK calling
convention macros.

FossilOrigin-Name: 11ab9c9ab562df98c20abf126a8bac178aef77a8
2016-07-28 15:09:02 +00:00
mistachkin 52b1dbb5fc Allow the 'testfixture.exe' target to be compiled with the __stdcall calling convention.
FossilOrigin-Name: e8be3dfeabaa31b3490793cf8230faae1204be15
2016-07-28 14:37:04 +00:00
dan 34c125747d Merge latest trunk changes into this branch.
FossilOrigin-Name: 9685880f7baeb670739fdcf2d9df08e22abaa699
2016-07-28 13:59:21 +00:00
drh 4aff119f3a New test case to insure legacy CREATE TABLE syntax is supported.
FossilOrigin-Name: 6feff15cae8f0427be790355841d49c479c1c586
2016-07-28 12:52:30 +00:00
mistachkin 69def7ff2f Work in progress on setting a calling convention for all callback functions.
FossilOrigin-Name: 02b8040e1add02734d2dbc6c59737ab74ff8fb18
2016-07-28 04:14:37 +00:00
dan d49fd4e89a Fix some problems with multi-column IN(SELECT...) processing.
FossilOrigin-Name: 719a3b2035a335ca8b9704646b1d641011e3ea0e
2016-07-27 19:33:04 +00:00
drh 5f26e00761 Enhance the query planner cost estimation for index scans to take into account
WHERE clause terms that can be computed using only the index and that do not
require looking up rows in the original table.  This fixes an obscure
performance regression that arose when the ORDER BY LIMIT optimization was
added by check-in [bf46179d44843].

FossilOrigin-Name: 9e2b26811452a5011d0a97a689636fa4409da856
2016-07-27 19:30:53 +00:00
drh e604ec0be0 Add test cases and fix a comment.
FossilOrigin-Name: 50f8ea37fb9647c4a9da2c269a4d6f54b10ce96b
2016-07-27 19:20:58 +00:00
drh 2409f8a112 When estimating the cost of an index scan, factor in the cost savings of
being able to use the index to evaluate some WHERE clause terms without
having to do a table lookup.

FossilOrigin-Name: a59b5622f7cc6e502d71aabc12c053582cd03609
2016-07-27 18:27:02 +00:00
dan d93ba6271b Initialize a variable in where.c to avoid a valgrind warning.
FossilOrigin-Name: 4d59df02d3713b3e3804e1a88e676749b2794286
2016-07-27 16:03:54 +00:00
dan d9ed09d47b Merge latest trunk changes into this branch.
FossilOrigin-Name: d4f3d52c5a11fc7ad7e8cad76361edbcef13a12f
2016-07-26 18:15:35 +00:00
dan 8da209b169 Fix where.c handling of "IN (SELECT ...)" expressions when the SELECT returns more than one result column. Also error handling for other row value constructor cases.
FossilOrigin-Name: 061b8006034f06a0311b4304c8b14d2c8b0153df
2016-07-26 18:06:08 +00:00
dan 2900a6222f Ensure that the sqlite3_scrub_backup() extension creates a backup database at least as large as indicated by the database header, even if the last page of the input database is a free-list leaf.
FossilOrigin-Name: 483994a54dee3c7a3801e0e9d3c96fa9dbd8d2fd
2016-07-26 10:46:21 +00:00
drh 9d60875901 Copy the cache_spill setting from the main database over to the
vacuum_db transient database when running a VACUUM.

FossilOrigin-Name: c0e7d98ef2a13ede5ae865083ede1aaffdf43310
2016-07-26 04:49:43 +00:00
drh 426f4ab009 Make sure affinity is applied correctly on lower-bound range constraints
in the min() optimization.  Fix for ticket [a0bac8b3c3d1bb].

FossilOrigin-Name: b819bace9c2a0b0159122b26db96a8f50a6f0eac
2016-07-26 04:31:14 +00:00
drh 2b62b5def8 In the VACUUM command, set the cache_size of the transient vacuum_db database
to be the same as the database being vacuumed.

FossilOrigin-Name: b78d99548ac53ac10dcc38368cc4b29c8cbcb09b
2016-07-25 22:40:12 +00:00
drh 07d9a03187 Fix a test case in FTS5 to make it compatible with Tcl 8.5.
FossilOrigin-Name: a495f8e77e14241150f79e746c7303284f04621a
2016-07-25 21:11:53 +00:00
drh 422dded5a9 Minor test infrastructure changes to better support SEE testing.
FossilOrigin-Name: 8dcb9d506b5eef3a21d97877217e0df69966a915
2016-07-25 16:10:43 +00:00
drh a522473c65 Add a new %ifdef to parse.y so that the build works with SQLITE_OMIT_SUBQUERY.
FossilOrigin-Name: 38a48cfb9a8212970c4a4f8458643c22ed067e8b
2016-07-25 14:40:43 +00:00
drh 017256802b Changes to test scripts to get them all running on OpenBSD.
FossilOrigin-Name: 9e7bedeee444cbf0b1a9165e88928c5d85088de1
2016-07-25 14:20:01 +00:00
drh 2aed979592 Disable the DBSTATUS_CACHE_USED_SHARED tests on mac when memsys3/5 is disabled
due to differences in the allocation sizes for the Darwin memory allocator.

FossilOrigin-Name: d6f6c87c9c0acf609a9d5bea818bb7a5437109a1
2016-07-25 12:10:25 +00:00
drh 26fe413be6 Update the vacuummem.test script so that it works on mac as well as on linux.
FossilOrigin-Name: ea7fb98b96f13f7dc5ed83ec5e8ad8857e20e06e
2016-07-25 12:01:18 +00:00
drh 5d513ba08c If both MEMSYS3 and MEMSYS5 are enabled, than automatically disable MEMSYS3.
FossilOrigin-Name: ccc22e14dc5d910d632807f49484be54dc2fde83
2016-07-25 11:57:21 +00:00
drh 6fe4c184fb Another attempt at getting --enable-memsysN working.
FossilOrigin-Name: 5f40e6ad599eea59a5adc3a11d6f7998872736b4
2016-07-25 11:39:24 +00:00
drh 26197d1b62 Fix the --enable-memsysN options in configure so that they actually work.
FossilOrigin-Name: 679552550e085497b98478bbe28056d99fe4aab4
2016-07-25 11:32:09 +00:00
drh c530b9c65b Add --enable-memsys3 and --enable-memsys5 options to the configure script.
FossilOrigin-Name: 67e1dc9842dc8a6ae5edef21bdb2ef6d3f4a17b7
2016-07-25 11:27:22 +00:00
drh 5fe63bfb93 Evidence marks and code reformatting for SQLITE_TRACE_STMT operation.
FossilOrigin-Name: e1e022383114525241454f63ea8b9768fb7ec657
2016-07-25 02:42:22 +00:00
drh bd441f7700 Change SQLITE_TRACE_STMT to return unexpanded SQL text in the X argument.
Add documentation on how and when to use sqlite3_expanded_sql(P) to compute
the expanded text for legacy sqlite3_trace() compatibility.

FossilOrigin-Name: 163e15229d837a5471007cffb8d41faafd081737
2016-07-25 02:31:48 +00:00
drh 087ec072ef Fix code so that the deprecated sqlite3_trace() and sqlite3_profile()
interfaces are not called when SQLITE_OMIT_DEPRECATED is used.

FossilOrigin-Name: 1c5baae3c545096a29a093f7d4387771f1db507c
2016-07-25 00:05:56 +00:00
drh 4b363a5130 Use sqlite3_trace_v2() instead of sqlite3_trace() in the shell.
FossilOrigin-Name: c8e0539b970585cbb3619461a53abb0c3b308a17
2016-07-23 20:27:41 +00:00
dan ba00e30a3a Allow vector IN(SELECT ...) expressions to use an index if either all the indexed columns are declared NOT NULL or if there is no difference between the expression evaluating to 0 and NULL (as in a WHERE clause).
FossilOrigin-Name: e2fd6f49b1b145bec09c581cc982b89429643ae9
2016-07-23 20:24:06 +00:00
drh 2ce26ff10a Add the json_quote() function to the JSON1 extension.
FossilOrigin-Name: 269892abf6e59c417729669cc764d1f237e093fd
2016-07-23 19:34:53 +00:00
drh eb09f6d788 Small tweak to the btree balancer for improved tree balance.
FossilOrigin-Name: 8817dedb75430e6c78ff527f7ded4abb35776cef
2016-07-23 19:18:55 +00:00
drh 49dcd79e7d Fix recently added tests so that they work in all configurations.
FossilOrigin-Name: d0bcaf0cd92ae5bbea7ad68537ba89437d5c39e8
2016-07-23 14:50:26 +00:00
drh 194c21de34 Add the sqlite3_expanded_sql() and sqlite3_trace_v2() interfaces.
FossilOrigin-Name: 99a6c51887d9d78409944c5a028d5a3ac2e066a7
2016-07-23 05:22:02 +00:00
drh 8afffe7244 Improvements to sqlite3_trace_v2() documentation. Fix the
sqlite3VdbeExpandSql() routine to respond better to OOM conditions.

FossilOrigin-Name: 0400f642d542e62bb428e0bf263964c65691368e
2016-07-23 04:58:57 +00:00
drh 557341e8fa Add requirements marks to the sqlite3_trace_v2() interface documentation.
FossilOrigin-Name: ebd388e94da4a2b29c2a546f832d359619803ec5
2016-07-23 02:07:26 +00:00
drh cf1e395acb Fix sqlite3VdbeExpandSql() so that it handles OOMs by always returning NULL.
FossilOrigin-Name: 5a027fe4127d498e0dc0d9439131c6a29085cf0a
2016-07-23 00:43:14 +00:00
mistachkin a4c07346b7 Revise a warning fix from the previous check-in to improve clarity. Also, fix an incorrect test prefix (typo).
FossilOrigin-Name: f50a3fd6606c14b82c9b938bfca284d54b6c650f
2016-07-22 21:35:38 +00:00
mistachkin 80f2b33a12 Fix harmless compiler warnings seen with MSVC.
FossilOrigin-Name: 8bb6e6fcedf7d0ae796b8848593106c921ebf21a
2016-07-22 21:26:56 +00:00
drh 9a8b9ec51c Be sure to hold the database connection mutex while calling sqlite3VdbeExpand()
from within sqlite3_expanded_sql().

FossilOrigin-Name: 527b5ba68c0b0185958b945b197f9022951d9379
2016-07-22 20:45:03 +00:00
drh dec8bc0eb4 Add requirements marks to the sqlite3_expanded_sql() documentation.
FossilOrigin-Name: 409535e6dfc307f26ea3d9f51be51c439b6d7b22
2016-07-22 20:20:53 +00:00
dan 4097d0ca79 Merge latest trunk changes with this branch.
FossilOrigin-Name: 60fed5cdd4a44aefa1b4d505adeb7936f2f0b952
2016-07-22 17:58:05 +00:00
dan 12ca5ac3d2 Fix a problem with upper case module names in the "sqldiff --vtab" command.
FossilOrigin-Name: 87e25fc472604b3978811be53991104c665a95e7
2016-07-22 10:09:26 +00:00
dan 033ac6af7e Add extra test cases to verify the fix in [64ca1a835].
FossilOrigin-Name: bf98a2de7ed41a8acca89d7369b353f12182cfb4
2016-07-21 18:02:20 +00:00
dan 89441bf185 Add new test file vacuummem.test. To test that any temporary memory used by VACUUM is freed as soon as the VACUUM has finished (not, for example, when sqlite3_close() is finally called).
FossilOrigin-Name: 1b1ad0b28c392ade4321734e9b022a545b845b04
2016-07-21 16:43:54 +00:00
dan 8414e81359 Add the largely untested SQLITE_FTS5_NO_WITHOUT_ROWID compile time option to fts5. For building a dynamically loadable extension that does not use WITHOUT ROWID.
FossilOrigin-Name: d0a1cf1c56c237617fb73cb31f4950365b1f3e9b
2016-07-15 19:17:19 +00:00
drh 8d85364261 The sqlite3_expanded_sql() function compiles, but always returns NULL, when
the SQLITE_OMIT_TRACE compile-time option is used.

FossilOrigin-Name: 53c25ebe34e6776a12260078852973b1d581d20f
2016-07-15 10:01:06 +00:00
drh 0e15d921d9 Merge fixes from trunk. Fix the tclsqlite.test script.
FossilOrigin-Name: d2b1fa55e8809ffc25a25f256349b8d08beadab5
2016-07-15 02:55:51 +00:00
drh eb5a549ecf Disable the CSV extension when virtual tables are disabled.
FossilOrigin-Name: ec7180892ac737f0731cf61f2d095a5c1d18ad93
2016-07-15 02:50:18 +00:00
mistachkin de6fde6af6 Modify the Tcl test command 'sqlite3_bind_blob' to make use of the Tcl_GetByteArrayFromObj() API.
FossilOrigin-Name: e03c81895e52096ab055d8231841e9070602ca84
2016-07-15 01:49:25 +00:00
mistachkin 283a85ca21 Fix typo in sqlite3_trace_v2().
FossilOrigin-Name: 97ccf15fb7e5103c8317d06a1985ba9c88544a60
2016-07-15 00:39:47 +00:00
mistachkin 170e998236 Corrections and enhancements for the new tests.
FossilOrigin-Name: 20e74c638537aa207de41a4f3c932cc05024ea9a
2016-07-15 00:23:01 +00:00
mistachkin a8f286a38a Modify one test result to be case-insensitive.
FossilOrigin-Name: 5ccbeeea7d7933402f7ccb0b1c9b3038989ca746
2016-07-15 00:09:53 +00:00
mistachkin e2f84b403c Add tests, including some for the sqlite3_expanded_sql() API.
FossilOrigin-Name: 8b8c0b749a9a1daca49e7ea9351e253443bb1fc2
2016-07-15 00:07:47 +00:00
mistachkin b52dcd8989 More work on the Tcl interface and tests for the sqlite3_trace_v2() API.
FossilOrigin-Name: f3c4aa97d8c10fdb69efc6405b5fa45781f45a61
2016-07-14 23:17:03 +00:00
mistachkin b56660f5a4 Initial work on the Tcl API interface to the new sqlite3_trace_v2() function.
FossilOrigin-Name: 7b59fa40a01c89cc98414d90a798169c26e04256
2016-07-14 21:26:09 +00:00
drh 0b4c042b86 Minor tweak the the b-tree balancer.
FossilOrigin-Name: d2a0af7a37e390439c3001fedb5834f47fb24a1f
2016-07-14 19:48:08 +00:00
drh 86396219a3 Fix ALTER TABLE so that it does not promote the schema version past 3, as
that will cause DESC indexes to go corrupt.
Ticket [f68bf68513a1c].

FossilOrigin-Name: a7db6e45ad45be9b3003f61d4163f543498a7c9d
2016-07-14 19:13:11 +00:00
mistachkin 0129a54a16 Fix copy/paste typo in the new sqlite3_expanded_sql() function.
FossilOrigin-Name: e7d18c70d2b8f09c9f5b978fe3d69d1088e42322
2016-07-14 09:22:16 +00:00
drh c0e2203adb Fix a parameter misordering on sqlite3_trace_v2() in the loadable extension
interface.

FossilOrigin-Name: 989de2d5b5e7155654d3eebadb9651b23f422c58
2016-07-14 01:13:36 +00:00
drh fca760c841 Add the sqlite3_expanded_sql() interface. Refinements to the
sqlite3_trace_v2() interface to make it more useful.

FossilOrigin-Name: 99ee7ee58d45b29a0000492306ddc0b90563ff51
2016-07-14 01:09:08 +00:00
drh 1637a5171f Legacy tests now passing.
FossilOrigin-Name: f33526a341132435cb4185149a784eef6b3a1a2d
2016-07-13 23:18:27 +00:00
drh 3d2a529df6 First cut at implementing the new sqlite3_trace_v2() interface.
FossilOrigin-Name: cb0062feb018f52689938a58cb76886d431c33f0
2016-07-13 22:55:01 +00:00
drh ed916ba025 Interface design for a new sqlite3_trace_v2() method that supersedes
sqlite3_trace() and sqlite3_profile().

FossilOrigin-Name: 0c569f759f6c4701321d7fea5e7ccb371743bb6b
2016-07-13 21:30:03 +00:00
dan cfbb5e82db Modifications towards better vector IN(...) support on this branch. Not activated yet.
FossilOrigin-Name: 34e35c71b25b0aa2d8931040feb260a78cc48c49
2016-07-13 19:48:13 +00:00
drh a0620acc4a Fix harmless compiler warnings in shell.c for NetBSD.
FossilOrigin-Name: 824b39e54fb9ba562be4d92cc9a54aee1cdf84cb
2016-07-13 13:05:13 +00:00
drh ce0442edf3 Fix header comments and remove an unnecessary version restriction from the
carray() table-valued function implementation.

FossilOrigin-Name: 021d0fb8d85e44839d2b4fdb90b15f0e1f2442e6
2016-07-13 00:55:28 +00:00
drh dd703e22a5 Fix the error counter reset in Lemon generated parsers. This has no effect
on SQLite.

FossilOrigin-Name: 3ef93950d30b34d852d6bbc101d433a04112868a
2016-07-12 19:54:49 +00:00
mistachkin 709947a315 Merge comment typo fixes from trunk.
FossilOrigin-Name: 728c5aa436a5f55c86b019c415a2b71d1b0a8fd6
2016-07-10 19:35:45 +00:00
mistachkin e234cfd11f Fix typos in comments. No changes to code.
FossilOrigin-Name: 77c692a6704cd877ba35d0afb774ab9b46364d59
2016-07-10 19:35:10 +00:00
dan 71c57db099 Add some support for using row value constructors in certain parts of SQL expressions. There are many bugs on this branch.
FossilOrigin-Name: b2204215b231202aef7a218411cc2ddaecf28f35
2016-07-09 20:23:55 +00:00
drh e39cd91aea Add the "#/value-list/" style of results for approximate value matching
in the do_test command of the test infrastructure.  Use this new result style
to make the SQLITE_DBSTATUS_CACHE_SIZE_SHARED tests cross-platform.

FossilOrigin-Name: c869bf34a8ee42ac6542862e59c7a4b89b042f79
2016-07-09 17:47:01 +00:00
drh a912348a19 Fix a compiler warning in test code - in the int64array_addr TCL command.
FossilOrigin-Name: 29fb988f1afc3fe623097acee1a5d08bf8386626
2016-07-09 17:15:05 +00:00
drh 11499f0ab4 Fix compiler warnings on windows.
FossilOrigin-Name: 8b22f777a11438ab0baadc7d9e471f415b734d1f
2016-07-09 16:38:25 +00:00
drh 43f58d6a17 Fix various internal #defines to conform to new C-language naming restrictions,
specifically that private-use macros names must not begin with "_".

FossilOrigin-Name: 5471aca0158851d3fb0a2517306917536deb38bb
2016-07-09 16:14:45 +00:00
drh c2024c4ef2 Add support for the win32-none VFS.
FossilOrigin-Name: b5f32a896d0e4010ec67fcf1d635bb9aa797d3c2
2016-07-09 00:06:21 +00:00
mistachkin 1e75483cf0 Initial work on a Win32 VFS with NOP locking.
FossilOrigin-Name: 549abe3f89b55b05a05f267865a5dd84b8cd335d
2016-07-08 21:14:37 +00:00
drh d3d4b3c698 Another attempt to fix error handling in Lemon. This change is a no-op for
SQLite's usage.

FossilOrigin-Name: e1d8ef311cabcb96495a88404991b1416655e4a8
2016-07-08 19:54:38 +00:00
drh 5225449e5b In the sqldiff program, make sure the first argument to the db_prepare()
utility function is always a valid format string.

FossilOrigin-Name: 8bb8d886ffa948cd7bc66c8c62da76bce233be2e
2016-07-08 02:14:24 +00:00
dan c8dcdff37e Add the SQLITE_DBSTATUS_CACHE_USED_SHARED sqlite3_db_status() parameter. This option is similar to DBSTATUS_CACHE_USED, except that it divides memory used by shared caches evenly between all connections.
FossilOrigin-Name: 06cf2680588c8dc4f0cbde275a09cfdcb5943268
2016-07-06 18:42:34 +00:00
dan 9c10608a26 Change the name of the SQLITE_DBSTATUS_PROPORTIONAL_CACHE_USED to SQLITE_DBSTATUS_CACHE_USED_SHARED.
FossilOrigin-Name: d58401ab26c7c5417eb7d540f47d11c4e49edcb2
2016-07-06 18:12:54 +00:00
dan dc7b7385c9 Fix a test script problem causing a test to fail if the ICU extension is enabled.
FossilOrigin-Name: 0c228f5d3db1be598ebf5d9170428c19d18e01ad
2016-07-06 10:17:43 +00:00
dan 272989b44d Add the SQLITE_DBSTATUS_PROPORTIONAL_CACHE_USED sqlite3_db_status() parameter.
FossilOrigin-Name: 118321c8b9d88b8f439c952436f42838c3fc80cb
2016-07-06 10:12:02 +00:00
dan 50687436f7 Fix a memory leak in recently added test code.
FossilOrigin-Name: 724e4cdc25fc80b8face57b3398cd338994fb23c
2016-07-06 09:19:14 +00:00
drh e0a6e0fda0 More fixes to Fossil so that it automatically resets its error counter at the
end of a parse.

FossilOrigin-Name: 2683b375ad1291172fdb47d94e16fcf869c78c8a
2016-07-05 16:11:26 +00:00
drh 240c7faf8b Attempt to reset the error count in the Lemon-generated parser after
a parse failure.

FossilOrigin-Name: 91889fa30e84760e0d4b3d429c4abdef5a3f7931
2016-07-05 12:47:28 +00:00
dan 2e993288e6 Add the sqlite3rbu_state() API. Used to determine the current state (creating OAL, ready to move OAL, incremental-checkpoint, finished or error) of an RBU operation.
FossilOrigin-Name: 0357875fbb1bb462feef5121287b2f84da88e497
2016-07-04 11:47:48 +00:00
drh 9697308f44 Add the carray() virtual table as a loadable extension.
FossilOrigin-Name: d8bc6feb99938a2aa06142b217045e4b54c66bf1
2016-07-04 11:34:56 +00:00
drh 2e3f87ae84 Change the name of the intarray() extension to carray() and give it an
optional third parameter that specifies the datatype as one of 'int32',
'int64', 'double', or 'char*'.  'int32' is the default.

FossilOrigin-Name: a204ba99db34b356acb259189158a32d2df25da0
2016-07-03 02:35:47 +00:00
drh ba637157ca Fix an off-by-one comparison in the intarray() virtual table. Get the
intarray() virtual table tests working using the legacy makefile.

FossilOrigin-Name: 7c3d441f2a9f642f3d91dcee854a4d16d298bc34
2016-07-02 20:57:06 +00:00
drh 2519b2a3e5 Merge the alternative table-valued function RHS of IN operator implementation
from trunk.

FossilOrigin-Name: 507fdbfb54ce377f0d870260b07d71b797843fcf
2016-07-02 20:51:31 +00:00
drh 9de4757c9c Fix a problem in table-valued functions on the RHS of an IN operator that
occurs following an OOM error.

FossilOrigin-Name: bead151e72215e6ca2a90eb049cfca414dccea04
2016-07-02 12:33:21 +00:00
drh 5fbab882c0 Add support for table-valued functions on the RHS of an IN operator.
FossilOrigin-Name: ac6000f050ff4efcf8a87f0825077dbf4144f073
2016-07-02 12:08:14 +00:00
drh 7c95696e5c Fix the transitive constraint logic error that can result in a null pointer
dereference.  Fix for ticket [e8d439c77685eca6].

FossilOrigin-Name: 228a7879870f8689e2f9b74fbef2ff93fab7b3c2
2016-07-01 20:12:39 +00:00
drh 883486bada Add test cases to the transitive constraint fix.
FossilOrigin-Name: c952af89c22ddc31491f142b9511608a4c8f9737
2016-07-01 19:48:43 +00:00
dan e336b8914c Add the sqlite3rbu_state() API. Used to determine the current state (creating OAL, ready to move OAL, incremental-checkpoint, finished or error) of an RBU operation.
FossilOrigin-Name: 92e7df0ff5c4c118c63d92a767dc82700438a310
2016-07-01 12:39:58 +00:00
drh 2d05331444 Add the ability to have a table-valued function on the RHS of an IN operator.
FossilOrigin-Name: ba1b441b6003808810667d749635fe6b2e8c6165
2016-06-29 06:19:19 +00:00
drh 64131c15ab Another test case for the intarray($PTR,$N) virtual table.
FossilOrigin-Name: 06e1fab7527c6b4330a58f8d8873afaf2d67ae86
2016-06-29 05:08:01 +00:00
drh 4841624ab9 Add a prototype intarray($PTR,$N) table valued function.
FossilOrigin-Name: 233b33382dc70de45f90b6dfdb5785f20b21489e
2016-06-29 05:00:30 +00:00
drh a2fbe3bec6 Proposed fix for a problem in the query planner.
FossilOrigin-Name: a33d23560959a127e37d8213dc00210cd4b05352
2016-06-28 22:27:56 +00:00
drh 05d1bad674 Prevent the WhereLoop.rSetup cost estimate from going negative on complex
queries.

FossilOrigin-Name: f81050859170c8708a1b296da8dd3ef0dd314a11
2016-06-26 04:06:28 +00:00
drh 4b37cd49a6 Fix the handling of OP_Eq opcodes that compare a register against itself
and that require an affinity change.

FossilOrigin-Name: 507014e4c7a70cd09410c89c8ed466c8edab39d2
2016-06-25 11:43:47 +00:00
drh f5fe00399f Fix the ctime.test script so that it works with clang.
FossilOrigin-Name: 77e4f7a36e6e0ebe842bcb36b2557a5bfba90d3f
2016-06-24 06:23:13 +00:00
drh be11ade7cf Fix the Makefile.in to avoid unnecessary recompiles of sqlite3.c.
FossilOrigin-Name: 67c39e16442d9359b24d60d5f97bd66c19eff16a
2016-06-24 02:50:44 +00:00
dan b10ab53f3a Update the sqldiff utility so that if the --vtab switch is specified "rtree", "fts3", "fts4" and "fts5" tables are diff'd directly and the underlying real database tables ignored. Without this switch, all virtual tables are ignored and the diff is performed on the underlying real tables.
FossilOrigin-Name: b8671e9434180878cfe15d70b793fdee69aabccf
2016-06-23 16:48:35 +00:00
drh ec5935924d Fix the build for -DSQLITE_OMIT_VIRTUALTABLE
FossilOrigin-Name: 911131424857430d46784b167399ecf192584ca2
2016-06-23 12:35:04 +00:00