Commit Graph

1182 Commits

Author SHA1 Message Date
drh 6ee3fa87fd Fix an unreachable branch in sqlite3ParserFallback()
FossilOrigin-Name: e059178b47109caee2c2211b2db6e594c014af636677118a64e10edf01ac017d
2019-08-28 11:49:45 +00:00
drh 010bdb4c79 Further improvements to parser speed by enlarging lookup tables to eliminate
the need to do range checking on the index prior to lookup.

FossilOrigin-Name: 47d3e091ae49eb7947af5abef9b5b96b16b86d349e51fe0677795649be6db473
2019-08-28 11:31:11 +00:00
drh 2e51716b15 Increase the size of the yy_lookahead table so that it is never necessary to
down bounds checking on the index.

FossilOrigin-Name: bafd872398e58766e996963372c7acc03a1e20a6d39a3867ca45d3ea0ed2ac1d
2019-08-28 02:09:47 +00:00
dan 2ebb550824 Update this branch with latest trunk changes.
FossilOrigin-Name: 6153bcf41a9aa0497f8210311c99ac23846223068f2b6a3a1c2d9dec7673c7e1
2019-08-21 15:41:50 +00:00
drh cc3f3d1f05 Activate introspection pragmas by default. The new option
SQLITE_OMIT_INTROSPECTION_PRAGMAS must be provided to keep them out.

FossilOrigin-Name: 9c4bca64fb5f635296a8d7d7c1bf2808e02ca734a9983e5cee9132f5352a9a6d
2019-08-17 15:27:58 +00:00
dan 6e11892db8 Experimental implementation of NULLS FIRST/LAST. This branch still has problems - the most significant of which is that ORDER BY clauses with a non-default NULLS FIRST/LAST qualifier can never use an index.
FossilOrigin-Name: 07babb0f897fc8c9cb5b30481899c32fdd743f3f3ca508d8d957826252107dd5
2019-08-12 16:36:38 +00:00
drh 55f66b341a Add new assert() statements in an attempt to help static analyzers avoid
false-positives.

FossilOrigin-Name: 9e66458592d40fbd96ea5f21339573110ca1cfe328238a020c9420a87d35dd72
2019-07-16 19:44:32 +00:00
mistachkin 17df761a84 Fix harmless compiler warning in lemon.
FossilOrigin-Name: 2da0eea02d128c37f2fbe764227ac526d3e993284516544adc0a216a035c5676
2019-06-03 15:09:25 +00:00
drh 51e441da2b Combine the implementations of the key and hexkey pragmas into a single
case.  Have both pragmas return "ok" if they are implemented.

FossilOrigin-Name: b3692c406f7ba62587c9d3256f888748393519680e9e2db53f59557f1a300e05
2019-05-21 17:04:27 +00:00
mistachkin d9bc6e8973 Fix some harmless compiler warnings.
FossilOrigin-Name: ca068d82387fc3cda9d2050cedb4f9c61b6d9dc54f89015b4b2ee492243ed5c9
2019-05-10 16:16:19 +00:00
drh 08652b5ea0 Provide the SQLITE_OMIT_CASE_SENSITIVE_LIKE_PRAGMA compile-time option to
omit the case_sensitive_like pragma.  This change, in combination with
documentation changes, is the current solution to ticket
[a340eef47b0cad5].

FossilOrigin-Name: eabe7f2d4ff0e0dd868dcab7ec1d4a9168a25f80d3a52f0eeea2f90bd33782f2
2019-05-08 17:27:18 +00:00
drh f135cb7d7f Fix an error message in the Lemon parser generator.
FossilOrigin-Name: b6d7d42b7426622a26b67809cd1f21285fea120aa1897377b9946840463b41f1
2019-04-30 14:26:31 +00:00
dan 73c0d272a9 Add the ".recover" command to the shell tool. For recovering as much data as possible from corrupt databases.
FossilOrigin-Name: 50fe48458942fa7a6bcc76316c6321f95b23dc34f2f8e0a483826483b2fb16f6
2019-04-27 20:30:19 +00:00
dan 6aa001527c Merge latest trunk changes into this branch.
FossilOrigin-Name: 1da302d85d7ad4ba54f877117a45d667439fd2ef31dc70ea1d54dc1fba196e68
2019-04-25 20:06:34 +00:00
dan 68cb86ef23 Add the ".recovery" command to the shell tool. For recovering the maximum amount data from corrupt databases. Still needs work.
FossilOrigin-Name: 7461d2e120f2149315ddac2676d51d7445bcdb8e97543effd9c30603517ef9da
2019-04-20 20:57:28 +00:00
drh 25f933ad93 In the "pgidx" report from "showdb", also show the number of rows on each
database btree page.

FossilOrigin-Name: 2bda9dc41c07092ae37d0c6001c1271e0622bfff7151201fc2bb4c95422c087b
2019-04-17 13:23:28 +00:00
drh 8083ef029f In the "pgidx" command of the showdb utility, try to identify orphaned pages
and show when pages have been zeroed out.

