1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-15 11:41:13 +03:00
Commit Graph

13190 Commits

Author SHA1 Message Date
drh
1f8bb4b0a8 Update requirements marks to fix typos in the requirements text.
No changes to code.

FossilOrigin-Name: f5a263658187250044afc1a74000e6f6962733ca
2014-04-26 19:23: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
drh
b79c718f1a Add test cases to ensure correct operation of joins with a virtual table
that include DISTINCT and ORDER BY clauses.  Verification for ticket
[388d01d4bb8f9].

FossilOrigin-Name: 5ada136f43ce744ae8c349eff39838eb44611b6e
2014-04-25 17:37:16 +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
mistachkin
e756bfb363 Preliminary changes to support building VSIX packages for Windows 8.0 and Windows Phone 8.0 using Visual Studio 2013.
FossilOrigin-Name: 3bf97c811a25babf760f256245c756ed6710f8ba
2014-04-21 18:00:11 +00:00
drh
f0582f43dd Comment tweaks on the test case for the [b75a9ca6b0] bug fix.
FossilOrigin-Name: 65d2544af9adc1e2f1d193e57f8be0422fb0d5eb
2014-04-21 13:36:54 +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
46a06bbe47 Add to speedtest1.c the --threads option for setting the
SQLITE_CONFIG_WORKER_THREADS configuration.

FossilOrigin-Name: 5fce40c44aacf883df2e8e9472c399a6e92197b3
2014-04-18 13:57:39 +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
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
mistachkin
00b638bb6f Preliminary changes to support building VSIX packages for Windows Phone 8.1.
FossilOrigin-Name: a1b2f28ba85b043df68875f5d3446140db4f2cb0
2014-04-18 00:08:13 +00:00
drh
2cf4acbd9f Add the SQLITE_TESTCTRL_BYTEORDER test control to interrogate SQLite's notion
of the processor byte order and whether the byte order is known at compile-time
or determined at run-time.

FossilOrigin-Name: 9c6961967ae00e563ebe2859eaf2639a79f2cb01
2014-04-18 00:06:02 +00:00
dan
a9f43d735b Fix build problems in vdbesort.c. Add further comments and changes to make things easier to understand.
FossilOrigin-Name: 12b190db1d20c34390c768614b40ff58a9d3b74c
2014-04-17 08:57:17 +00:00
dan
31a0bfde9b Clarify the purpose of the nField argument passed to sqlite3VdbeSorterInit().
FossilOrigin-Name: c0c8cff17b7311bbc4fd081313a5552f927c3833
2014-04-16 19:04:23 +00:00
dan
db30fc4ff2 Change the name of vdbeIncrInit2 to vdbePmaReaderIncrInit. Add a header comment to the same function.
FossilOrigin-Name: 6622d87675c1d7992b1e6d52ae7da1007a1568a4
2014-04-16 17:41:22 +00:00
dan
7f0a24b7bf Rework the way trees of MergeEngine objects are built in vdbesort.c to make it easier to follow. Fix memory leaks that could follow an OOM or IO error. Add various comments to explain functions in vdbesort.c.
FossilOrigin-Name: 69026ec7dc3bd3e33bbe17c221a53cf1dd0f8945
2014-04-16 16:43:05 +00:00
dan
22ace89179 Fix some problems to do with OOM conditions in vdbesort.c. Some problems remain.
FossilOrigin-Name: 2f94f9ce9bf11f1599bbc640b3fc8c15da588416
2014-04-15 20:52:27 +00:00
dan
1a088a8ef5 Fix further code and documentation issues in vdbesort.c.
FossilOrigin-Name: d03f5b8622d304f029f73c7cd0bee3182a81d081
2014-04-15 19:52:34 +00:00
drh
65b9ac5224 Make sure the undocumented sqlite_rename_parent() function does not
crash even if it is invoked with NULL arguments.
Ticket [264b970c4379fd4b94]

