dan
a7bf23c6b5
Fix some broken asserts in btree.c and vdbeaux.c that may fail following an OOM error.
...
FossilOrigin-Name: e15f47064bef431c0afd8bf93eb4e160c23ad562
2014-05-02 17:12:41 +00:00
drh
c7f6c148d9
Failure to extend a temp file for use with mmap() in vdbesort.c is benign.
...
FossilOrigin-Name: d4d396387d373bd1e82eda2c7c2e7ca35ec099c4
2014-05-02 16:22:55 +00:00
dan
012e133772
Remove a faulty assert() from vdbesort.c.
...
FossilOrigin-Name: d95d68aa1d14b750888d50068380cc107f9070df
2014-05-02 16:03:57 +00:00
drh
7a0fd192cc
Fix a faulty assert() statement.
...
FossilOrigin-Name: 9196ce407379ca3b151b601b98848771e5cb4e8f
2014-05-02 15:25:24 +00:00
drh
fb0d6e56d6
Merge latest trunk enhancements and fixes into the orderby-planning branch.
...
FossilOrigin-Name: 84862d3a095629d20c8e7b8a16f4dc26cd41ab6d
2014-05-02 13:09:06 +00:00
drh
e724d3d26a
Add a comment explaining why WhereLoop cost adjustments are omitted for
...
skip-scan loops.
FossilOrigin-Name: 3bc43594aaeee9225c0590677fcce480bedcb37b
2014-05-02 00:09:40 +00:00
dan
3852413246
Fix an obscure problem to do with temp register allocation that could occur if more than one simple SELECT within a compound SELECT uses a partial sort.
...
FossilOrigin-Name: 427409ae106cdab7892a6b50fe30c5f52de5addc
2014-05-01 20:26:48 +00:00
drh
c5f246eb37
Add #ifdefs for test coverage. Add a testcase().
...
FossilOrigin-Name: be2702ce35c713b33c9b7689643b45fb0de6af2a
2014-05-01 20:24:21 +00:00
drh
57fe136b23
Take out the special handling of nolock=true in os_win.c and add it to
...
pager.c, so that it works for all VFSes. Add the pPager->noLock boolean
for clarity.
FossilOrigin-Name: 725c1c14be331bce9bf074960dbfa7b6d4c1ba87
2014-05-01 01:49:22 +00:00
drh
48cdabcb1a
Avoid unnecessary xUnlock operations on temp file.
...
FossilOrigin-Name: 1829c38c3233c8cb194fae6d560d35a8916b1348
2014-05-01 01:20:05 +00:00
drh
d1ae96d39e
Add the immutable=TRUE query parameter and SQLITE_IOCAP_IMMUTABLE, either
...
of which prevents locking of the database and omits tests for existance
of journal files.
FossilOrigin-Name: 71f152c85d79ebd9ca48bc9c4c71fc4debaf2437
2014-05-01 01:13:08 +00:00
drh
fb4c9242a5
Merge in all recent changes and enhancements from trunk.
...
FossilOrigin-Name: 84243f844417f888ab731841f7dbf95749f6e034
2014-04-30 20:32:41 +00:00
dan
5da73e1a09
Fix a problem in calculating the costs of "OR" scans.
...
FossilOrigin-Name: 9bbca48b42e4fe16f2188e18dc736da30a96435c
2014-04-30 18:11:55 +00:00
dan
8164722c58
Add text to the header comment of whereLoopAddBtree() describing how the costs of various b-tree loops are estimated.
...
FossilOrigin-Name: 05e6e16cb28c9ffb4596bd2ef81f687c5403ecbb
2014-04-30 15:00:16 +00:00
dan
4a6b8a05cd
Fix a couple of out-of-date comments in where.c.
...
FossilOrigin-Name: eefeda32d54efbbdf7d20b719299eda48b891fae
2014-04-30 14:47:01 +00:00
drh
224155dd1c
Fix long-standing typos in comments.
...
FossilOrigin-Name: b9f91317c34d07769a95dc2f905a6ccabceb64a3
2014-04-30 13:19:09 +00:00
dan
264d2b97a9
Test that the default values used when sqlite_stat1 data is not available are calculated correctly. Fixes for the same.
...
FossilOrigin-Name: e2d42f909de85a0586389f2dc0e654f7af2e351a
2014-04-29 19:01:57 +00:00
dan
e4618fb30d
Merge trunk changes into this branch.
...
FossilOrigin-Name: d74299f037f3a6a4b3bce8b4d1c76c407c1f3b3e
2014-04-29 16:46:24 +00:00
dan
09e1df6c00
Ignore likelihood() values on indexed IPK lookups.
...
FossilOrigin-Name: 5bb7757a7b32a74482d3e93e9c9eea02273fe981
2014-04-29 16:10:22 +00:00
dan
7de2a1faf6
Do not reduce the number of rows scanned at all for "IS NOT NULL" constraints. Fix a bug in calculating the number of rows visited by scans of partial indicies.
...
FossilOrigin-Name: a8ae93f0cffa116df0ba34d46a53f49d42dace41
2014-04-28 20:11:20 +00:00
dan
42685f211e
The trunk assumes that an open range constraint on an indexed term (col>?) term matches 1/4 of the indexed rows, and that a closed constraint (col BETWEEN ? AND ?) matches 1/64. Change this branch to do the same.
...
FossilOrigin-Name: 4047ac75e2a8f0b330255501c42e4f04e5ab500d
2014-04-28 19:34:06 +00:00
drh
2e525f18e2
Merge all recent trunk enhancements and fixes into the sessions branch.
...
FossilOrigin-Name: e158812c34b01ce516d26636a489509bf61d1c27
2014-04-28 18:02:21 +00:00
drh
65e6b0dd12
Add the sqlite3_rtree_query_callback() API to the RTree virtual table.
...
(Cherrypick from the sessions branch.)
FossilOrigin-Name: af2cbe64adab5f9e3b0f3da00d06428088589d7f
2014-04-28 17:56:19 +00:00
drh
ae28b301e1
Add the sqlite3_rtree_query_callback() API to the RTree virtual table.
...
FossilOrigin-Name: 3dca2809352c6c6d56db74447a814f77011c6220
2014-04-28 17:51:12 +00:00
dan
e3bfbb7284
Modify internal function whereLoopAdjustCost() so that it does not prefer a skip-scan over a regular index scan even if the regular scan uses a subset of the WHERE terms used by the skip-scan.
...
FossilOrigin-Name: 88a5758dcce891eb7be15432ebdc9f80071d413b
2014-04-28 09:35:31 +00:00
dan
440e6ff3b0
Fix an error in estimating of the number of rows visited by a range scan.
...
FossilOrigin-Name: d491de62fce69d93e89f65f7713972f7c2c451f7
2014-04-28 08:49:54 +00:00
dan
2dd3cdcfab
Fix an sqlite3_stmt_status() problem caused by recent changs on this branch.
...
FossilOrigin-Name: dee204092421a239f9f60ab83c3a5b3e24d1baea
2014-04-26 20:21:14 +00:00
drh
453e0261df
Allow the xfer optimization to proceed if the DEFAULT on the very first
...
column of the two tables is different. This is a refinement of the
fix for ticket [f67b41381a].
FossilOrigin-Name: 349f483499dd685a8da94923b6bd810a52e5e236
2014-04-26 17:52:08 +00:00
dan
9940e2aa45
Avoid transfering records between tables unless the default values for all columns are the same. Fix for [f67b41381a].
...
FossilOrigin-Name: f8c4c495e6de1f124d205383d4bafa46accbff5c
2014-04-26 14:07:57 +00:00
dan
8ad1d8ba38
If the user provides likelihood() data for a WHERE clause term used as part of an index key, have the planner use it when calculating the expected number of rows visited by the loop.
...
FossilOrigin-Name: c51efaa5d29ee0a91b9e6a83a8dd82530670811a
2014-04-25 20:22:45 +00:00
dan
cfc9df76e1
Store values loaded from the stat1 table as logarithmic values in memory.
...
FossilOrigin-Name: 1bd74c49ddab6f53bb6eaa57907eff44c2580dd6
2014-04-25 15:01:01 +00:00
drh
9dfaf621d1
Make sure ORDER BY clauses on joins that involve virtual tables and that
...
have a DISTINCT clause work correctly. This is a candidate fix for
ticket [388d01d4bb8f9]. Test cases for that ticket will be checked in
separately.
FossilOrigin-Name: 171138122690faafde0dcab0201b90bdf02d3637
2014-04-25 14:42:17 +00:00
drh
a01c7c70fd
When VDBE_PROFILE is enabled, ignore negative opcode times, which sometimes
...
occur, perhaps due to context swaps.
FossilOrigin-Name: 4e88042f9d3e678914da96c0eb276f3d8fca5a94
2014-04-25 12:35:31 +00:00
dan
aa9933c115
Changes to the way the planner calculates the costs of various table and index scans. Some test cases still failing.
...
FossilOrigin-Name: c5a6ec0a880652dc8f4593d9f7acd58ddc3dc5f3
2014-04-24 20:04:49 +00:00
drh
f690c14280
Improved header comment on the vdbesort.c module. No changes to code.
...
FossilOrigin-Name: bf09ce24d054bc68c226064f5f28d97e0e648a13
2014-04-24 16:25:25 +00:00
drh
0ff435a782
Reopen the orderby-planning branch and merge in the latest trunk enhancements
...
and fixes.
FossilOrigin-Name: 6077ddcd93318e24b9756adaaf293ba9fb3cedf7
2014-04-24 15:06:25 +00:00
drh
3de4df27dd
Improvements to comments. Store some extra information in SqliteThread that
...
is useful for debugging.
FossilOrigin-Name: 9fb5e212089d85cdd3b4787dd69c72e6d84560b6
2014-04-24 12:28:28 +00:00
drh
9e0ed8d4ec
Merge all recent trunk changes into the threads branch.
...
FossilOrigin-Name: e2c9f71a451e44040624b9f255b4510743513019
2014-04-23 12:57:55 +00:00
drh
f34a9fef4c
Change from using the win32-none VFS to just a query parameter.
...
FossilOrigin-Name: ffceacf61905dc3553978ba5f68e133947eca2fa
2014-04-22 19:42:22 +00:00
mistachkin
9df245b073
Add some OSTRACE calls for consistency.
...
FossilOrigin-Name: be292d559748a24ff012266a1f58ce6c027e0411
2014-04-22 19:34:16 +00:00
drh
0bf8277196
Add the win32-none VFS which omits rollback-journal locking.
...
FossilOrigin-Name: 03e3c5a8b17a219a49bfbe79b7debd27ace8ad85
2014-04-22 19:30:00 +00:00
drh
98cf9d74f8
Fix the generation of sqlite3_rtree_query_info.iRowid and add test cases
...
to verify that it is fixed.
FossilOrigin-Name: eba95ead49f8f8ce45d400186562ff0066537c5c
2014-04-21 18:13:37 +00:00
drh
a6ca7f2c1b
Fix an off-by-one error in setting the "iLevel" field of the
...
sqlite3_rtree_query_info structure passed into the RTree query callback.
FossilOrigin-Name: d708f159abfb3b87e2844463088d4fb7f8da9c97
2014-04-21 15:21:19 +00:00
dan
374cd78c1d
Avoid discarding an ORDER BY clause in the case where an identical GROUP BY clauses uses an index to group, but not sort, the rows. Fix for [b75a9ca6b0].
...
FossilOrigin-Name: de9a490f594183f337a2ec9e0f87792eac83548b
2014-04-21 13:21:56 +00:00
drh
b355c2cc12
Clean up the proper-subset cost adjustment logic to make it more compact
...
and easier to read and so that full branch test coverage is more easily
obtained.
FossilOrigin-Name: 9a5d38c79d2482a23bcfbc3ff35ca4fa269c768d
2014-04-18 22:20:31 +00:00
drh
958d261bb8
Fix harmless compiler warnings.
...
FossilOrigin-Name: f8f72ecb9052a4cace1db75879fb8b5131ea4f50
2014-04-18 13:40:07 +00:00
drh
e9af1894e3
Merge recent trunk changes into the threads branch.
...
FossilOrigin-Name: 8729aa3e3ed1da2e15408ef8705cbe185cd2a5ac
2014-04-18 12:38:54 +00:00
drh
e49b2718e0
Merge the latest changes from sessions.
...
FossilOrigin-Name: d9eef5b03c7c4bb69c11eda41152ee81aed1cac7
2014-04-18 01:14:46 +00:00
drh
a1a483d54e
Merge recent trunk changes into sessions.
...
FossilOrigin-Name: 95e77efe076ab421bd246119c47dba5dacf9d087
2014-04-18 01:10:05 +00:00
drh
71794dbaeb
Add the SQLITE_RUNTIME_BYTEORDER compile-time option to force SQLite to check
...
the processor byte-order at run-time. Add additional compile-time byte order
checks for ARM, PPC, and SPARC.
FossilOrigin-Name: 2c5363873a6f990a0abaacac6303acd46b48befc
2014-04-18 00:49:29 +00:00