Commit Graph

17506 Commits

Author SHA1 Message Date
dan
15e0f3d901 Avoid updating unaffected indexes on a table as part of an UPDATE that
requires foreign key processing in some cases.

FossilOrigin-Name: 7aae5c0f99aa2fda85654242cfc9e23a0f981d9ce4ab17610d619cd208540b3d
2017-04-11 20:48:30 +00:00
dan
940b5eaa5e Avoid updating unaffected indexes on a table as part of an UPDATE that requires
foreign key processing in some cases.

FossilOrigin-Name: 477bea9ed0dd0fa69896bfd16d9b1d22170cbab784e3279ce65c29c47e032f34
2017-04-11 19:58:55 +00:00
drh
ff6d50e973 Limit the depth of recursion for valid JSON in the JSON1 extension in order
to avoid using excess stack space in the recursive descent parser.
Fix for ticket [981329adeef51011052667a9].

FossilOrigin-Name: 1f68c184596912d742b50b1ca38252a9e783aacf121619a27b17a7ae9f6df041
2017-04-11 18:55:05 +00:00
drh
e97c9ff49a Smaller and faster implementation of exprMightBeIndexed().
FossilOrigin-Name: 76cd611d41465fcec61c21520d55172cb236530f38386b7d4a5544ba87de2353
2017-04-11 18:06:48 +00:00
drh
ef90a6b8dd Very slight smaller and faster sqlite3SelectNew()
FossilOrigin-Name: 4143650c4ce32289d2301cdfc69bb10877246420f656bed122886f6803fc956a
2017-04-11 16:44:39 +00:00
drh
cbae543a5c Add an ALWAYS() around an unreachable condition in sqlite3VdbeMemGrow().
FossilOrigin-Name: 0f3eb61f44c94234ffc14c3a493a27ec62c0d1e2bb62798f36eafa98ddcdc58e
2017-04-11 12:20:54 +00:00
dan
b8d29c2f75 Fix a segfault that could occur if an indexed expression was used in a
comparison operation within the result-set of a SELECT statement.

FossilOrigin-Name: d6bb7c42ff6309ce168ccdcf03b4cdabfccfc9e2a911d254ac7dc4fea4aa2bc1
2017-04-11 11:52:25 +00:00
drh
d6e992cb1e When using an index on an expression, try to use the columns of the index
rather than pulling columns from the table and reevaluating the expression.

FossilOrigin-Name: a47efb7c8520a01110ce3b3531ebe1bab6720780d67fba001992c44c5807d332
2017-04-11 01:30:42 +00:00
drh
eac5fc0476 Improved comments. Fix a problem when an indexed expression is used in an
ORDER BY clause.

FossilOrigin-Name: c59eaf2b7cd2596733f349fc0fe979f71fd29bd73152a0c57066e0b69d5b7a4a
2017-04-11 01:01:27 +00:00
drh
2f8b37850c Merge changes from trunk.
FossilOrigin-Name: 8978465f335925378d3aa99df6190ce6a1ee6b130205ccc493f2399803844760
2017-04-10 23:42:04 +00:00
drh
0415d826c0 Smaller and faster vdbeFreeOpArray()
FossilOrigin-Name: e052436d9f54b785facd661adc648512356b831c0547aa8f347ebf4bd8ef1254
2017-04-10 20:51:21 +00:00
drh
4c6463cc29 Slightly smaller and faster sqlite3VdbeMemGrow().
FossilOrigin-Name: efd1702ae8da8e0dd3d2ee7bd5a1bd8aeff2b370498e404041fcb406fdaf72e4
2017-04-10 20:27:54 +00:00
drh
2ac702d8c0 Add a new JSON test case to verify that all control characters are escaped
in the json_quote() function.

FossilOrigin-Name: 6ee12221fa252784c897a24ae8cff64dfe6149cbc9020abe14539df33202d892
2017-04-10 12:31:15 +00:00
drh
e12e24ded8 Change the JSON extension so that it disallows control characters inside of
strings.  Fix for ticket [6c9b5514077fed34551f98e64c09a10dc2fc8e16].

FossilOrigin-Name: 475d8f82ec61a4ff3e6a7650731230ccecb6cc580d1397d189d0ba479d9bad4d
2017-04-10 12:25:05 +00:00
drh
7a6ea93fd8 Do not expose the name of the internal Mem object in the public interface
defined by sqlite3.h.

FossilOrigin-Name: 19dd753f9e50fee247b1ab141669817c7e88bc3f6d6065dba6c731db9f7a2409
2017-04-09 19:23:55 +00:00
drh
9fa866a8d9 Disallow leading zeros on numeric constants in JSON.
Fix for ticket [b93be8729a895a528e2]

