drh
cf3c078f93
Add a linked list of ParseCleanup objects to the end of a Parse object and
...
use that list as a place to put other sub-objects that need to be deallocated.
Have a single such list for infrequently used sub-objects is more efficient
than doing an a separate check for each kind of sub-object.
FossilOrigin-Name: affa2b7b316941b8a6c4d0d1ff212c81a593faf1d05d129e14d2b70d73a25c59
2021-01-11 20:37:02 +00:00
drh
d1032f952c
Improve the speed of the tokenizer by recognizing that tokens starting
...
with letters "_", "Y", or "Z" can never be SQL keywords and must be ordinary
identifiers.
FossilOrigin-Name: 16e281ed6219cc229dec7e3f1b40da2304dc270a74fd6ef78d04a088e30e7026
2020-11-27 20:56:16 +00:00
drh
08b9208660
Fix harmless compiler warnings that surface in newer versions of GCC.
...
FossilOrigin-Name: 9d670a318381f219b467653f5f9539097808b887ae37291ce13be462dedfb18d
2020-08-10 14:18:00 +00:00
dan
892edb69c4
Use __atomic_load_n() and __atomic_store_n() for a few more things where they are available.
...
FossilOrigin-Name: a49f8ec552bede7da731e0571ccf49de1a30e7be3a5673150436c8b411ba6ffc
2020-03-30 13:35:05 +00:00
mistachkin
16fd04cdbe
Enhancements to SQL query normalization for UPDATE statements.
...
FossilOrigin-Name: bba975c7af3de9aeb5c62fb8b05d61b96e4ecd0b030008442bbdd345e1e5f134
2019-10-16 17:46:22 +00:00
drh
2b454e0335
Fix a harmless compiler warning that only comes up during debug builds.
...
FossilOrigin-Name: 848869ced988ca4d0ac76d43f984360fd11997a580719cccf8d55becea4e8fb1
2019-02-26 16:11:46 +00:00
drh
1cf197583d
Give the sqlite3 object a pointer to the current Parse so that if an OOM
...
occurs, it can automatically set the Parse.rc value to SQLITE_NOMEM. This
avoids a frequent extra test of db.mallocFailed in the innermost parser loop.
FossilOrigin-Name: 5c6638040b3017c6be016441422d965a3ca00dd6ae1f78cadc0b54562978f64e
2019-02-08 14:55:30 +00:00
mistachkin
844b900491
Fix harmless compiler warning.
...
FossilOrigin-Name: dddda685f3443d8a38901f758543fcde73d7b8cfe72b0ad5f419cd7459343bf5
2019-02-02 01:27:45 +00:00
drh
9b747068ba
Improvements to "PRAGMA parser_trace=ON": Make it a flag pragma, and then
...
use the flag to show the complete SQL text at the beginning of the parse.
FossilOrigin-Name: 507c43537f00d089efb3c3020fb6e826e8f89f3efa2caaa12c5309d35dd0c22e
2019-01-31 01:39:01 +00:00
drh
1a6c2b1d38
Further refinements to the sqlite3_normalized_sql() interface. TH3 now
...
gives 100% MC/DC on that interface.
FossilOrigin-Name: c96bf6cca220e363b099455ce35195ce7e89d374a52dc787f56e7b11e587bced
2018-12-10 20:01:40 +00:00
drh
9042ff214b
Fix issues with the new normalizer.
...
FossilOrigin-Name: 057d7d40c56b7416a59a79cb627b2b3e5837eca2d6dbcb50127baaadf1941f51
2018-12-10 16:49:33 +00:00
drh
643d855da9
Refactor the sqlite3_normalized_sql() implementation. This is a
...
work-in-progress. There are still issues.
FossilOrigin-Name: a4c890b0af9786295e6df05022009d8946550adb873535c610be805c2b7a4083
2018-12-10 16:00:57 +00:00
mistachkin
8bee11a41e
Add the sqlite3_normalized_sql() API.
...
FossilOrigin-Name: 592b66e8058dd03a056a036e2606247c9efdb06d15eebe9bcc455f7f55e30ae6
2018-10-29 17:53:23 +00:00
dan
c9461ecc28
Extend RENAME TABLE to edit triggers and views. Still buggy.
...
FossilOrigin-Name: 01308bae3acf33f78b5bb90892085eab340df093aafc17e6ccf6a7d6cf324897
2018-08-29 21:00:16 +00:00
drh
38d9964a73
Additional fixes for harmless compiler warnings that are specific to this
...
branch.
FossilOrigin-Name: 9d8e73bf71e996b810959ffc0e60de69b5e8ca3301df52f9c35d5e9075921798
2018-08-18 18:27:18 +00:00
dan
5496d6a25a
Edit the WHEN and UPDATE OF clauses of trigger programs as part of ALTER TABLE
...
RENAME COLUMN.
FossilOrigin-Name: 5fdb6b0aafba727139e1937ef5950e4434a77f95a10fc46f8010ca2de3922326
2018-08-13 17:14:26 +00:00
dan
cf8f289542
Experimental implementation of ALTER TABLE ... RENAME COLUMN. Still buggy.
...
FossilOrigin-Name: fa0fc01eb48a864f0a3d43f9b805d5ed2e530846ee0c34fcbc2eabd9e5696277
2018-08-09 20:47:01 +00:00
drh
c7bf57168a
Fixes for various harmless compiler warnings.
...
FossilOrigin-Name: 5023b1b85b883a716a5da673740b6effe214ee0490f4ca45f161bb8b04784366
2018-07-09 22:49:01 +00:00
dan
2b5f152601
Fix a minor problem in the code for determining whether or not an SQL
...
statement is SQLITE_TOOBIG.
FossilOrigin-Name: 763e6c9e2bbc0a6ef8d8361069bf7160790c9064f24f0e336b7ed85668735da9
2018-06-30 20:00:35 +00:00
dan
6e2210e0a1
Have the tokenizer handle fallback for tokens "OVER" and "FILTER" in the same
...
way as it does for "WINDOW".
FossilOrigin-Name: 12d819e1c17d8036900352b0989c4bfcbc34193c3735bb9af7ab051f0f129d3d
2018-06-30 18:54:56 +00:00
dan
34a7d790ba
Further performance related tweaks for sqlite3RunParser().
...
FossilOrigin-Name: 5eb4776598f5bba7ef21a2c58c03105544da73d642d7ffc146f84eff1993d71e
2018-06-29 20:43:33 +00:00
dan
d437ac0c58
Further tweaks to sqlite3RunParser().
...
FossilOrigin-Name: eef61ffab7fa36b126f57bf7028dd35c67ed4617c47145be059f91e58023b0a4
2018-06-29 20:21:24 +00:00
dan
769309fcf3
Improve on the previous checkin. Still a bit slow.
...
FossilOrigin-Name: c1fb41aa7b7207b81ee1d5d32da3380b36d694033b87a2873981e0c6437ba956
2018-06-29 19:54:51 +00:00
dan
59ff42516c
Instead of using a lemon %fallback directive, have the tokenizer try to figure
...
out whether an instance of "WINDOW" should be TK_WINDOW or TK_ID.
FossilOrigin-Name: 022079cb0d67be5ac0a50dd9a4d41ee55ce8df681ecd0a544170d75fc8649978
2018-06-29 17:44:52 +00:00
drh
875ad8ceb1
Improved context for error_log message coming from sqlite3_prepare().
...
FossilOrigin-Name: fea7ade649ae72303078782f7bc510e0a17f082ffde10e769f1aeb1cf37b5554
2018-06-21 23:53:54 +00:00
drh
fb32c44e41
Add the %extra_context directive to lemon, as an alternative to %extra_argument.
...
Use this to improve the performance of the parser.
FossilOrigin-Name: be47a6f5262a43f477700579512fe7112a0872faedcbbe5c3383d13a08af6440
2018-04-21 13:51:42 +00:00
drh
6116ee4eee
Compute the correct column name even if the column identifier is the
...
very last token in the SQL statement. This fixes a problem introduced
by check-in [0fdf97efe5df745510c6b] and reported by the community during
beta-testing.
FossilOrigin-Name: 36b89d728ff13d395fe0e1db8e7c01263f73dccb278b3ece27f6ef78e909b492
2018-01-10 00:40:06 +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
53b2459a36
Declare the Lemon-generated parser object as itself. (Duh)
...
FossilOrigin-Name: c8000e94cca59dabf83d6cb75b40441aaf793d29880582dc4baa17246449b5fe
2017-03-30 17:13:37 +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
drh
9b38d6660f
Performance optimization in the tokenizer/parser loop.
...
FossilOrigin-Name: 2cb71583d631cd417acbeebbb4ee950573a9deef
2017-03-07 14:38:52 +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
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
585a59795c
Updates to the tokenizer for EBCDIC. No changes for standard builds.
...
FossilOrigin-Name: 4fc6580ffa7232aaf751f38f90c45edc8863abe5
2016-12-12 01:53:36 +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
f3c57ff54c
Avoid unnecessary calls to object destructors for a small performance gain.
...
FossilOrigin-Name: aec94b6ee68fe50e2cc14388281e2ef531e21d68
2016-04-12 00:16:54 +00:00
dan
a73086dd9e
Fix a problem with handling identifiers that start with "x" if SQLITE_OMIT_BLOB_LITERAL is defined.
...
FossilOrigin-Name: b65217c69c59cbe9cd1494e2eb42ecf22c336399
2016-02-24 16:14:07 +00:00
drh
b2bddbbc2d
Avoid a potential buffer overrun if an SQL statement being parsed ends
...
with an illegal "!" token. (This problem was detected by fuzzcheck
running under valgrind. The problem was introduced by check-in [9570b6b43df3].)
FossilOrigin-Name: 2a8d97e7c8976df0312e1294e8c1da8b15686654
2016-02-18 14:49:28 +00:00
drh
30c14728b4
Minor simplification to the tokenizer. Slightly smaller and faster.
...
FossilOrigin-Name: 9570b6b43df3bc5ce314cded20bca8be9e968efe
2016-02-16 13:04:19 +00:00
mistachkin
fad3039c51
Enhance ability to debug out-of-memory errors.
...
FossilOrigin-Name: 6a9c4a3ebfb7cc0738ef6634440ccab44a21ff28
2016-02-13 23:43:46 +00:00
drh
e96f361995
Changes to help the tokenizer run about 33% faster.
...
FossilOrigin-Name: a050e6f096d40aa5b6275797b96e62c228044f5a
2016-02-08 19:36:46 +00:00
drh
34dcee6544
Add code to get the tokenizer character-class logic working for EBCDIC.
...
FossilOrigin-Name: 04f7da77c13925c1f1e287f4579bb85518297d81
2016-02-08 19:15:48 +00:00
drh
8974331fc3
Demonstrate a much faster sqlite3GetToken() routine by using a lookup table
...
to map initial token characters into a character class. This check-in does
not work for EBCDIC. More optimization needed.
FossilOrigin-Name: 9115baa1919584dc8ca25bbff54d3b65748a9631
2016-02-08 02:30:50 +00:00
drh
4a642b6060
Improvements to the way that OOM errors are processed.
...
FossilOrigin-Name: c3ef03478a5788c855b3aef385d43ae7f494f440
2016-02-05 01:55:27 +00:00
drh
54bb56d82a
Performance enhancement to the tokenizer.
...
FossilOrigin-Name: 6ea2df86c95c226052f528424e9bee367a2e765a
2015-11-10 03:30:51 +00:00
drh
0739e45bcd
Small size reduction and performance increase in the parser.
...
FossilOrigin-Name: d62cd757a69cc49c2d309e27c948610b5868632f
2015-11-09 02:08:09 +00:00
drh
6e7722669e
Proposed fix for an infinite loop bug in the WITH clause semantic analysis
...
logic.
FossilOrigin-Name: 028475cb17a4b50baf0e9aba9bd3403d0a5d03b0
2015-11-07 17:48:21 +00:00
drh
b02392e6f0
Change sqlite3StatusSet() into sqlite3StatusHighwater() so that only the
...
highwater mark is recorded. This gives a small size reduction and
performance improvement.
FossilOrigin-Name: 6422d223dd10018703c6b083d29a3c35c837fc97
2015-10-15 15:28:56 +00:00
drh
a248a722cf
Change the parser engine so that it (once again) waits for a lookahead token
...
before reducing, even in a SHIFTREDUCE action.
FossilOrigin-Name: 2c17a1358353a0845b039283be79353f033e2491
2015-09-07 19:52:55 +00:00
drh
3bd48ab213
For the Lemon-generated parser, add a new action type SHIFTREDUCE and use it
...
to further compress the parser tables and improve parser performance.
FossilOrigin-Name: 531c3974b3d586c1989cde905b2fb4681239a570
2015-09-07 18:23:37 +00:00