drh
aca19e19a8
Proof of concept for the ability to use the expression columns in an index
...
on expressions in place of equivalent expressions in the result set or in
the WHERE clause. This check-in compiles but is mostly untested.
FossilOrigin-Name: a52ef2ad7c0e14b78b801f16a1f6ea8d8fa9ae5d7d810e18dd24c600b662a312
2017-04-07 19:41:31 +00:00
drh
dbd6a7dc06
Split off sqlite3DbFreeNN() from sqlite3DbFree() and use it in cases where
...
we know that the argument to be freed is never NULL.
FossilOrigin-Name: ad90e8bb5e47945607c8fb47b6ade8cfc52a9b684805cc40132629be0ecc14cc
2017-04-05 12:39:49 +00:00
drh
43606175e2
Combine the ExprList_item objects and the ExprList wrapper into a single
...
memory allocation, for improved performance and reduced footprint.
FossilOrigin-Name: 2b6560ad88b92820c383bcdc1e30c06f8b081ef7c6d9b1af71d2bb76c83e35cd
2017-04-05 11:32:13 +00:00
drh
3e7d012eb1
Make the default value for SQLITE_DEFAULT_SYNCHRONOUS a simple integer
...
literal, so that it does not show up goofy in the output of
"PRAGMA compile_options;".
FossilOrigin-Name: 833ab3212addc340ca8004e8d6a06cc5e51bf256f43dc73d87fbe67518a4891b
2017-03-25 18:03:26 +00:00
drh
bce0414844
Do a single OP_Expire at the very end of "PRAGMA optimize", and omit the
...
OP_Expire on ANALYZE commands invoked by the pragma.
FossilOrigin-Name: 188300a337c87b7ee0dd1f4b9a4f1bd80e70cca4
2017-02-23 00:58:36 +00:00
drh
114ce7a4b1
Merge integrity_check and other improvements from trunk.
...
FossilOrigin-Name: fe073905081b421405ca425ca03c5b8b0ff5f2c8
2017-02-22 19:49:54 +00:00
drh
8b174f2916
Fix integrity_check so that it verifies NOT NULL constraints even for tables
...
that have no indexes. Enhance quick_check so that it verifies NOT NULL and
CHECK constraints.
FossilOrigin-Name: 5264844b069cdc20f456acee9f5b2b97c986120d
2017-02-22 15:11:36 +00:00
drh
4a54bb5794
Add the OP_SqlExec opcode and use it to implement "PRAGMA analyze_as_needed",
...
invoking ANALYZE subcommands as necessary. This simplifies the implementation.
FossilOrigin-Name: d386015f5e7ecdd951d70db56b7bbd858be7ad90
2017-02-18 15:58:52 +00:00
drh
182e84c116
In the analyze_as_needed pragma, avoid running unnecessary OP_LoadAnalysis
...
and OP_Expire opcodes. Make the analyze_as_needed pragma responsive to the
schema name.
FossilOrigin-Name: 882599a4a7ea92c9e7752e0745475508e58a11c3
2017-02-18 02:19:02 +00:00
drh
5e98e838da
The analyze_as_needed pragma now responds to table size growth and will
...
automatically rerun the analysis after each 10x size increase.
FossilOrigin-Name: bfbdd07409688fac4ccddbab3639745f6152e23d
2017-02-17 19:24:06 +00:00
drh
72052a73a3
Add the "PRAGMA analyze_as_needed" command.
...
FossilOrigin-Name: e93db2373127d31d33ec46ef918fa9386bb664a6
2017-02-17 16:26:34 +00:00
drh
a3928dd7be
Set the TF_StatsUsed flag on tables when the query planner outcome is
...
affected by the sqlite_stat1 data. Also, change the column names of the
"PRAGMA stats" command so that they are not keywords.
FossilOrigin-Name: fb2b8ae8310e4ea4b42354bbf36c3084a9d5c6d7
2017-02-17 15:26:36 +00:00
drh
33bec3f5e8
Enhance the Index and Table objects so that they remember if their stats come
...
from the sqlite_stat1 table. Make the "PRAGMA stats" an SQLITE_DEBUG only
pragma. Add the flags column to "PRAGMA stats". These are all preliminary
steps toward a "PRAGMA analyze_ifneeded;" feature.
FossilOrigin-Name: 85026c8ee143bbd46565660fff8346ef81421546
2017-02-17 13:38:15 +00:00
drh
c5f4816fc5
Fix a comment on a field of the ExprList object. No changes to code.
...
FossilOrigin-Name: bb8e264227175fc93f1c86a0083f8ad6c4ce2dc7
2017-02-16 16:26:53 +00:00
drh
6f271a421d
Increase Table.tabFlags from 8 to 32 bits.
...
FossilOrigin-Name: 7e14044c65f64322769bcad4640a5896be0a1687
2017-02-16 15:57:30 +00:00
drh
44266ec651
Always use the IsVirtual() macro to determine if a Table object is a virtual
...
table. Slightly smaller and faster code.
FossilOrigin-Name: 6affb1c89d87288cad87dde5a533832cdf06b8aa
2017-02-16 14:48:08 +00:00
drh
dc5ece86ae
Remove the CLANG_VERSION macro, since we have learned that version numbers in
...
clang are "marketing" and are inconsistent and unreliable. Builds using clang
will still use the GCC_VERSION macro since clang works hard to be gcc
compatible.
FossilOrigin-Name: 810d29320b853b3a01aa50d8f2a0bceacf79e0aa
2017-02-15 15:09:09 +00:00
drh
f9463dfbcf
Fix indexes on expressions so that they can be actually used with
...
a COLLATE clause.
FossilOrigin-Name: e464b919f76520b45bb58983c6702db59d820ee4
2017-02-11 14:59:58 +00:00
drh
a39284bfa8
Cleanup the usage of the SQLITE_DISABLE_INTRINSIC compile-time option.
...
Remove the SQLITE_RUNTIME_BYTEORDER compile-time option. Use
-DSQLITE_BYTEORDER=0 instead. Fix a bug in R-Tree that occurs when compiling
on a known little-endian machine without the use of intrinsic byteswapping
functions.
FossilOrigin-Name: 798fb9d70d2e5f95e64237b04d6692360133381a
2017-02-09 17:12:22 +00:00
drh
1650fcb1b5
Fix the build by making the OPFLAG_ISNOOP macro available unconditionally.
...
FossilOrigin-Name: 510933cb24c5bf883265af3a6075e60a4b5ffa37
2017-02-01 15:19:29 +00:00
dan
e7eeeb99f7
Fix building with SQLITE_OMIT_FOREIGN_KEY defined.
...
FossilOrigin-Name: e93d2c49a44af994ff10cc9cc7eafacd5a4f73ab
2017-01-30 11:38:19 +00:00
drh
d26cc54183
In the amalgamation, allocate the parser engine object from stack rather than
...
from heap, for improved performance. This only happens in the amalgamation,
since otherwise the sqlite3RunParser() routine does not know the object size.
FossilOrigin-Name: 4fe879d4b5da6ae0688a7a99004683a234966597
2017-01-28 20:46:37 +00:00
dan
f64ece143c
Avoid redundant table b-tree cursor seeks in UPDATE statements that use the
...
two-pass strategy.
FossilOrigin-Name: dc555b1039c6930f6d15355c698ff917a85e8056
2017-01-28 19:45:34 +00:00
drh
d447dced96
Trim NULL values off the end of records when the SQLITE_ENABLE_TRIM_NULLS
...
compile-time option is used. Increase the size of the P5 operand to 16 bits.
Fix a problem with short records in the sessions extension.
FossilOrigin-Name: 4801bd59a01dcc11a3eb9e776e7599b36f162d2a
2017-01-25 20:55:11 +00:00
drh
585ce1923c
Experimental enhancement to automatically trim NULL values from the end of
...
records, for a reduced disk footprint. This change also involves increasing
the P5 operand from 8 to 16 bits.
FossilOrigin-Name: 118ded403b95050b74ae2b03919c43d614094a32
2017-01-25 14:58:27 +00:00
drh
8674e49214
If compiled with SQLITE_INLINE_MEMCPY, all memcpy() calls are replaced with
...
in-line code. With that change, cachegrind shows which memcpy() calls
are taking the most time. This is a performance-measurement hack only and
is not for production use.
FossilOrigin-Name: 9ed38521617136223a667988aed40e25797faf84
2017-01-19 21:20:11 +00:00
drh
c711f53f30
Disable intrinsic functions for Windows using Clang, due to reports of
...
linkage errors. This causes a 0.6% performance reduction. We will want to
revisit this change in the future.
FossilOrigin-Name: 7fd560c6d2ff470b755ad118287a0a8825b3009e
2017-01-17 00:10:58 +00:00
dan
f91c1318f4
Changes to allow some multi-row UPDATE statements to avoid the two-pass
...
approach.
FossilOrigin-Name: 46db23ccd116ce5b9d949f9293be8a2818411b46
2017-01-10 20:04:38 +00:00
drh
ad879ffdb5
Clean up the implementation of constant function factorization.
...
FossilOrigin-Name: 2ab997e47998d261bd6190bbce5c09f3fbd4cfd3
2017-01-04 04:10:02 +00:00
drh
1e9b53f9bc
Attempt to factor out constant functions from the interior of table scans,
...
since functions can often be expensive to compute.
FossilOrigin-Name: 62e9270a8057d758621da33adb27fad14225f95d
2017-01-04 01:07:24 +00:00
drh
7433ae5df6
Back out the use of __sync_fetch_and_sub() as it does not appear to work.
...
FossilOrigin-Name: 4c2efd4239bf07eb4b92d4af54edd68ee6312670
2017-01-03 21:50:49 +00:00
drh
5c6b944d16
Fix a typo in a comment.
...
FossilOrigin-Name: ae087123db8e7d47b25a8d0a98cfd62e85e42fc6
2017-01-03 21:03:37 +00:00
drh
b94f2eccc1
Use the CLANG_VERSION macro to control clang-specific features.
...
FossilOrigin-Name: f8ebeec211483503e135104ef977b3c384a1d789
2017-01-03 20:01:24 +00:00
drh
eea46aeafc
Use the GCC built-in __sync_fetch_and_sub() to make the sqlite3StatusDown()
...
routine atomic, and thereby avoid some mutexing.
FossilOrigin-Name: f69ce75b3d94331fdbfa2f3a27d61db24c285d2b
2017-01-03 18:05:04 +00:00
drh
01e64a1704
Merge all the latest changes from trunk.
...
FossilOrigin-Name: c27cd8a8127b81d3176f6a5b9915c9b3c69574fb
2017-01-03 14:30:28 +00:00
drh
83a4f47d57
Change SQLITE_DEFAULT_PCACHE_INITSZ from 100 to 20, which is experimentally
...
determined to be slightly faster.
FossilOrigin-Name: 12d9493cb29307aec65ceccc68e802e4d0f18112
2017-01-02 18:40:03 +00:00
drh
38eef32172
Avoid unnecessary calls to sqlite3BtreeEnterAll() and sqlite3BtreeLeaveAll()
...
when no btree is using shared-cache.
FossilOrigin-Name: cfb3158204628eb2fd170090a7f212df0e4ce6c9
2017-01-02 18:19:29 +00:00
drh
a1a523a5bb
Add the built-in affinity() SQL function.
...
FossilOrigin-Name: 57e40e1cb1bcd3dd8473d2fdeecc9c7ff3d6192b
2016-12-26 00:18:36 +00:00
drh
9bf755cc44
Use the VList object to replace Parse.azVar for tracking the mapping between
...
SQL parameter names and parameter numbers. There is a performance
improvement, though there are still a few hiccups in the current code.
FossilOrigin-Name: 68ecafa1425a41358c88f41efea3262f1b4490f2
2016-12-23 03:59:31 +00:00
drh
2fcc1590c4
Code to automatically create eponymous virtual tables for read-only pragmas.
...
Compiles, but does not yet work.
FossilOrigin-Name: 988a61e8b03f302c69d11898d1ea95f002cba1a5
2016-12-15 20:59:03 +00:00
drh
79df77821a
Refactor the Table.nRef field as Table.nTabRef for easier grepping.
...
FossilOrigin-Name: 9cae4c2e300e20304ced0dc8c1415c4922185928
2016-12-14 14:07:35 +00:00
drh
d07df8e76a
Increase the size of the reference count on Table objects to 32 bits.
...
FossilOrigin-Name: d08b72c38ff6fae6ddf7dc84a54f6d7189876289
2016-12-14 13:54:25 +00:00
drh
d12602a9c5
Rename the SQLITE_OMIT_BUILTIN_TEST compile-time option to SQLITE_UNTESTABLE.
...
FossilOrigin-Name: f360818737e73ee4f944685a547abc8f14f47819
2016-12-07 15:49:02 +00:00
dan
44c5604ced
Prevent the flattening or where-term push-down optimizations from obscuring
...
misuses of SQL row values that can lead to crashes or assert() failures.
FossilOrigin-Name: 433d16ff3adfede3be53d5b0e0512f37e225591b
2016-12-07 15:38:37 +00:00
drh
9314bd5fe2
Always honor the sqlite3.dbOptFlags bitmask, regardless of compile-time
...
options. Continuing fix for ticket [da78413751863].
FossilOrigin-Name: afab166313e0b8ad530df99887437a362398ed02
2016-12-07 13:49:11 +00:00
drh
abfd35ea03
Performance improvement and size reduction in the Expr node allocator
...
function sqlite3PExpr().
FossilOrigin-Name: 2a81763e68cdf9b8c46389b1e1a87bc2084b53e7
2016-12-06 22:47:23 +00:00
drh
588429a87d
Fix a potential use-after-free error during parsing of malformed
...
CREATE TABLE statement.
FossilOrigin-Name: c5dbc599b910c02a961675b12b273b8df6d29450
2016-11-14 20:08:00 +00:00
dan
257c13fa00
Avoid storing redundant fields in sorter records when the sort-key and data have
...
fields in common (as in "SELECT a FROM t1 ORDER BY 1").
FossilOrigin-Name: 0af62fdbd8e2aab14718ff8bcb5934f05463c176
2016-11-10 20:14:06 +00:00
dan
298af02308
Add the SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE sqlite3_dbconfig() option - for
...
disabling SQLite's default checkpoint-on-close behaviour.
FossilOrigin-Name: 093d2fc2288b75c15ccf877bfa0e622d3918a562
2016-10-31 16:16:49 +00:00
drh
de25a88c50
Avoid unnecessary strlen() calls in sqlite3ExprAssignVarNumber() by passing in
...
the token length from the parser.
FossilOrigin-Name: d15ae2e530cffea60263f203ac5f89b6790f4bd5
2016-10-03 15:28:24 +00:00