FossilOrigin-Name: 204e72f0080e8f08f99978870bd3cb9d59b068ecffee82192d707c650548b43b
2017-04-08 18:18:22 +00:00
dan
a34adaf667 Expand on the comment above OP_Destroy to explain why it throws an error if
there are any active reader VMs.

FossilOrigin-Name: b9a8c2b9bec9f537b2d5aff6659a5748b1f70b53519a1f9dfceb5209154eca8e
2017-04-08 14:11:47 +00:00
dan
5b09d13a58 Have the rtree module close any open blob-handle within the xSavepoint method.
This prevents such an open blob handle from interfering with DROP TABLE
operations.

FossilOrigin-Name: fa4416adc2a9a3a80db1d5befc0b95c3d0fc41affe38f7f2f45cdfae3f1b49eb
2017-04-08 13:52:41 +00:00
drh
13fe138b0a Fix the quoting mechanism for ".dump" so that it is not applied for the
".mode quote" output.

FossilOrigin-Name: 78c1e90305d48917d9423d8e50a7dfd15ec27aa93cb421610062229c7ede13a6
2017-04-08 13:42:55 +00:00
dan
be0bc8bb4d Have fts5 close any open blob-handle when a new savepoint is opened. This
ensures that fts5 does not prevent DROP TABLE statements (which always open a
savepoint) from succeeding.

FossilOrigin-Name: a921ada89050ce1d162fd1b0056939573635e2cec7ac0c2a99ae924b3ae593f7
2017-04-08 09:12:20 +00:00
drh
297e2bdb8e Make sure the RTree sqlite3_blob handle is reset prior to renaming the table.
FossilOrigin-Name: 1cdae2db3c54970a1811e597065724578408c84d49d75b8fe25d56281ddc2e94
2017-04-08 01:09:14 +00:00
drh
72507d431b Fix the ".dump" command so that it works with ".headers on". Also fix the
display of ".mode insert" with ".headers on".

FossilOrigin-Name: a6ce57ee3c7f3527554a75cc1dd5ebcd33c944d4dca07b134d103596a2ae5b32
2017-04-08 00:55:13 +00:00
drh
98368eeb2c Use replace() instead of char() to quote newline and return characters in
strings in the output of .dump, to avoid excess expression complexity.

FossilOrigin-Name: 7307352988174a6c2756dbbe200bf62a45fb4cc1da7faa2c6b0f75e229eab703
2017-04-07 20:20:08 +00:00
drh
f1824a77b0 Remove an unused token type.
FossilOrigin-Name: 13a422230dcf4a8a80434af97434d57e456dcaa6bf0c41e6859f37ded6fa96ca
2017-04-07 19:52:13 +00:00
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
6193d49cdf Use replace() instead of char() to quote newline and return characters in
strings in the output of .dump, to avoid excess expression complexity.

FossilOrigin-Name: 4c2b572969ea2ed2a925444ecfa356aa877018cbb9c4f57d081ab4b535cd1dd0
2017-04-07 11:45:58 +00:00
dan
54e2efcd2f Fix the ".lint fkey" shell command for cases where the child key is also an
INTEGER PRIMARY KEY.

FossilOrigin-Name: 48826b222c110a90996a84605318ea6b1e502b8c5129f4d561f8350dbdbcd264
2017-04-06 14:56:26 +00:00
dan
50da9382f9 Fix the ".lint fkey" shell tool command so that it works for foreign keys that
refer implicitly to primary key columns with non-BINARY default collation
sequences.

FossilOrigin-Name: 327eff25ba2420267cc8dc49dd3c3aab45f4bf9e060d1ad480e25d016d21f3ba
2017-04-06 12:06:56 +00:00
drh
6948ed5977 Remove a confusing and pointless sentence from the documentation for the
sqlite3_interrupt() interface.

FossilOrigin-Name: c5f1a2b6eb3df879d247a22b3f92f4f74fcf4f0d219450abc420ae6d02481324
2017-04-05 13:44:40 +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
ac48b751e2 Save a few bytes and a few CPU cycles in sqlite3ExprListDelete() routine.
FossilOrigin-Name: 9e6c939144a129b36bb119120442a4a021e00187783da211315d4bb13acd7c3a
2017-04-05 11:57:56 +00:00
drh
f4dd26c5a0 Remove a conditional made unreachable by the previous ExprList enhancement.
FossilOrigin-Name: a1cf44763277b6c745b5b5509ca9129b6c3231608b4d1c8aec2815b64b5a2a07
2017-04-05 11:49:06 +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
32d0eba4c2 Attempt to remove bash-isms from configure.ac. Use -O0 with --enable-debug.
FossilOrigin-Name: 71ed35ccf7c0f6c49118a44cf6621f46b9ea883e4a74d51b8b1ade6d9a95413a
2017-04-05 10:54:14 +00:00
dan
75f9558808 Fix a problem causing "PRAGMA integrity_check" to disable the xfer
optimization for subsequent VACUUM operations on tables with one or more CHECK
constraints. This could result in VACUUM producing slightly larger database
files.