FossilOrigin-Name: c6fa8d0d82805be230f672eabccdfa5680d4ddfd
2014-04-14 19:48:25 +00:00
dan
9c1586ec7c Allow the sorter to begin returning data to the VDBE as soon as it is available, instead of waiting until all keys have been sorted.
FossilOrigin-Name: cb0ab20c48962cdee03115efa93d7d501780ac73
2014-04-14 19:23:18 +00:00
dan
f77ceba594 Improve performance in single-threaded mode by having the final merge pass keys directly to the VDBE, instead of going via a final PMA.
FossilOrigin-Name: 02610cd9b77caa2c181210056088beb3ad6ce30f
2014-04-14 18:41:21 +00:00
dan
92a20dde1f Minor fixes so that builds with SQLITE_MAX_WORKER_THREADS=0 work.
FossilOrigin-Name: e400bbbf26cdfe88f6cb231e96cdcddb9a6bcc0f
2014-04-14 08:45:32 +00:00
dan
be3018c18f Improve use of multiple threads in sqlite3VdbeSorterRewind().
FossilOrigin-Name: e1bdc4b810907cc0e55e0c923c8ebc777068cfe0
2014-04-14 07:30:39 +00:00
drh
d249090450 Remove the unused second argument from sqlite3ExprCachePop(). Add an
ALWAYS() on an always-true conditional in sqlite3VdbeResolveLabel().

FossilOrigin-Name: ab23abf392175d3e256ff619b13abbbe732a49ed
2014-04-13 19:28:15 +00:00
drh
87744513e7 Make sure column cache elements are cleared correctly when jumping over
code for key generation in a partial index. 
Fix for ticket [2ea3e9fe6379fc3f6].

FossilOrigin-Name: 3122b8364082be783821da01d4af2af6a9586327
2014-04-13 19:15:49 +00:00
dan
82a8a9f120 Fix many issues with new code.
FossilOrigin-Name: 62c406a042d7246f6df6b943421182a88483b2e3
2014-04-12 19:34:44 +00:00
dan
4be4c406fa Avoid having the sorter merge too many PMAs at a time when incrementally merging data following a SorterRewind().
FossilOrigin-Name: 98bf0307b121b0776a7170108cc8d3f948a7ebfe
2014-04-11 19:43:07 +00:00
drh
d83cad235a Modify the OR-clause handling so that it can safely deal with OR-clause
with 17 or more terms.  Fix for ticket [10fb063b1179be53ea0b53bb].

FossilOrigin-Name: a67b5312f63909737c052fe58ab5772d45530d49
2014-04-10 02:24:48 +00:00
dan
d30ab3d9dd Experimental multi-threaded sorting changes to allow the sorter to begin returning items to the VDBE before all data is sorted.
FossilOrigin-Name: f9d5e09afaf64d68a0e461c1c2f38179bcea4b1f
2014-04-09 20:04:17 +00:00
drh
bf20a35d5f Fix harmless compiler warnings.
FossilOrigin-Name: e54dded2012f0ab486ee138e9bd57c528af33980
2014-04-04 22:44:59 +00:00
mistachkin
f7da5555da Fix typo in a Windows threading support routine.
FossilOrigin-Name: 5e3dfa27c71a666e122e3cf64897038ff8424800
2014-04-04 21:40:38 +00:00
drh
48e080b26c Performance improvements when reading large blobs, especially if
SQLITE_DIRECT_OVERFLOW_READ is defined.

FossilOrigin-Name: 2312eb6a9eb31051db4e0baf19e033ba39adc7b1
2014-04-04 18:49:19 +00:00
drh
85462ed939 Merge the latest trunk changes into the threads branch.
FossilOrigin-Name: 39ac79cffe716f88af0871bdd206231b6a6511ff
2014-04-04 18:37:36 +00:00
drh
853546d047 Merge changes to the query planner that strive to ensure that any index
usage that is a proper subset of some other index usage always has a slightly
higher cost.

FossilOrigin-Name: 683dd379a293b2f330e1e4cd746f190527fe48ee
2014-04-04 18:20:35 +00:00
drh
1fb6a11072 Ensure the "PRAGMA journal_mode=WAL" works coming from any other journal_mode
with ATTACH-ed databases.

FossilOrigin-Name: e54330b43127e46fc6494748cbb353a6fc91cfd7
2014-04-04 14:12:52 +00:00
dan
8daefc2af0 Add test file sort3.test, which should have been part of commit [9d3351b8d7].
FossilOrigin-Name: dceed2c803fca23c83c02c448d5ae7c4698efee1
2014-04-04 07:52:44 +00:00