FossilOrigin-Name: eed701ef919c70d891727250be6a1b626aeb894c562d221e319ae6d74fc71d3d
2019-04-17 12:29:45 +00:00
drh 660107f35e Update tool/symbols.sh to ignore symbols from sessions and rebaser and to not
try to compile with ICU which is not available on all platforms.

FossilOrigin-Name: 0bab4ece6e81916d0f7255a8e553b8ca040cb8a96ab21e294212e232119f8ddc
2019-04-15 13:51:27 +00:00
drh 6adba9031c Update the list of OMIT options in the omittest.tcl script.
FossilOrigin-Name: f294cfc173c5653ef161dbff63b7838dbccdcad797f5163c49b3173f9f35ab0f
2019-04-10 18:29:40 +00:00
drh f1722baaf8 Eliminate the tool/addopcodes.tcl script. The purpose of that script was to
keep the number of parser codes below 256 in order to save parser table space.
But we have long since blown through that ceiling so the addopcodes.tcl script
was just needless complexity. There is no longer any reason to keep it around.

FossilOrigin-Name: d272819298083ebbde57962a2938925b1aaa1caf03e48bb3ea26ad91e0461d84
2019-04-05 20:56:46 +00:00
drh 3fda0aaf00 Put the list of keywords in mkkeywordhash.c into alphabetical order.
FossilOrigin-Name: ac98b23b34632fbc654a34a8b3d842ce65603e4c04d89c589b46f4d48a61152d
2019-04-02 13:10:50 +00:00
mistachkin 4e2d3d40dc Fix harmless compiler warnings seen with MSVC.
FossilOrigin-Name: 6cf8b18ec20f11c25ff7396f29c742404d3a88d5e97a5fd53ccfaff51dec3f33
2019-04-01 03:07:21 +00:00
dan b60c3b01cc Add support for new window functions related features - GROUPS frames, RANGE frames with logical start and end points, the EXCLUDE clause and window chaining.
FossilOrigin-Name: c6da39115d3e2b0fd3a03c4bcae8ee8b05a6bbd6b11f8c54712fbff6387f610d
2019-03-26 13:08:34 +00:00
dan b1dd3db537 Tweak the tool/cg_anno.tcl script so that it can run on systems without /usr/bin/tclsh.
FossilOrigin-Name: a026189aa46114d2de4f1da5882aeef9cf446a5aa6ea068d51c27df0d7302ddb
2019-03-19 11:35:18 +00:00
dan d35300f9b6 Parse EXCLUDE clauses in window frames. They do not yet work.
FossilOrigin-Name: d03c7533a1e993f1b12392a5193b2127484307b27072236a1255e7a30849a381
2019-03-14 20:53:21 +00:00
dan f7b846e4ed Merge latest trunk changes into this branch.
FossilOrigin-Name: 53ea550ce759ae4683bcf0ae3af655bfe04f85db70f74edee6bcab56d83bb041
2019-03-09 07:38:16 +00:00
dan 6c75b39614 Finish consolidation of window frame code. Add untested support for GROUPS frames.
FossilOrigin-Name: 954bf369935083c188c3b14e77ed89fc5ec4323cc5b0c67e4a2e48fcc278df45
2019-03-08 20:02:52 +00:00
drh aaad696141 Fix a potential 32-bit integer overflow in the "showdb" utility program when
it is trying to interpret a corrupt database file.

FossilOrigin-Name: 3803e750384ec37091b0a6c350f8ef67720e316fd6f74c95e3c5f231c4a01ceb
2019-03-05 23:49:17 +00:00
drh 91ed9ce0dd Add a script to tool/ that will extract the sqlite3.h header file from an
sqlite3.c amalgamation.

FossilOrigin-Name: 38d2e510cdedf38153466b161c0842b1604aef7b5589c51f628ae7cbb6a8722a
2019-03-05 16:53:16 +00:00
drh 01996dae49 Back out check-in [008112bcef561a8], reenabling deprecated PRAGMAs when the
SQLITE_OMIT_DEPRECATED compile-time option is used, because way too many
TH3 tests depend on those deprecated PRAGMAs.

FossilOrigin-Name: 9dbf512d1c4627a28d60f4e7238cb100d7a4e11f976139b07ad1c59e9b584c7d
2019-02-06 00:11:13 +00:00
drh 24545d2300 Keep the temp_store_directory and data_store_directory pragmas even when
compiling with SQLITE_OMIT_DEPRECATED.

FossilOrigin-Name: 93386a7c97f27df69f79052ef4d80143bb6832a806885249c315d226b2a256b2
2019-02-05 12:16:53 +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 ba7bd02002 Fix an off-by-one error when parsing the names of indexes that do not have
arguments in the index_usage utility.