FossilOrigin-Name: e5bb7db51cdfd8124c60329782798cea398733545594dab55cb892b2a08c4d29
2017-04-04 19:58:54 +00:00
drh
628dfe163f Avoid an unnecessary call to sqlite3WhereGetMask() inside of whereShortCut().
FossilOrigin-Name: 5c11f4303f6a33d6358f451244551be63baf9afe5630332e60b349215e20a3af
2017-04-03 14:07:08 +00:00
dan
cfb3235752 Do not attempt to run sync2.test with SQLITE_DISABLE_DIRSYNC builds.
FossilOrigin-Name: 658f08ce84b45f057843263961f6c47a322f841764134ec38f35719f0f2042d7
2017-04-03 13:59:22 +00:00
drh
761f691d0e Force a schema load prior to "PRAGMA optimize".
FossilOrigin-Name: 86897c24c0b35ffea8df72d86a099addf67de210c6568aaba22ef92f1a60c3cf
2017-04-03 13:33:51 +00:00
drh
1cc3a36d90 Fix typos in the documentation for OP_Column.
FossilOrigin-Name: 777b43e64ffb2fb80ba7b705c129c133bf9787993a66cde1759dc070b324b4b4
2017-04-03 13:17:31 +00:00
drh
caab5f42db Slightly smaller and faster implementation for vdbeSorterCompareInt().
FossilOrigin-Name: 84fa069c5bdfe41d03d03875c9157cc6785150b677c04e40b8916ba5af073dc8
2017-04-03 12:04:39 +00:00
drh
8e633b3ba9 Remove an unnecessary setting of the Mem.enc field for the output of the
OP_Record opcode, for a performance improvement and size reduction.

FossilOrigin-Name: e6e36b288fdf21b7ff7f0bf85d2225b6505f54367b183c302c93c34a4a40b8b5
2017-04-01 20:44:26 +00:00
drh
662c50e067 Minor performance enhancements to the OP_Affinity opcode.
FossilOrigin-Name: c45cd3b947c0f03a688f827fddb4629a986788f0dd98d5ef899f11e68ff1c202
2017-04-01 20:14:01 +00:00
drh
96a7e28df6 Remove an unnecessary clearing of the Vdbe.iCurrentTime value.
FossilOrigin-Name: fcd2acdd6075aa9a7a66ce254eba77485f7b2804127e109c0309173488cd4b87
2017-04-01 19:45:20 +00:00
drh
b808d77771 Faster implementation for sqlite3VdbeIntValue() and sqlite3VdbeRealValue().
FossilOrigin-Name: 8698df60c23d4dcc80b58352c14ae80ec238cac496f8a87bd72a96fef61cc63f
2017-04-01 11:59:36 +00:00
drh
b6017a44c5 Remove unused fields from the BtCursor object.
FossilOrigin-Name: 1c0d82e0786ed22d07d774b8b166340fad97bcaab6016e395c469bcfcb7c77a3
2017-04-01 11:40:05 +00:00
drh
75e96b3100 Save a 78 bytes of code space and a million CPU cycles in speedtest1 by
storing the cell index for the leaf page in the BtCursor object in its own
field (BtCursor.ix), rather than as an entry in the BtCursor.aiIdx array.

FossilOrigin-Name: 2452f0617d1085689264b5f66681788cfe9e3b1a7b318307c93942b702a443df
2017-04-01 00:20:06 +00:00
drh
53b2459a36 Declare the Lemon-generated parser object as itself. (Duh)
FossilOrigin-Name: c8000e94cca59dabf83d6cb75b40441aaf793d29880582dc4baa17246449b5fe
2017-03-30 17:13:37 +00:00
drh
52105783fd Increase the version number for the next development cycle.
FossilOrigin-Name: 9e550ccc29f317422dae3a4bb89a78b839330825fecd40a01d1a2acc719cef79
2017-03-30 16:51:35 +00:00
drh
ecc0f84d08 Ensure that the stack space used to hold the Lemon-generated parser object
is always 8-byte aligned.

FossilOrigin-Name: 1279de0b70cabf39899d92ece8852a780fd800bf3154971537b3427e5bd3ca50
2017-03-30 16:37:05 +00:00
mistachkin
b3d3bea31d When compiling with MSVC, disable extra SELECT/WHERE tracing for dynamically built shells.
FossilOrigin-Name: a68919425c528b887e66b588a73a619f0506cb06855350e0ec8f844acf64d8f7
2017-03-29 23:22:18 +00:00