drh
8dd675e43f
Make sure the shell does not try to put a zero terminator on the end of an
...
unallocated zero-length string when running ".import" on an empty file.
FossilOrigin-Name: 92adaee5bd31c152dbc1592f4aeb5d8da957a1ea
2013-07-12 21:09:24 +00:00
drh
a95882ff39
Change the description of how sqlite3_progress_handler() works so that
...
the N parameter is "approximate". This aligns with the current implementation.
This is a documentation change only. No changes to code.
FossilOrigin-Name: 7d829bdea3adcda50fbe930acb4e1ce73fd874e6
2013-07-11 19:04:23 +00:00
drh
b1eaa718fd
Add the experimental "query_only" pragma.
...
FossilOrigin-Name: 6557c407983b067449deb76bc4c5248de64e07dc
2013-07-11 15:22:31 +00:00
drh
648e264342
Add the "defer_foreign_keys" pragma and the SQLITE_DBSTATUS_DEFERRED_FKS
...
value for sqlite3_db_status(). This is a cherry-pick of a sequence of five
checkins in the sessions branch between [1d44e5d3c2] and [d39e65fe70].
FossilOrigin-Name: 527121ac3cdc96ac33ad975c227a6685a2f7e999
2013-07-11 15:03:32 +00:00
drh
8f8c65f79b
Fix harmless compiler warnings in the progress callback logic.
...
FossilOrigin-Name: 908141d5bf7a9ad8f40c2332476847733eca7fdc
2013-07-10 18:14:29 +00:00
drh
13447bf6c7
Experimental "PRAGMA query_only=BOOLEAN" statement that is able to turn
...
write capabilities on and off.
FossilOrigin-Name: ece960c496717a3a6c25526ef77dd76b08d607bc
2013-07-10 13:33:49 +00:00
drh
49afe3aaa0
Run progress callback checks less frequently in the main VDBE evaluation
...
loop. This makes up for the extra CPU cycles used to increment the cycle
counter for SQLITE_STMTSTATUS_VM_STEP.
FossilOrigin-Name: 3e8b02011db2f393d4850115a471709b0a88594f
2013-07-10 03:05:14 +00:00
drh
580d7dc71d
Adjust the costs in the xBestIndex function of the spellfix1 virtual table
...
to force the use of the MATCH term if it is available.
FossilOrigin-Name: f003bea9fe1b79e2b4d18fbef86c1d8f0f60e4b6
2013-07-09 15:56:44 +00:00
drh
1f10c28618
Modify several extensions to use the new exported function naming.
...
Fix some shared library compilation issues.
FossilOrigin-Name: 1e39f85077f1f2b96c3a656c5b6334bafb005908
2013-07-09 12:36:30 +00:00
drh
5e128b235b
Make sure the schema is verified prior to processing a "WHERE 0" on the
...
first term of a compound SELECT statement.
Fix for ticket [490a4b723562429]
FossilOrigin-Name: 52a49cbc1621094b2fe2b021209b768d29e0426b
2013-07-09 03:04:32 +00:00
drh
e8c13bf262
Make sure an adequate number of digits are shown for binary-to-text rendering
...
of very small floating point values.
FossilOrigin-Name: 776e65f98ce80a8ed56cb73ef56c751702698612
2013-07-08 22:33:20 +00:00
drh
b5246e518b
Fix an adverse interaction between the IS NOT NULL optimization (available
...
only with SQLITE_ENABLE_STAT3) and the transitive constraint processing.
Fix for ticket [d805526eae253]
FossilOrigin-Name: 3b30b75b342bb6b424ad2bf7cd841b2c88bdad44
2013-07-08 21:12:57 +00:00
drh
d4b473b2cf
Add an optional 5th parameter to the next_char() function that is the
...
collating sequence to use for comparison.
FossilOrigin-Name: 9415db6ef255d27ca8473c17e65749a197c30455
2013-07-08 01:27:43 +00:00
dan
3492f4f9af
Fixes for test cases running in the "mmap" permutation.
...
FossilOrigin-Name: cdb97d41abf4a3b8e22fa8ca9f3aab4a3f968d27
2013-07-06 18:07:57 +00:00
dan
789efdb966
Drop any existing mapping of the database file when exiting the pager "error state", as it may at this point be too large for the database file. Do not invoke file-control MMAP_LIMIT if the database file handle does not support xFetch and xUnfetch (on the grounds that xUnfetch(0) calls to invalidate the mapping cannot be made).
...
FossilOrigin-Name: 0ae7e75b215b0d75920769da9146c54ce2ad3ce0
2013-07-06 17:57:39 +00:00
dan
c1f19f95b8
Fix two test script problems revealed by permutations.test.
...
FossilOrigin-Name: 60cf7e44871ca8d2136ddad02188f0b9f9c380c1
2013-07-05 19:16:58 +00:00
dan
d903154e3a
Replace an erroneous SQLITE_OMIT_VIRTUAL_TABLE in vdbeaux.c with SQLITE_OMIT_WAL. Also fix some test script problems.
...
FossilOrigin-Name: ff8c3f7840a0a8d87453b94b9884ee26d5d92da5
2013-07-05 16:54:30 +00:00
dan
b2cfc14670
Add missing "static" qualifier to functions in where.c.
...
FossilOrigin-Name: 5c906e914b63eb00e62c6c2a535e234a75d95030
2013-07-05 11:10:54 +00:00
dan
ed20073b8d
Make a couple of implicit casts explicit to fix compiler warnings.
...
FossilOrigin-Name: 9676280a9387b8bfba82cfc0087318863d05d4f3
2013-07-05 10:46:08 +00:00
mistachkin
049d487e2e
Modify several extensions to use the new exported function naming. Fix some shared library compilation issues.
...
FossilOrigin-Name: f2ab8747825ab5131ffab174aa0ffe5e474f6811
2013-07-04 23:53:56 +00:00
drh
0d08b93673
Remove a surplus local variable
...
FossilOrigin-Name: 91bc840eea2099273bd2c5d41a8410d628986643
2013-07-02 15:25:22 +00:00
dan
51576f4791
Fix a minor typo in a comment in where.c.
...
FossilOrigin-Name: 4a9d51e792d7c4297bd18af7b7c757c93a3a1cd1
2013-07-02 10:06:15 +00:00
drh
aaf528e09f
Fix harmless typos in comments of two extensions.
...
FossilOrigin-Name: 1c3ed47b71844d062c4e9a315f2f368b382684cc
2013-07-02 00:06:31 +00:00
drh
05ef18c84d
Add a query planner test case submitted by Elan Feingold and
...
based on the Plex project.
FossilOrigin-Name: 3d49c593dc12d72323ca525372a15e58c591940b
2013-07-01 20:02:31 +00:00
drh
cdc2e43d8e
Add a missing test that prevented double LEFT JOINs with transitive
...
constraints from working correctly. Fix for ticket [868145d012].
FossilOrigin-Name: 72919ec34f0d663d551c1070285ad93b932bcb74
2013-07-01 17:27:19 +00:00
drh
9443342ee9
Further minor comment corrections and enhancements in where.c.
...
FossilOrigin-Name: 0d68d4d018e73dcbbc08786071aac6228fca1a8c
2013-07-01 11:05:50 +00:00
drh
be4fe3afc0
Make a trivial comment fix in where.c.
...
FossilOrigin-Name: 0ffaab3b9c97f4dba0f0ca6e146c8dc2775f7b1c
2013-07-01 10:38:35 +00:00
drh
d0a64dc75a
Fix an issue in the command-line shell with CSV import of rows with
...
empty columns.
FossilOrigin-Name: 60b65e5ee3828c2a814bf035b57b3e8681af9397
2013-06-30 20:24:26 +00:00
drh
12cd6cfd6e
Fix the build of the command-line shell on windows. Windows uses "_pclose"
...
rather than "pclose" as the pointer to the function that closes a popen pipe.
FossilOrigin-Name: b003b2b2b6ddbfc6ec508b47904e6d095c5f6940
2013-06-29 15:40:22 +00:00
drh
8d56e2059c
Issue the new SQLITE_WARNING_AUTOINDEX warning on the SQLite log whenever
...
an automatic index is created.
FossilOrigin-Name: 338826ef3f8a209b14f8d42370855cab9ac9ed45
2013-06-28 23:55:45 +00:00
drh
986b38792f
Add the SQLITE_DEFAULT_AUTOMATIC_INDEX compile-time option, which if set to
...
zero turns automatic indices off by default. Increase the estimated cost
of an automatic index. Additional minor refactoring of the automatic
index code.
FossilOrigin-Name: 459b3179023c2c45994ea4acbf34ed5f87cf3c18
2013-06-28 21:12:20 +00:00
dan
c0537fe59b
Allow read transactions to be freely opened and closed by SQL statements run from within the implementation of user-functions if the user-function is called by a SELECT statement that does not access any database tables (e.g. "SELECT user_function();").
...
FossilOrigin-Name: f308c4851726b4b75636f714466f2314f56e3ec0
2013-06-28 19:41:43 +00:00
drh
40aa936f7f
Add a bit to the SQLITE_TESTCTRL_OPTIMIZATIONS option for sqlite3_file_control()
...
that will disable the use of SQLITE_STAT3 information in the query planner.
FossilOrigin-Name: 60c19b86797fb8a37f175545929883ebeff7f307
2013-06-28 17:29:25 +00:00
drh
9d5a579c35
Fix an issue with the OmitNoopJoin optimization and add test cases that
...
are specifically for that optimization.
FossilOrigin-Name: 5480d124b74c9adaacc4fa9cb81560865b44f3e1
2013-06-28 13:43:33 +00:00
drh
1713afb025
Refactor the Vdbe.noIO field as Vdbe.bIsReader. The meaning is inverted.
...
FossilOrigin-Name: 59f98c5c241e5a61cd5b6d0e69b55a6b44c5cafc
2013-06-28 01:24:57 +00:00
drh
4f7d3a5f06
Refactor names of fields in the sqlite3 object: "activeVdbeCnt" becomes
...
"nVdbeActive". Related fields becomes "nVdbeRead", "nVdbeWrite", and
"nVdbeExec".
FossilOrigin-Name: 14f796963474350e7aee8d3757acd3315fe78e4f
2013-06-27 23:54:02 +00:00
dan
c0c3c2628d
Fix an error in e_expr.test.
...
FossilOrigin-Name: fd4ece18c9be7019e60da3cb0a200c5b1903fed4
2013-06-27 19:12:53 +00:00
drh
9e92a47bdf
Make sure that sqlite3_stmt_readonly reports false for
...
PRAGMA journal_mode and PRAGMA wal_checkpoint. Ticket [a589ec069e3].
Also keep track of whether a prepared statement does no reading or
writing.
FossilOrigin-Name: 1937fd8eec2c1da95a782d9dc63926d846b06bdc
2013-06-27 17:40:30 +00:00
dan
e8e570ab15
Add a test to ensure that if BEGIN IMMEDIATE fails with SQLITE_BUSY, it does not leave the user with an open read transaction (unless one was already open).
...
FossilOrigin-Name: 22bced36f0f121f29d94f1f9eab45c8731517a53
2013-06-27 14:24:15 +00:00
drh
5bde816599
If the filename argument to the ".import" command in the command-line shell
...
begins with '|' then treat it as an input pipe rather than a file.
FossilOrigin-Name: 4c02b344f5c6f6fb1c61b79d51063a1e0e2d75c0
2013-06-27 14:07:53 +00:00
drh
4c56b99f2e
Improved handling of backslash escapes on double-quoted arguments to
...
dot-commands in the command-line shell.
FossilOrigin-Name: 656a1fe5dd670e6ce7173ed3ce3392c0151641a0
2013-06-27 13:26:55 +00:00
drh
340f582ec3
The undocumented and unsupported ".selftest" command in the command-line
...
shell utility is now only available if compiled with SQLITE_DEBUG. Also
fix a windows compiler warning in that command.
FossilOrigin-Name: e88fd5b22198edfc6f91390194bdde07ca06ba35
2013-06-27 13:01:21 +00:00
dan
f73819af05
Add extended error code SQLITE_BUSY_SNAPSHOT - returned in WAL mode when a read-transaction cannot be upgraded to a write-transaction because it is reading from a snapshot other than the most recently committed.
...
FossilOrigin-Name: 361c22969aa75340ed696e00e3dc5d17d5493bee
2013-06-27 11:46:27 +00:00
drh
db95f68b14
Update the ".import" command of the command-line shell so that it can
...
accept field values that span multiple lines and so that it issues
error messages if the input text does not strictly conform to RFC4180.
FossilOrigin-Name: 93f632152e464a89322a0130adaf9f342411bf7d
2013-06-26 22:46:00 +00:00
drh
cef4fb61f0
Add the "vtshim" extension, implementing a wrapper around the virtual
...
table interface to make it Disposable for the CLR. No changes to the
core.
FossilOrigin-Name: 6c3839ef311a53076650c6479c932e545a26b96f
2013-06-26 18:04:19 +00:00
dan
6559172e1a
Update the boundary3.tcl script so that it can be run with tcl 8.5 or 8.6 to regenerate boundary3.test.
...
FossilOrigin-Name: ebac5afa471526dffc8026e66753263476137a3b
2013-06-26 16:30:26 +00:00
drh
989a6dbef1
Add the SQLITE_STMTSTATUS_VM_STEPS option for sqlite3_stmt_status().
...
FossilOrigin-Name: bd4267f17bbf5d01fb3f12a5a06e94fcbcbd785c
2013-06-26 13:22:28 +00:00
drh
692b9a43dd
Omit tables from the FROM clause of a join if their presence makes no difference
...
in the final output.
FossilOrigin-Name: 6505e2ab0200736c525b5cfcf1cb62c0bd4d18ee
2013-06-26 11:49:45 +00:00
drh
4580cfb93e
Cut over the next generation query planner. Increase the version number
...
to 3.8.0.
FossilOrigin-Name: 0fe31f60cadc5fe5a9d87e110bfaed5fd026cba1
2013-06-26 11:43:18 +00:00
drh
2c036cff3d
Fix an uninitialized variable detected by valgrind. Unclear whether or not
...
this should apply to trunk.
FossilOrigin-Name: 19ab4811d542ba781aeb6a4eb3c74642677225e1
2013-06-26 00:34:13 +00:00
drh
bf159fa21b
Add a new (experimental) sqlite3_stmt_status() verb that returns the number
...
of VM steps.
FossilOrigin-Name: f1366bab737a3ac2ea20a0ec014cc306d7ded8a5
2013-06-25 22:01:22 +00:00
drh
1031bd9958
Add the ability to disable the omit-join-table optimization for testing
...
purposes.
FossilOrigin-Name: d929df9b1ba214c27d8c437099a53ee9b07aa169
2013-06-22 15:44:26 +00:00
mistachkin
792f34921c
Enhance error message handling for the vtshim module.
...
FossilOrigin-Name: b4a0d5327addd90bef758e6a1403ac69f61b3886
2013-06-21 19:39:51 +00:00
drh
adbae616bd
Remove an unused function declaration from the FTS3 source code.
...
FossilOrigin-Name: 096ae1d8f9a08f92daedece6b0615f4d22b05023
2013-06-21 18:36:44 +00:00
dan
352d2ac6c7
Merge the fts4-notindexed branch with the trunk.
...
FossilOrigin-Name: 361084e1eb281e985568d19fe217263be92be31d
2013-06-21 18:29:49 +00:00
dan
9faa648239
Add a few more tests for the fts4 notindexed option.
...
FossilOrigin-Name: b53c0c41f97c7ddaeea61f0e6035d1c4747db3f7
2013-06-21 18:18:23 +00:00
dan
8def92bac3
Add the "notindexed" option to fts4.
...
FossilOrigin-Name: 8ff2b8f5948ccddce70102e6d68d464c66e4f7ca
2013-06-21 17:30:47 +00:00
drh
bc71b1d453
Only eliminate inner loops of a JOIN if they are the RHS of a LEFT JOIN
...
and if they give no more than a single result. This appears to give correct
answers in all cases.
FossilOrigin-Name: d7a25cc79794817504ca1a4262008a68b2a4dece
2013-06-21 02:15:48 +00:00
drh
fd636c7541
Attempt to disable inner loops of a join that do not generate output.
...
This does not work, since the inner loops might run zero times and thus
inhibit all output. Needs to be enhanced to work only for LEFT JOINs
or when we know that the inner loop will always run at least once.
FossilOrigin-Name: ca839723a21bb13d3e0666a672c15c6f3a267c2f
2013-06-21 02:05:06 +00:00
drh
6457a353bc
Modify the query planner interface so that it always passes in the result set.
...
This is the first step toward adding an optimization that will omit tables
from a join that do not contribute to the result.
FossilOrigin-Name: 2c2577e69ccb47f1af674a755e71221e2ca0b322
2013-06-21 00:35:37 +00:00
drh
472eae8a4d
Add a NEVER() macro and an explanation comment around an unreachable branch
...
in the STAT3 logic.
FossilOrigin-Name: 604c3c5de6fd8f8a569aa9ed981055a5b0123ba1
2013-06-20 17:32:28 +00:00
drh
3a41df11bc
Pull in the posix_fallocate() change from trunk.
...
FossilOrigin-Name: d94db3fd921890ab1d6414ab629410ae50779686
2013-06-20 14:17:39 +00:00
drh
b01e5b59a2
Disable posix_fallocate() for all systems, all the time, unless the
...
HAVE_POSIX_FALLOCATE compile-time macro is supplied.
FossilOrigin-Name: b674462243138fcee192ef05d434665e30c681c4
2013-06-20 14:07:37 +00:00
mistachkin
aafcef69e2
The vtshim xCreate and xConnect functions need to store the pAux pointer into the newly created vtable object. Style fixes.
...
FossilOrigin-Name: 43913c7bd5409791916dfa268258d22f34731273
2013-06-20 01:27:51 +00:00
mistachkin
919aa1af40
Integration adjustments for the vtshim module.
...
FossilOrigin-Name: bf2e28ddb292ef0b9a1262ec249aed3243dcfb20
2013-06-20 00:20:39 +00:00
drh
48779e590c
Merge in trunk changes to os_unix.c that allow the code to build on
...
unix platforms that lack posix_fallocate().
FossilOrigin-Name: bf5764067ab848e19e5971cbdf892c633495e325
2013-06-19 23:48:35 +00:00
drh
74f91d4462
Add in the cost of doing a table lookup on OR searches. Make test case
...
changes to deal with difference in STAT3 behavior.
FossilOrigin-Name: d97898e8e3990ae8c1882c9102b57692d8810730
2013-06-19 18:01:44 +00:00
drh
2daffdf0b5
Only default HAVE_POSIX_FALLOCATE on for linux, and then only if it is not
...
previously defined.
FossilOrigin-Name: 2b2ade92788be623af6f57e37d98994be2cec142
2013-06-19 14:49:14 +00:00
drh
7fb1b30118
Only enable posix_fallocate by default on linux and mac.
...
FossilOrigin-Name: b9b30d4f9845d212e2d3206abbf2795099e5d71d
2013-06-19 14:28:34 +00:00
drh
ad01d892a7
Additional compiler warning fixes.
...
FossilOrigin-Name: 8d2ae8e2f343f82f6fba6d0e89cee7f15b444aa3
2013-06-19 13:59:49 +00:00
drh
e8ae583ebd
Fix a harmless uninitialized variable warning.
...
FossilOrigin-Name: 9d3ef3bd2c6281784a537a22a87279f420649935
2013-06-19 13:32:46 +00:00
drh
dbb80234da
Simplify and add invariants to the WhereLoop merging logic inside of
...
whereLoopInsert().
FossilOrigin-Name: 8f27f35f288434b9e7bc503c608f1e2b590ade4d
2013-06-19 12:34:13 +00:00
drh
c7f0d229a7
Fix compiler warnings. Fix a harmless off-by-one error in the solver.
...
FossilOrigin-Name: 10021941d0258951b916e788881df140113f0597
2013-06-19 03:27:12 +00:00
drh
4a5acf8e5c
Adjustments to testcase() macros for improved testability.
...
FossilOrigin-Name: 4fbb0c4d26c54aaefbe5397cde2a0b9d2ce3885f
2013-06-18 20:06:23 +00:00
drh
81186b4392
Remove some redundant and unreachable code.
...
FossilOrigin-Name: 4c6d58d75d51e1ce829aec214617c3a89e784a2d
2013-06-18 01:52:41 +00:00
drh
7963b0e853
Add more testcase() macros. Fix a memory leak following OOM in the
...
virtual table analysis logic.
FossilOrigin-Name: b61402af690ac08b68974f3c807096b0cffd9bc0
2013-06-17 21:37:40 +00:00
drh
93ec45d560
Simplifications to the NGQP. Add the queryplantest makefile target. Add
...
testcase() macros in the NGQP.
FossilOrigin-Name: eaf1f1b405ec2c498092527fae00e5dbe9e176c1
2013-06-17 18:20:48 +00:00
drh
75bf6b984a
Use automatic indices on subqueries of the FROM clause when appropriate.
...
FossilOrigin-Name: e8f124284ee0d0e373dc4431668630f1e17015c1
2013-06-17 14:18:21 +00:00
drh
613ba1ea9c
Fix compiler warnings.
...
FossilOrigin-Name: 3e8ac46918c68723bd199dbec8b0901457d524a9
2013-06-15 15:11:45 +00:00
drh
f003076032
Comment tweaks in where.c. No changes to code.
...
FossilOrigin-Name: cecc5fdd5d8fbad7d9e8c275b9ba9ade3dbee8ef
2013-06-14 13:27:01 +00:00
drh
b8916be945
Add a new ORDER BY optimization that bypasses ORDER BY terms that are
...
constrained by == and IS NULL terms of the WHERE clause.
FossilOrigin-Name: b920bb70bb009b7c54e7667544c9810c5ee25e19
2013-06-14 02:51:48 +00:00
drh
6d38147c19
An index might be useful for ORDER BY if any indexed column is in the
...
ORDER BY clause, not just the first indexed column.
FossilOrigin-Name: ade473b5ae3fe2162b0ec29731d8e864a9301e07
2013-06-13 17:58:08 +00:00
drh
53cfbe92d1
Make sure that disabling the covering index scan optimization does not
...
prevent a covering index from being used to satisfy an ORDER BY clause.
FossilOrigin-Name: e8b7ea8202c443bfc8a978588c7d2cfaa14a8fea
2013-06-13 17:28:22 +00:00
drh
bbe8b24b8d
Restore the ability to do a BETWEEN query on the rowid. Also fix a
...
nearby comment.
FossilOrigin-Name: 459a7b9068310b36fed950940d251c4b798ffc58
2013-06-13 15:50:59 +00:00
drh
e1e2e9acd6
Make the MIN() and MAX() macros available in sqliteInt.h. Add TUNING
...
comments to the NGQP and adjust costs slightly.
FossilOrigin-Name: 3a72af2a95b04b8e195ef17cb3e9d9021a4f0915
2013-06-13 15:16:53 +00:00
drh
12ffbc7e69
Fix an off-by-one error in the WhereCost to integer conversion.
...
FossilOrigin-Name: b5ca80d924f8c6d31f036247ba6e20d234f4482e
2013-06-13 14:51:53 +00:00
drh
ec3e641a3c
Add a prototype for an extension that sits in between the SQLite native code
...
virtual table interface and a CLR IDisposable object.
FossilOrigin-Name: 10bba8d0821159a45c6a0d6c3cef897cb4d4e9a6
2013-06-13 00:32:29 +00:00
drh
3b48e8c91a
Activate the one-pass optimization. Update comments, especially the
...
descriptions of the various objects.
FossilOrigin-Name: e120c558a5bafc0f0d2cc12ee5c9d36e20cc642d
2013-06-12 20:18:16 +00:00
drh
95ed68df55
Bug fixes in the handling of virtual tables.
...
FossilOrigin-Name: 25c0f7292a20c0db6ef176966d9987f29c7d73e5
2013-06-12 17:55:50 +00:00
drh
37ca04880a
Merge all changes from trunk.
...
FossilOrigin-Name: f2e15b1974e55373b5819e3b2326653f890f409f
2013-06-12 17:17:45 +00:00
drh
4fe425ad79
"make test" now passing.
...
FossilOrigin-Name: addd7f466d6ff55f82d907286650c26b06e9397b
2013-06-12 17:08:06 +00:00
drh
fd5874d23d
Add the "queryplanner" test permutation. Continuing refinements to NGQP.
...
FossilOrigin-Name: 25e2cde105a19293bdb9c001b48624e5d7f8c4e5
2013-06-12 14:52:39 +00:00
drh
e217efc822
Continue refining the NGQP
...
FossilOrigin-Name: 40567fddd468d00295275af8df09a7a1785e684a
2013-06-12 03:48:41 +00:00
drh
4f402f26b1
Improved processing of DISTINCT.
...
FossilOrigin-Name: ba897100fed291d2025f68d09334f9985312298b
2013-06-11 18:59:38 +00:00
dan
5f0b33c2cb
Add the SQLITE_FTS3_MAX_EXPR_DEPTH compile time option.
...
FossilOrigin-Name: 24fc9d4438a5615dd20af5419456166df83a72ea
2013-06-11 14:22:11 +00:00
drh
8e23daf372
Fix the Parse.nQueryLoop state variable to work with NGQP.
...
FossilOrigin-Name: f1cac24f06b9c71cfa472fdcf2da4cd8689a7cc3
2013-06-11 13:30:04 +00:00
drh
8b76656ad4
Use a logarithmic rather than linear cost and row-count measures.
...
Do not report row count estimates in EQP output.
FossilOrigin-Name: b777b1097dcf9dfeb1b86c71e1b5f6918d68c975
2013-06-11 02:36:41 +00:00
drh
8a4380d761
Fixes to EXPLAIN QUERY PLAN output. Change weights back to something closer
...
to what they are in legacy. More test case fixes.
FossilOrigin-Name: 36373b85f9a97840aa06e24ae31c12fcfbae084e
2013-06-11 02:32:50 +00:00
drh
8636e9c55c
Handle virtual tables correctly when using logarithmic costs. Fixes
...
to test cases.
FossilOrigin-Name: e612664aa2e24ed5e222be2c7fe16e210ac9bded
2013-06-11 01:50:08 +00:00
drh
5822d6feb2
Fix test cases for the new EXPLAIN QUERY PLAN format. Add the
...
wherecosttest tool. Other fixes to logarithm cost.
FossilOrigin-Name: aa580e368e3c398b8377b80342dfdd906324c248
2013-06-10 23:30:09 +00:00
drh
c63367ef68
Fix some minor issues with logarithmic cost in NGQP.
...
FossilOrigin-Name: 69cf877283d362915edddf1822fbf7a9f86278b3
2013-06-10 20:46:50 +00:00
drh
b8a8e8a5d2
First attempt to store costs and row counts as a logarithm.
...
FossilOrigin-Name: 9e8109673c3a87e379f5a5a97a8b0d5a1afe853d
2013-06-10 19:12:39 +00:00
drh
3b75ffaaca
Simplification and performance tweak to the high-speed NGQP bypass.
...
FossilOrigin-Name: 0f8a38ee54208d6a477aa2482cd277b4808450f0
2013-06-10 14:56:25 +00:00
drh
43b85ef5c6
Performance improvements for whereScan methods.
...
FossilOrigin-Name: aae14350a37ad50e4607953ab496cba006032873
2013-06-10 12:34:45 +00:00
drh
cb0071429f
Add a high-speed bypass for the NGQP for the common case of a simply query
...
with quality constraints that outputs a single row.
FossilOrigin-Name: 8d1ba309211e8afa8be5520bbc1eecf6deacae07
2013-06-10 12:17:03 +00:00
drh
92a121f46e
Minor problems in the high-speed NGQP fixed.
...
FossilOrigin-Name: 20eeccf1f24dd762f1bee9c3fe628c70ff01627f
2013-06-10 12:15:47 +00:00
drh
f710305f87
Fix the memory leak in CREATE TABLE that occurs if there are two or more
...
COLLATE clauses on the same column.
FossilOrigin-Name: 7e3820e5b989426c64af46f6bf862b91366ae954
2013-06-09 20:22:41 +00:00
drh
09081862cf
Add test cases to demonstrate the memory leak on the COLLATE clause.
...
FossilOrigin-Name: 0a60212c9c8404ee079985a58094ed2b2b554d48
2013-06-09 20:16:26 +00:00
drh
60c96cd789
High-speed version of NGQP. Still has some minor problems.
...
FossilOrigin-Name: db2415fa677b84cd0f6dd424283c94e98d246e3b
2013-06-09 17:21:25 +00:00
drh
fe685c83d3
Candidate fix for a memory leak that occurs if a CREATE TABLE statement
...
contains two or more COLLATE clauses on the same column definition.
FossilOrigin-Name: 60fc77bc537b099bdd48916746109d0332f839af
2013-06-08 19:58:27 +00:00
mistachkin
753050871a
Improve manual cleaning step performed by the multi-platform build tool for MSVC.
...
FossilOrigin-Name: d5bc1fe1c461bdb3d889ab2e50feb944881822a4
2013-06-07 22:12:20 +00:00
drh
23fec451a6
Must faster computation of estimated logarithm.
...
FossilOrigin-Name: dfbca3acaeb862f24f25e7810a16ff2066111ff4
2013-06-07 02:04:19 +00:00
drh
a20141593a
Further prepare-time performance improvements.
...
FossilOrigin-Name: 02741d177bfc2fca23bc99974cd899eba13cb59a
2013-06-07 00:29:23 +00:00
drh
13e11b4356
Performance improvements.
...
FossilOrigin-Name: 9f8e84ab9874a8af826763b1669adb57abd493ea
2013-06-06 23:44:25 +00:00
drh
4efc9298fb
Improved management of the space to hold WhereLoop.aLTerm[].
...
FossilOrigin-Name: d4141ecbea3abbe83525910684fbd89eb74eeb34
2013-06-06 23:02:03 +00:00
drh
e3be82cf18
Remove some commented-out code that was mistakenly left in the previous
...
check-in.
FossilOrigin-Name: b4a5dbad36bceabc5c5350e7676af6ad42de04eb
2013-06-06 19:25:42 +00:00
drh
70d1834483
Clean up and reorganize the elements of the various objects in the
...
analysis tree for the NGQP.
FossilOrigin-Name: bfc76ae1e94fc5b7fd2c9484a36a8dfe6655d165
2013-06-06 19:16:33 +00:00
drh
6f32848d61
Move the definitions of the WhereLevel and WhereInfo objects out of
...
sqliteInt.h and into where.c. This will facilitate future refactoring
of the internal query planner data structures.
FossilOrigin-Name: 1574653b9b4522b489d4c62d9cf70166bb3bddfd
2013-06-05 23:39:34 +00:00
drh
783dece5d6
Performance improvement for the OR-clause analysis in the NGQP.
...
FossilOrigin-Name: 9b1c4954e468d0acfb5787e6bff56d50a3e7bc1a
2013-06-05 17:53:43 +00:00
drh
e9d935a8aa
Minor performance tuning of the NGQP.
...
FossilOrigin-Name: cbef38c2d123e7d5a02c2a2450e8b329e3e96ee9
2013-06-05 16:19:59 +00:00
dan
f2c9229f73
Up until now the fts4 "unicode61" tokenizer has treated all private use codepoints except the first and last of each of the three ranges as alphanumeric (eligible to be part of tokens). This commit fixes this so that all private use codepoints are considered alphanumeric. In other words, it fixes the handling of codepoints 0xE000, 0xF8FF, 0xF0000, 0xFFFFD, 0x100000 and 0x10FFFD.
...
FossilOrigin-Name: 6cfd9af5250029c0d275be027b4208c48954a8a1
2013-06-05 16:17:21 +00:00
drh
cd0f407c3f
Performance tweak to whereLoopInsert().
...
FossilOrigin-Name: 1c4a78807b7a28c9976ca8c5722ff4e2e8755b7e
2013-06-05 12:47:59 +00:00
drh
6f403ca450
Add a test case contributed on the mailing list
...
that works in NGQP but fails in legacy.
FossilOrigin-Name: 96afe50866a08ed14e911c3c955030f7ab83a3ed
2013-06-05 12:18:15 +00:00
drh
e353ee3898
Update some variable names and comments in the ORDER BY optimizer. Fix a
...
bug in the ORDER BY optimizer dealing with IS NULL constraints. Updates
to test cases.
FossilOrigin-Name: cf96eb5945a9bab71104cb1581ee13ab30022566
2013-06-04 23:40:53 +00:00
drh
d84ce35bfd
Restore the PRAGMA reverse_unordered_selects behavior.
...
FossilOrigin-Name: f49cd6c4e752e39801f9d5de0bc370d26f43837c
2013-06-04 18:27:41 +00:00
drh
907717fe07
Get the index-only optimization working for OR queries.
...
FossilOrigin-Name: 774d5ff857cfad3471401ed518ed0959eb912e6c
2013-06-04 18:03:22 +00:00
drh
aec93a1f2d
Test case updates.
...
FossilOrigin-Name: 0360fec7c093870269211447e9642b5ee34ff778
2013-06-04 15:31:16 +00:00
drh
ee73b87181
Better determination of when an index is UNIQUE.
...
FossilOrigin-Name: 63fd025ad98c33826342824c51436ac92e2bb579
2013-06-04 13:37:26 +00:00
drh
73843cac73
Increase the estimated full-scan cost for an FTS3 table.
...
FossilOrigin-Name: 8d9f29f847f38612447c79a5fb366a9143ef6205
2013-06-04 13:07:44 +00:00
drh
ef71c1f090
Fix a display issue with EXPLAIN QUERY PLAN.
...
FossilOrigin-Name: ff2fa407558360f2499b6df0392ab3cdb4788dec
2013-06-04 12:58:02 +00:00
drh
7699d1c4e5
Refactor the ORDER BY optimizer in the NGQP so that it is easier to maintain
...
and so that it can support optimizing out GROUP BY and DISTINCT clauses.
FossilOrigin-Name: e605c468e3a1163167831c4a6220825c0b5d083b
2013-06-04 12:42:29 +00:00
drh
7c171098b7
Remove more vestiges of sqlite_query_plan from the test cases.
...
FossilOrigin-Name: eb27086e8a8a4d5fcb2ea358256a555e34339423
2013-06-03 22:08:20 +00:00
drh
a3855653ed
Adjust the xBestIndex methods on both the fuzzer and transitive_closure
...
virtual tables so that an unused MATCH operator gets a really large cost.
Remove ambiguities from the fuzzer test cases.
FossilOrigin-Name: e2c1af78b65a8ace976fa6c035db212e1ffc79b8
2013-06-03 21:25:28 +00:00
drh
45c154ac90
Pull in recent trunk changes. Fix the ORDER BY optimizer so that it is better
...
able to deal with COLLATE clauses. Clean up ambiguities in the descidx1.test
script.
FossilOrigin-Name: 6bc71dfcf0ef757c5c2b426dd8fddc1e5ae0f598
2013-06-03 20:46:35 +00:00
drh
f5ad80397d
Fix a typo in a collating function inside the e_reindex.test script.
...
FossilOrigin-Name: 4d74fccf02134a998a84097b021ba9d501e34ff0
2013-06-03 20:39:15 +00:00
drh
e3b7c9216c
Do not use an index fullscan for an UPDATE or DELETE or if disabled by
...
sqlite3_test_control() or sqlite3_config().
FossilOrigin-Name: fabb21854e662b1d8e5631e79f828d5322ceb595
2013-06-03 19:17:40 +00:00
drh
74990dce64
Resolve ambiguities in test cases in collate2.test.
...
FossilOrigin-Name: dcbbcb2e6c85780276cb3a392549f70e21e94408
2013-06-03 19:01:26 +00:00
drh
d2b113bc33
Fix a bug in the transitive_closure virtual table that NGQP exposes.
...
Update between.test module to avoid using sqlite_query_plan.
FossilOrigin-Name: aa66b864204b4b8717d845499132b987eb8ef924
2013-06-03 18:50:15 +00:00
drh
44dc8e822b
Fix EXPLAIN QUERY PLAN row counts for the rtree virtual table tests.
...
FossilOrigin-Name: 15328987cc876d7a4e34561b6b0e08937aefe4be
2013-06-03 18:14:31 +00:00
drh
6f2bfad24b
Update the NGQP to make use of STAT3 information if it is available.
...
FossilOrigin-Name: ff134e6ee95d41b0e59e03bba7e94bc15b04ff8c
2013-06-03 17:35:22 +00:00
drh
3b1d808fab
Honor the orderByConsumed boolean returned from virtual table query planner.
...
FossilOrigin-Name: aaf7f5896d3523531e1a9a1b90c4ad326f0c8fc7
2013-06-03 16:56:37 +00:00
drh
5298630631
Fix to the logic that disables constraints on virtual tables.
...
FossilOrigin-Name: 62d382406b28c1347e13114f42215939ddfd7a9d
2013-06-03 16:03:16 +00:00
drh
3a5ba8b1b7
Fix an issue that was causing ORDER BY DESC to come out in ascending order.
...
FossilOrigin-Name: 029840124022387a8f6d2e1a685a003688d0ef3a
2013-06-03 15:34:48 +00:00
drh
d108d74d48
Virtual tables now always report 25 rows instead of 0 rows in the
...
EXPLAIN QUERY PLAN output. Adjust tests accordingly.
FossilOrigin-Name: 7d91f688815597ff65ec04b7daa21cb9e5d6bf98
2013-06-03 15:24:11 +00:00
drh
21f7ff7d22
Set the WHERE_UNIQUE flag on loops that can only run once.
...
FossilOrigin-Name: 510f4d8ecf6eb284f14b91951e7236505bd71203
2013-06-03 15:07:23 +00:00
drh
6186b30901
Add test cases to verify that ticket [bc1aea7b725f2761] has been fixed in
...
the NGQP.
FossilOrigin-Name: 9b97af94ae7b1624ef1f5adee58010593fbb8b1c
2013-06-03 14:15:34 +00:00
drh
348d19c0c4
Enhance the shell to provide more flexibility when entering numeric arguments
...
on dot-commands. In particular, allow hexadecimal arguments to .wheretrace
and .testctrl commands. Cherrypick from [b9578c371ee5].
FossilOrigin-Name: 3bd5ad095b23102dd3379cb62997cbf23cc67b7a
2013-06-03 12:47:43 +00:00
drh
0e85ccfca5
Further improvements to error handling of the run-time loading of SQLite
...
into TCL.
FossilOrigin-Name: 7cc0c4ee11ad250fa848e7da4713d70fc0fa3715
2013-06-03 12:34:46 +00:00
drh
75b9340520
The NGQP might not find a solution if INDEXED BY constraints on the query
...
are set wrong. If that is the case, print a "no query solution" error
and abort before trying to use the non-existant solution.
FossilOrigin-Name: 42511a7e12a70cf3436d25e4d069e5d309dfd678
2013-05-31 20:43:57 +00:00
drh
79a13bfd1e
Do not search using ON clause constraints of LEFT JOINs to the right of
...
the table.
FossilOrigin-Name: 723f901a63313b64a9f10516711fb6136526b79b
2013-05-31 20:28:28 +00:00
drh
a1f4124cf8
Make sure a unique cursor number is allocated for automatic indices.
...
FossilOrigin-Name: 433d1aecd399590b767ebf07b32023fb718a6574
2013-05-31 20:00:58 +00:00
drh
0edc94dcc7
Do not attempt to generate code in the NGQP if there have been prior errors,
...
since with prior errors some of the expressions might not be fully
named resolved.
FossilOrigin-Name: 665e4291c6e78f11d7181c18c5f2418d1adfcb1c
2013-05-31 19:14:56 +00:00
drh
76f4cfb2e6
Fix a problem with code generation on LEFT JOIN of tables without an index.
...
FossilOrigin-Name: 0b1bee92a0d25f409d5a95f484b05ddf10ae945f
2013-05-31 18:20:52 +00:00
drh
e22501721f
Another virtual table fix in NGQP.
...
FossilOrigin-Name: 2f2ce4167728399cc30bef045aab500940af978c
2013-05-31 18:13:50 +00:00
drh
7e47cb8b75
Fix problems in the virtual table logic for NGQP.
...
FossilOrigin-Name: 23af28e24b8f7ffacd006978b25bab990a43b8c5
2013-05-31 17:55:27 +00:00
drh
8030dc7b1f
Remove the definitions of objects that are no longer used: WhereCost,
...
WherePlan, and WhereBestIdx.
FossilOrigin-Name: 816f8add7e60de2ef8df4fdac090c244f8dbda39
2013-05-31 15:50:39 +00:00
drh
6dc8cbe0d4
Improved handling of errors when doing run-time loading of an SQLite
...
shared-library into TCL.
FossilOrigin-Name: b3f23d186425d2362b756708cbaf422ba3c751f9
2013-05-31 15:36:07 +00:00
drh
ae70cf1816
Allow tracing of whereLoopInsert() when the 0x8 bit is set on ".wheretrace".
...
Remove the use of sqlite_query_plan from where2.test. Fix a bug in the
code generator for OR clause optimizations.
FossilOrigin-Name: 707f0323264c35be14847a6adc49a0dc5eaf4ad2
2013-05-31 15:18:46 +00:00
drh
84f1414b1a
Enhance the shell to provide more flexibility when entering numeric arguments
...
on dot-commands. In particular, allow hex arguments to .wheretrace.
FossilOrigin-Name: b9578c371ee569dca6a0964019959a93407c8ef9
2013-05-31 14:31:11 +00:00
drh
0afb423fd3
Futher enhancements to the ORDER BY optimizer.
...
FossilOrigin-Name: d8efa5f8b60bc4c8df8bfad077f87f76f7ee9bf6
2013-05-31 13:36:32 +00:00
drh
d044d209f3
Improved detection of unnecessary ORDER BY clauses.
...
FossilOrigin-Name: 58805eb36b9975706e2c4e382689519454e9a504
2013-05-31 12:43:55 +00:00
drh
53b52f7f2e
Fix the constructAutomaticIndex() routine so that it works with NGQP.
...
FossilOrigin-Name: 5e1e61399513b4a95fd93df2377a2603f1670063
2013-05-31 11:57:39 +00:00
drh
dc3cd4b020
Improvements to the ORDER BY suppressor in the NGQP.
...
FossilOrigin-Name: 24a2e9ddcecd3926817d77abbb75d068ee7140ad
2013-05-30 23:21:20 +00:00
drh
1b0f026dbb
Incremental check-in with various NGQP fixes. Many tests still fail.
...
FossilOrigin-Name: a51d8c92496436488e1a6eabd85785e8fedf2736
2013-05-30 22:27:09 +00:00
drh
6fa978dade
Futher simplifications to the NGQP. Fix some test cases to use
...
EXPLAIN QUERY PLAN rather than the (now obsolete) sqlite_query_plan
global variable.
FossilOrigin-Name: ae985db4fa08b5efbef5a834e852f0b05101264b
2013-05-30 19:29:19 +00:00
drh
70bdcc738e
The expected result in a test case can be of the form "*glob*" or "~*glob*" to
...
match or not match the GLOB pattern. This is useful for matching
EXPLAIN QUERY PLAN output that contains regular expression syntax characters
like "?", "(", and ")".
FossilOrigin-Name: a3b4e261bd7e278f150872cce7b020af5ad8d2ed
2013-05-30 19:28:34 +00:00
drh
7ba39a921a
Cut over the NGQP query planner. Remove lots of legacy code.
...
This check-in compiles but does not work. The test suite gets incorrect
answers and crashes.
FossilOrigin-Name: 001539df4b74dc1cbceb010a91407003ab4d8735
2013-05-30 17:43:19 +00:00
drh
e1e9766dee
Merge recent trunk changes into the NGQP branch.
...
FossilOrigin-Name: aebe1f2603ee04d792af73aaf59625bda99d5cd1
2013-05-30 11:48:36 +00:00
drh
ee0231ef52
Updates to the Codec interface to support codecs on attached databases and
...
to allow rekeying in the middle of a transaction. These changes are only
applicable if SQLite is compiled with SQLITE_HAS_CODEC.
FossilOrigin-Name: d5b084e9d8cfe9c0c339aca076d472bb50aa764c
2013-05-29 17:48:28 +00:00
dan
ba4f01edb3
Add tests for running FTS 'merge' and 'optimize' commands in shared cache mode.
...
FossilOrigin-Name: 09e5a7ad85dc592fce868a2d0f8719c6915ccb47
2013-05-29 14:22:19 +00:00
drh
def3367e50
Add the percentile() SQL function as a loadable
...
extension in the ext/misc directory.
FossilOrigin-Name: a64d760d9290b1be78cdda7ae66d4f02c3b3fa53
2013-05-28 20:25:54 +00:00
drh
cda73feaa2
Finish removing the sqlite3.inTrans field. In the previous check-in, it was
...
merely commented out because I failed to select File->Save on my text editor.
FossilOrigin-Name: 2f97e38a6611cb17c24d74332d3ac3777dc0dd3e
2013-05-28 17:30:52 +00:00
drh
4580d759fb
Remove the obsolete and unused sqlite3.inTrans field.
...
FossilOrigin-Name: c3381cd4957013d46075996c3b865177c888d2a8
2013-05-28 17:25:48 +00:00
drh
f7b5496e8e
Many small harmless comment changes. Removal of obsolete comments and
...
fixing misspelled words. No changes to code.
FossilOrigin-Name: a0d5cc9315dc6e9ef7dee4c3dfabf4e562d64376
2013-05-28 12:11:54 +00:00
dan
c7ac8c0f1f
Merge autoconf-package branch with trunk.
...
FossilOrigin-Name: a72f50ef76a5f8a3d5a6a758ec88009c12127f06
2013-05-28 10:52:22 +00:00
dan
555c939dc7
Add the "dist" target to main.mk. For building the amalgamation autoconf package.
...
FossilOrigin-Name: 3fdc8b56493350fc4854fb1eaefe29ac87784f91
2013-05-27 18:37:33 +00:00
drh
88da644f2c
Update the NGQP to record which loops need be run in reverse order to
...
satisfy ORDER BY clauses.
FossilOrigin-Name: 211f7a5374fe20a02535edc8b799a8a7136ff6b3
2013-05-27 17:59:37 +00:00
dan
f6f8ac6104
Add the files used to build the amalgamation-autoconf package.
...
FossilOrigin-Name: 048865e8fdd2bef6b43b6cebd45fae94c8a1ab20
2013-05-27 17:19:58 +00:00
dan
87ddfeb079
When writing to an FTS table, take an exclusive shared-cache lock on the %_segdir table before writing. Otherwise, an xCommit() call may report an SQLITE_LOCKED error.
...
FossilOrigin-Name: 3cd2da42e9403b1e6243ad53f3f2bbf89c0fb9b0
2013-05-27 10:11:53 +00:00
drh
3bd26f0543
Record in the WhereLoop object the set of virtual table constraints that
...
need not be separately checked.
FossilOrigin-Name: b49fa74561f38c945be6149693678fd6518c2de4
2013-05-24 14:52:03 +00:00
drh
7c4ac9860c
Merge the latest trunk changes into the NGQP branch.
...
FossilOrigin-Name: 7c8f992c04504a132686ad0652efdff19e43480d
2013-05-24 13:55:23 +00:00
drh
40b521f847
Set _XOPEN_SOURCE to 600 so that fchmod() will (hopefully) work on FreeBSD.
...
FossilOrigin-Name: 61a10452399db28cd5ea4ba9d416b87a34c2eddb
2013-05-24 12:47:26 +00:00
drh
c2bed0a2c9
Fix harmless compiler warnings in the shell.
...
FossilOrigin-Name: 9e2c17c5358b156b588542dbba38da7fedf5302b
2013-05-24 11:57:50 +00:00
drh
17f37c7d5a
Add OGC GeoPackage files to the magic.txt database.
...
FossilOrigin-Name: dab6a32847ce17f12e3a2b09a3567945b2154f67
2013-05-23 20:52:16 +00:00
dan
7a7083cf70
Have the "make fulltest" command run the "mmap" permutation test.
...
FossilOrigin-Name: 82ad373f85aa0a87d24c6dbb2ea7dca8c5aff56a
2013-05-23 10:15:46 +00:00
dan
3719f5f600
Avoid unnecessary calls to FCNTL_SIZE_HINT. Return an error to the user if the file-control invoked by "PRAGMA mmap_size" returns a value other than SQLITE_OK or SQLITE_NOTFOUND.
...
FossilOrigin-Name: 40cfde8b4a59a09e52e62f9f029f8d3b32eb15fa
2013-05-23 10:13:18 +00:00
drh
34e258c942
Cause the mmap_size PRAGMA to immediately change the mmap space if the
...
database connection is already active. In particular, reducing mmap_size
will immediately free up process address space.
FossilOrigin-Name: 761177927cb51e4f5e66061ca39cf37edbe8346b
2013-05-23 01:40:53 +00:00
drh
ef86637655
Use the NGQP plan for EXPLAIN QUERY PLAN output. This change causes 207
...
errors in veryquick.test, many of which are benign.
FossilOrigin-Name: f783e8e6b10de44029c7c5f57e4648a4a677ca1b
2013-05-22 20:49:02 +00:00
drh
0f133a4832
Allow the rowid at the end of an index to be used in a constraint on that index.
...
FossilOrigin-Name: 9bf0524df7ca2e7fcd92b2878a8457264b3c7f6e
2013-05-22 17:01:17 +00:00
drh
a50ef114f4
Improvements to ORDER BY handling in the NGQP. Fix an "exit" mistakenly
...
left in a test script during the previous check-in.
FossilOrigin-Name: 12c709b4369c7d94d7fb743d0d0da7a9350a3d16
2013-05-22 02:06:59 +00:00
drh
d15cb17174
Enhanced "wheretrace" output in the NGQP solver routine.
...
FossilOrigin-Name: 04dfb85a2a7025d4b5056b73fa8477691323919f
2013-05-21 19:23:10 +00:00
drh
23f98daabb
Work toward improving the NGQP's ability to optimize out ORDER BY clauses.
...
FossilOrigin-Name: 67367f1e1f0c3eb6be65eea9873910aa62b49884
2013-05-21 15:52:07 +00:00
drh
81ec8c910b
Merge in all trunk changes up through the 3.7.17 release.
...
FossilOrigin-Name: 14ab6675e5eab3761256a06dad23d2b11220788a
2013-05-20 15:14:42 +00:00
drh
d399fb3de8
Version 3.7.17
...
FossilOrigin-Name: 118a3b35693b134d56ebd780123b7fd6f1497668
2013-05-20 00:56:22 +00:00
drh
f15d23da6e
Remove a stray tab character from the transitive_closure extension source code.
...
FossilOrigin-Name: 7a9aa21c3506a10ab9465540e81071b39bca447d
2013-05-17 20:16:41 +00:00
drh
e8601c6561
Fix a bug in SQLITE_TRACE_SIZE_LIMIT that was introduced by
...
check-in [1a1cf5aa86734c8]. That check-in was to remove harmless
compiler warnings. So once again, we have introduced a real bug
into SQLite by attempting to eliminate a harmless compiler warning.
FossilOrigin-Name: cec2bcb45aa3f0438e19381ac863f0f876a1d1ad
2013-05-17 17:15:34 +00:00
dan
5b15b75ada
In test file test_syscall.c, include sqliteInt.h before any tcl or system include files. This ensures that the magical defines in sqliteInt.h really do enable large file support (and set things up so that sizeof(off_t)==8).
...
FossilOrigin-Name: 0f355bb17f256c6322e63a95835a67949aa48fb3
2013-05-17 16:41:15 +00:00
drh
4c275b1fe7
Use sum() instead of total() in mptest/multiwrite01.test too.
...
FossilOrigin-Name: d0c2288c723e276957318be433e25746811b0ff7
2013-05-17 12:52:58 +00:00
drh
e314733295
Use sum() instead of total() in the mptest/crash01.test script.
...
FossilOrigin-Name: 8ba0fc98115f05ebed7ea945e156379c39e92de2
2013-05-17 12:51:49 +00:00
dan
cf8489fe2f
Add extra "PRAGMA mmap_size = N" statements to mmap1.test and mmap2.test.
...
FossilOrigin-Name: cec0a06c17435d5a35e76b52d6901ecda98f9916
2013-05-17 12:25:00 +00:00
dan
ede01a97d3
In os_unix.c and os_win.c, initialize the default mmap-limit of a new file descriptor to the current global default mmap-limit, not the current global maximum allowable mmap-limit.
...
FossilOrigin-Name: 1def4ea3a02afc19648f4cd928b247f8fa55da80
2013-05-17 12:10:52 +00:00
dan
4c5aeecc90
Fix minor test script issues causing releasetest.tcl to fail.
...
FossilOrigin-Name: d8ded9d8a1052885ce223c70efa55c0dd8b9920e
2013-05-16 19:15:07 +00:00
dan
cf5db44ab6
Fix a typo in Makefile.in preventing compilation with the --disable-amalgamation option.
...
FossilOrigin-Name: 8ffbefe7d72d25984440c0e7c92a5e9c472ed55e
2013-05-16 18:33:06 +00:00
dan
5b04dc517a
Several releasetest.tcl related fixes to test cases. No code changes.
...
FossilOrigin-Name: e97d744ba1138e6c4c1fc657c32f4391ea7479f1
2013-05-16 14:28:47 +00:00
mistachkin
6e8752d487
Fix compilation with SQLITE_OMIT_WAL on Win32.
...
FossilOrigin-Name: 6d45a79fb18dcd305cc41c525060e42f2402bd77
2013-05-16 12:41:49 +00:00
dan
617dc8602d
In sqlite3_close_v2(), do not attempt to roll back a transaction if there exist active statement objects. Any open transaction will be rolled back when the last of these statement objects is finalized.
...
FossilOrigin-Name: d11e76072a17fe833b87595d9d79f2c4b0b09cb3
2013-05-16 11:57:28 +00:00
drh
58a450c041
Treat identifiers in the HAVING clause the same as in the WHERE clause.
...
Only consider AS names from the result set to match if there are no other
matches. Continuation of the fix for [2500cdb9be05]. This check-in
fixes a bug found by [http://www.sqlite.org/sqllogictest/ | SqlLogicTest]
during release testing for version 3.7.17.
FossilOrigin-Name: 9ffff3d05226bbd01a0745dd0a511776358253c0
2013-05-16 01:02:45 +00:00
mistachkin
0600663346
Apply compilation fix from [a58af81483] to the other makefiles as well.
...
FossilOrigin-Name: 7e76889d675e4c646158f7f9188d25f155c18876
2013-05-15 20:35:13 +00:00
dan
11f71d6ae4
Fixes to allow testfixture to be compiled with SQLITE_OMIT_VIRTUAL_TABLE defined.
...
FossilOrigin-Name: 00231fb0127960d700de3549e34e82f8ec1b5819
2013-05-15 18:34:17 +00:00
drh
6fdd3d8aa0
The sqlite3ExprCollSeq() function can no longer be called while parse
...
the schema, so remove the code path inside of sqlite3ExprCollSeq() that
dealt with that case.
FossilOrigin-Name: 867b3e3b29a357f68e48f0898bf323c5dd0575a4
2013-05-15 17:47:12 +00:00
drh
f7d2573d7c
Merge the shared-cache-fixes branch into trunk.
...
FossilOrigin-Name: 5cc1cc55d28a73d390d51fdf6f2c026f1cab1d75
2013-05-15 17:08:46 +00:00
dan
d58792e0f0
Extra test for commit [6dae62c4e5].
...
FossilOrigin-Name: b10b9e758b171b0f514592bba70c3ecd17c8c47f
2013-05-15 16:24:46 +00:00
dan
f2614145ec
Add main.c to the list of files compiled with SQLITE_TEST defined when building testfixture.
...
FossilOrigin-Name: a58af81483a5facb09d2a80385fc8815b259a10d
2013-05-15 16:16:25 +00:00
drh
2ab2d55f01
Fix the sharedA.test module so that it does not attempt to run TCL callbacks
...
on a different thread from where the interpreter was originally created.
FossilOrigin-Name: 65ff754e3521aa8ee9135d235166cac2a8f57ebd
2013-05-15 16:08:33 +00:00
dan
d5dd3305a1
Do not run sharedA.test if the system is not threadsafe.
...
FossilOrigin-Name: d484eaf8d6dfaf2c1065b93b2a52a6db91c09fa4
2013-05-15 15:53:52 +00:00
dan
91cf9ba339
Merge latest trunk changes with this branch.
...
FossilOrigin-Name: 47dd65a890955f333d431e275f3f4d95d34a5ba5
2013-05-15 15:42:14 +00:00
dan
911ce41818
When loading a database schema that contains an index definition that includes a COLLATE clause for which the collation sequence is unavailable, do not assume that that index uses BINARY instead. Fix for [0fc59f908b].
...
FossilOrigin-Name: 6dae62c4e505a9a1a22c2771ef3e1921407c4748
2013-05-15 15:16:50 +00:00
drh
15912e70b7
Add the rot13.c loadable extension.
...
FossilOrigin-Name: 8f9bd8e7a88eb11fb17d29954fa4b8c2840a5019
2013-05-15 13:05:03 +00:00
dan
6743081784
When closing a connection, avoid tripping active cursors belonging to a different shared-cache client. Also, if sqlite3_close() is called while there are still active statements belonging to the connection, return SQLITE_BUSY and do not roll back any active transaction.
...
FossilOrigin-Name: 6071b7cce067c807e040283fc4b7449dc6eca498
2013-05-15 10:21:50 +00:00
drh
35cbe7f523
Merge together the fork in this branch.
...
FossilOrigin-Name: 164e3d4da20cc16d2a04d602b5a8229e0db99d9d
2013-05-14 23:13:41 +00:00
drh
85ec3b63d8
Fix an assert() in unlockBtreeIfUnused() so that it checks for the existance
...
of an untripped cursor, not for the existance of any cursor at all.
FossilOrigin-Name: a6f851d0fe01d8c8d44a2fe0b716ff7a5194c63b
2013-05-14 23:12:06 +00:00
dan
bf0e57a7d0
Avoid deleting a b-tree "has-content" vector belonging to another shared-cache connection from within sqlite3_close().
...
FossilOrigin-Name: 93462df78247f5634b9f53752cf80056bbfe9aac
2013-05-14 20:36:31 +00:00
drh
319f677d57
First attempt to get ORDER BY optimization working in NGQP.
...
FossilOrigin-Name: 9fe20292558bb9422de91e35648cb834cbf3b306
2013-05-14 15:31:07 +00:00
dan
cd7b91a7f1
Candidate fixes for problems revealed by notify2.test. Notify2.test is still failing at this point.
...
FossilOrigin-Name: ea0428f9b6e63066e7444a2ba2f8c12a2e3ab7e4
2013-05-13 18:23:15 +00:00
drh
0823c89c9b
Minor fixes to the OR-clause processing in the NGQP.
...
FossilOrigin-Name: d6946f33c7851aa7efb04b93ac2ae1ac50c26eec
2013-05-11 00:06:23 +00:00
drh
cf8fa7a65b
Now generating OR-clause plans.
...
FossilOrigin-Name: e17003fcfec0c0b524b1b9ff8e15e7ee83efa571
2013-05-10 20:26:22 +00:00
drh
eb04de3224
Update the NGQP so that it can produce plans that include automatic indices.
...
FossilOrigin-Name: 586b55d8d7722de1c0530b3b832bae0511e6d05c
2013-05-10 15:16:30 +00:00
drh
b2a90f09b8
Factor out common operations into whereLoopAddAll(). Add stubs for
...
missing features.
FossilOrigin-Name: 0278e420614e02fb2d8474ed99b0904275882dfe
2013-05-10 03:30:49 +00:00
drh
2b344c7220
Merge in the latest trunk changes.
...
FossilOrigin-Name: 5ed31c8279a4f465b982df5dc20cefc286928b93
2013-05-10 02:11:40 +00:00
drh
6b7157bbd5
Free up bits of wsFlags for reuse. Install the ORDER BY optimization
...
infrastructure for the NGQP.
FossilOrigin-Name: 82d50e198025a2fdb8ee733edb8419d388ee5362
2013-05-10 02:00:35 +00:00
drh
6cf9d8d63a
Add assert()s to the implementation of xRead() in the built-in VFSes to
...
verify that the offset parameter is always non-negative.
FossilOrigin-Name: cf5c3642247fdd34d87f0368594cd7b8f081636a
2013-05-09 18:12:40 +00:00
drh
b3129fa560
Do not move WHERE clause terms inside OR expressions that are contained
...
within an ON clause of a LEFT JOIN. Fix for ticket [f2369304e47167e3e].
FossilOrigin-Name: 1128575d0ab24f7023a0f6e6ce4828b9a09a7c6c
2013-05-09 14:20:11 +00:00
mistachkin
0bf3bc6c64
Refine and reform all Windows OSTRACE macro usage. Replace all usage of sqlite3TestErrorName() with sqlite3ErrName() and add missing return codes.
...
FossilOrigin-Name: 610425f19008b8b5d4bf027c8b14d97ec3115a54
2013-05-09 00:40:13 +00:00
drh
c718f1c894
Fix memory leaks in the NGQP logic for virtual tables.
...
FossilOrigin-Name: 3c2e83a4a2c5e85202162feeb37ef7a3911c05a3
2013-05-08 20:05:58 +00:00
drh
92692d32ad
Fix a couple of harmless compiler warnings in the fts3_tokenize virtual
...
table.
FossilOrigin-Name: 1fa8c457394c94864f7584e4c893ec09e685fba4
2013-05-08 17:06:28 +00:00
drh
e6f450177b
Make sure the ORDER BY collating sequences are compatible with the
...
comparison collations before using the merge algorithm for compound
SELECT statements. Fix for ticket [6709574d2a8d8].
FossilOrigin-Name: ce853a75068073d6acc8bec0819505a22c4c7e69
2013-05-08 16:57:48 +00:00
drh
8c15d99a9a
Fix the wholenumber virtual table so that it returns higher costs for
...
unconstrained usage. Cherrypick from [ceff8955020cd13].
FossilOrigin-Name: 7227b61512a534645c73883c2e37b4e647592e5d
2013-05-08 14:20:28 +00:00
drh
5346e95dda
NGQP working with virtualt tables, though many legacy tests fail and there
...
are yet some memory leaks.
FossilOrigin-Name: bd9327a9684b99978734ccd561eea1ad864ab13b
2013-05-08 14:14:26 +00:00
drh
4f58074a80
Fix the wholenumber virtual table so that it returns higher costs for
...
unconstrained usage.
FossilOrigin-Name: ceff8955020cd1314bf1ab0af7d075fe2c0863e5
2013-05-08 14:13:51 +00:00
drh
a184fb87b8
More bug fixes to the WhereLoop generator and the solver in NGQP.
...
Now finds the best plan for TPC-H Q8. This seems to prove the
concept, but there is still much work to be done.
FossilOrigin-Name: 8e5aad37529ec3042e3468acf15186f566e2df8a
2013-05-08 04:22:59 +00:00
drh
f204dac1e3
Bug fixes in the solver.
...
FossilOrigin-Name: b36034bbd19bc5677b26a6f60ca96eb2b37db373
2013-05-08 03:22:07 +00:00
drh
a18f3d271e
Add the NGQP solver.
...
FossilOrigin-Name: 5d37587c50d8932b6357bfd03152a851510a4317
2013-05-08 03:05:41 +00:00
drh
43fe25fcef
Continued progress on generating good WhereLoop objects for the new query
...
planner.
FossilOrigin-Name: 15cc8a16482777d8e138c4d0863faf8d54fef33a
2013-05-07 23:06:23 +00:00
drh
f1645f0843
Inserting a few WhereLoop objects without leaking memory. Costs are
...
not correct. Inequality and IN constraints are not implemented.
FossilOrigin-Name: e8881a8b2f25f38bc8ff77619f96f38fe530d13b
2013-05-07 19:44:38 +00:00
drh
c01b7306ae
Make sure the ORDER BY collating sequences are compatible with the
...
comparison collations before using the merge algorithm for compound
SELECT statements. Candidate fix for ticket [6709574d2a8d8].
FossilOrigin-Name: fc3630cdef6e2cdbfb4e7b373d1a094753e55016
2013-05-07 17:49:08 +00:00
dan
e8dee7d1ed
Modify the fts3tokenize table implementation so that it does not use the SQL function fts3_tokenizer. The user may have installed an authorizer callback that prohibits this.
...
FossilOrigin-Name: 0ba67b64de258883e4c43db09e131bb67083855e
2013-05-07 12:16:48 +00:00
drh
1ba00291a3
In the command-line shell, output the elements of the schema in the order
...
that they appear in the sqlite_master table. This is necessary in some
cases to make the schema parsable.
FossilOrigin-Name: e5b3cd747bb0b484e38b8611a81925e2cc144435
2013-05-06 21:01:06 +00:00
drh
151b7d5bad
In the command-line shell, make sure the output of dot-commands goes to
...
the same redirected output stream as the result of queries.
Ticket [2f96536e7ff7dba]
FossilOrigin-Name: b72d365920dbe45e61d8b1cff708a8858c2b3e33
2013-05-06 20:28:54 +00:00
drh
acf9c2b555
Add an assert() to fts3_expr.c in order to silence a clang warning.
...
FossilOrigin-Name: d8dc2c5fb554eb5898ddc8d703c6a360af7fe023
2013-05-06 14:57:48 +00:00
drh
2722898c6c
Make sure the authorizer callback gets a valid pointer to "ROWID" for the
...
column-name parameter when doing an UPDATE that changes the rowid.
Fix for ticket [0eb70d77cb05bb2272].
FossilOrigin-Name: 26a59bb88d4082758eb281b365b57f9a0c059d89
2013-05-06 13:22:50 +00:00