FossilOrigin-Name: dc794d8f518ed46536928a77a560d46e4f9365c30a00cd108f000d8556a66c00
2019-01-30 16:58:04 +00:00
drh a8614259c1 Add the --progress, --using, and -q options to the index_usage utility program.
FossilOrigin-Name: a5e6be7cbc5d931308ddcc073c9cd6275c9711cae055d72a7c4aa71c1d15914c
2019-01-30 15:47:38 +00:00
drh 5a9c6bcc15 Enhancements to the index_usage utility program.
FossilOrigin-Name: 19c739b4a8a43d894e37a99fa34838f3e3fa1fe0d019aefbc33f1d38d76af1a4
2019-01-30 14:01:43 +00:00
drh 3cc9af2140 Omit deprecated PRAGMAs when compiling with the -DSQLITE_OMIT_DEPRECATED option.
FossilOrigin-Name: 008112bcef561a8a3ebfb007cbef36cbc0071f547e6ebdba3d3bbb39e2c48c7a
2019-01-24 16:07:18 +00:00
drh e2dcc42e1f Fix a harmless memory leak in the Lemon parser generator utility program.
FossilOrigin-Name: 1caff0fb0b2051e205e7a8cfd5dadf92680c52a88a441ded95b1ea6542db5f83
2019-01-15 14:44:23 +00:00
drh f202c6cdcf Relax the minimum size database file constraint on the dbtotxt utility program.
FossilOrigin-Name: 97e723d746eeb2159f5bf1701532271ac6a4620879c82d496f4499c178b64479
2019-01-13 20:17:52 +00:00
drh 57e141bc28 Fix the filename normalization in the dbtotxt utility program.
FossilOrigin-Name: 29a00a05dd40ff59be340969e1aca4fee41e092f2faa1cea85a3448265a83c2c
2018-12-27 13:52:45 +00:00
drh a86c8ce940 Update the dbtotxt utility program so that it does not output characters that
are special to TCL, thus making the output of dbtotxt easier to insert into
test scripts.

FossilOrigin-Name: 48438bb35b48955a1df83ef90f0ef6c9cfed0b16d2e938f36d74ad9d53b4b5b4
2018-12-21 22:11:37 +00:00
drh 3374648545 Add the "dbtotxt" utility program and the ability to read "dbtotxt" output
as a deserialized input database in the CLI, using the --hexdb option to
the ".open" command.

FossilOrigin-Name: e3bf1d3ea5f748c5142c2403813fdace5aedc1fc68f0dcd5eae40a2fe763fedb
2018-12-13 15:06:26 +00:00
drh 731dd6ebda Add the "index_usage" utility program.
FossilOrigin-Name: df95455213c9d1db7229e94217e78edc05cbf9e40f39528105494ea6ac52be94
2018-12-04 16:51:42 +00:00
drh cfc45b1021 Reduce the size of the parser tables generated by Lemon by splitting the
yyRuleInfo structure into separate yyRuleInfoLhs and yyRuleInfoNRhs arrays.

FossilOrigin-Name: 70fe8ec2ae3099b8773834c7ac2e56768addbecd57956ac523e71a7dc264049c
2018-12-03 23:57:27 +00:00
drh 60ce5d3135 Add a simple test case for Lemon. Always include assert.h in the
Lemon-generated parser.

FossilOrigin-Name: 9c9c46dcbe92aeabe3d5675bb69681b6dfd53798bc67e6a2ceba67ed3c4fb0af
2018-11-27 14:34:33 +00:00
drh b8a762827c Fix to the error handling logic in the Lemon parser template. This does
not affect SQLite since SQLite does not use that part of the Lemon parser
template.

FossilOrigin-Name: c6dfc59eb12a02d35b708b5d94239377c79f688fa572f72bad51a157b1bf599c
2018-11-27 14:03:11 +00:00
mistachkin 23bfa80c19 Fix typos in the previous check-in.
FossilOrigin-Name: 9b37bbf5f338dea962331e4fd73dfa0baae98ba63344a2fa737b845b90ecb0c5
2018-11-15 19:12:22 +00:00
drh 36d248812b Include geopoly in the compiler-warning script.
FossilOrigin-Name: 3d947e1ec0f0800fcad3a04e4876d5247fd1b23e51ed7f49d428fff6683e8a16
2018-11-15 16:56:33 +00:00
drh 1ca9a8b9df Merge fixes from trunk.
FossilOrigin-Name: bf88efcec40036e0805940ff6371643dbc518442457d2bc18c711753607ae36c
2018-11-10 03:47:40 +00:00
drh ac4b8dea9b Fix invalid use of unprotected sqlite3_value objects in the sqldiff utility,
when using the --changeset option.

FossilOrigin-Name: a8d65214a567eb1afd703ee4d09d398247e060a610b46097a726364db2861001
2018-11-09 23:41:57 +00:00
drh 6ab91a7a7a Add the SQLITE_DEFAULT_DEFENSIVE compile-time option. Fix up test cases
so that they work with DEFENSIVE enabled.

FossilOrigin-Name: 3212733cb6d1a59516d67a86df7c7b1d2456a1b2e5d7080c26b0e87b2609c65d
2018-11-07 02:17:01 +00:00