Commit Graph

11642 Commits

Author SHA1 Message Date
drh
707f1c560a Fix a harmless MSVC compiler warning.
FossilOrigin-Name: 6cc023bb29be51847fbbfab95c24fc89993ccdba
2013-11-19 18:17:20 +00:00
drh
c138dafe88 Minor performance improvement to sqlite3SerialTypeGet().
FossilOrigin-Name: 17e8524fc05aa1e6074c19a8ccccc5ab5883103a
2013-11-19 13:55:34 +00:00
drh
6bc69a2d4b Change Noop-comments in where.c into Module-comments, so that they are
omitting without SQLITE_ENABLE_MODULE_COMMENTS.

FossilOrigin-Name: 3e577f40183c56e60866d8382b044688a1b77eaf
2013-11-19 12:33:23 +00:00
drh
5c82f4df9f Avoid seeking on the main data table during the first loop of an UPDATE
if an index is sufficient to check the WHERE clause.

FossilOrigin-Name: 57158d9daf4d777411fffb1c1d20d89b291d9214
2013-11-19 02:34:11 +00:00
drh
f37139f65b Fix an requirement mark in a test script so that it matches the
typo-corrected requirement.  No changes to code.

FossilOrigin-Name: 072412d5e3f92c9c6548f5c86d396d3f024df3f7
2013-11-19 00:31:25 +00:00
drh
64ff26f741 Add comments identifing where the skip-scan option is decided in the
query planner, to aid in tuning that decision.  No changes to code.

FossilOrigin-Name: e9df04cec48bb8b4ea26ec9024a22ea42b2338eb
2013-11-18 19:32:15 +00:00
drh
2365bac1e2 Fix documentation typos. No changes to code.
FossilOrigin-Name: 7caeb09c52bde4649b02b339f611c8e30f6d1c68
2013-11-18 18:48:50 +00:00
drh
2bea7cde6e Fix harmless compiler warnings from clang scan-build.
FossilOrigin-Name: 8d002740bffca2a76d2dfbc1a67293d34f9de9ba
2013-11-18 11:20:50 +00:00
dan
c4650bb33d Fix a problem with the shell tool EXPLAIN indentation code and VDBE sub-programs.
FossilOrigin-Name: 9c8d6856253f8da06b2cb5dc6bd89b6952fa03ed
2013-11-18 08:41:06 +00:00
drh
e73e067187 Enable the ONEPASS optimization for DELETE, for both rowid and WITHOUT
ROWID tables.

FossilOrigin-Name: 44a07afdd9b3ae2460bc963383295deb0915f899
2013-11-18 03:11:54 +00:00
drh
83d47afe24 Make sure one-pass DELETE for WITHOUT ROWID tables correctly positions the
PRIMARY KEY cursor.  Make the same fix for UPDATE.

FossilOrigin-Name: 6bd5750b7d5da221b0689f6df6be5ed0dce61bec
2013-11-17 02:42:02 +00:00
drh
c51331d16d Fix a couple of minor problems with the new delete logic.
FossilOrigin-Name: a11243f840d35aaed8ee3b9901c3950bc584a417
2013-11-16 23:16:31 +00:00
drh
52a82e6966 Fix an OOM-recovery problem in the DELETE code generator.
FossilOrigin-Name: dc7be158b82ab9156d0fcdf3394f881eac4d23c3
2013-11-16 23:03:06 +00:00
drh
9612947260 Combine the rowid and WITHOUT ROWID paths for DELETE into a single path.
FossilOrigin-Name: c4734b881a64a9d21d03a14e901785797577fbd8
2013-11-16 22:48:52 +00:00
drh
156c7919d9 The one-pass optimization is now working for DELETE on WITHOUT ROWID tables.
FossilOrigin-Name: e4d220a381388f900a95d1b656a82f14c837f92e
2013-11-16 20:45:01 +00:00
drh
6a53499a20 Enhance the DELETE logic so that it can make use of WHERE_ONEPASS_DESIRED
for rowid tables.

FossilOrigin-Name: 8f479a72758ab6fedb171ada612b1963143c32fa
2013-11-16 20:13:39 +00:00
drh
aedfc5078a Fully constraint the ORDER BY on the top-10 line of the --summary output
from the wordcount test program.  Add the run-wordcount.bash script for
running wordcount in various configurations.

FossilOrigin-Name: 7edf39eb93a8f9059a788f5fccf41c2be40afd4d
2013-11-16 15:35:18 +00:00
drh
64bbbf3383 Avoid unnecessary OP_IfNull checks when doing a range query where there
is a constraint on the lower bound of the range.

FossilOrigin-Name: de08a7e7abbad9b94d0268d096ef4555d31c8b0c
2013-11-16 14:03:53 +00:00
drh
e6d058cd97 Simplification and performance improvement to the logic that factors
constant expressions ouf of inner loops.

FossilOrigin-Name: ee9353fdf3c8f19cd3c344ea8fb7c6d13cadd632
2013-11-16 13:55:34 +00:00
drh
143867516b Fix testcase misc7-16 so that it works with the new UNIQUE constraint error
message format.

FossilOrigin-Name: c7f2ed9f44be3b66a542ee42c0db63bab8ffd2db
2013-11-16 12:56:46 +00:00
drh
85f8aa7907 Add ALWAYS and NEVER macros to currently unreachable but important branches in
sqlite3ExprCompare().

FossilOrigin-Name: cee835fe902e46f283257fb8ec9d9744c7d6dd77
2013-11-15 20:06:26 +00:00
drh
8e2ea000b5 Merge the operator comment fixes from trunk.
FossilOrigin-Name: 9f14f55c8ab77e73dbffb7a9c99422bef14cc17a
2013-11-15 19:00:20 +00:00
drh
40864a1401 Fix comments on the OP_Divide and OP_Remainder operators, especially the
"Synopsis:" comment, so that they agree with the actual implementation.

FossilOrigin-Name: cc17f1f05f15e9c62659a49c0656ff2b667bf701
2013-11-15 18:58:37 +00:00
drh
c2acc4e466 Changes to make the new constant expression factoring logic more general
and more testable.

FossilOrigin-Name: d10fb49a92f5f6e93093ae83544e5aec7984361a
2013-11-15 18:15:19 +00:00
drh
a0d6e3a501 Add test cases for INSERT INTO ... DEFAULT VALUES on tables with numeric
constants in CHECK constraints.

FossilOrigin-Name: 79ec485b548fcfc508c4d5fa32ed0604e1b0c5d9
2013-11-15 16:48:23 +00:00
drh
10d1edf0b6 Improvements to the Expr comparison routine to make it more general.
Improvements to unary-minus code generation so that it can make use of
a global constant register with a zero value.

FossilOrigin-Name: 835be656bb0e83c8108104869166aa9dd850d265
2013-11-15 15:52:39 +00:00
drh
776f3a2fa9 Add the --query option to the wordcount test program.
FossilOrigin-Name: 5960d11eba4fc6ca136331279689424d03bd6e76
2013-11-15 13:12:30 +00:00
drh
33cad2fb46 Simplify the range scan code generate while also avoiding an unnecessary
OP_Affinity opcode.

FossilOrigin-Name: 372686bfbb1da08b04bddb085e30da5dbc8b30d8
2013-11-15 12:41:01 +00:00
drh
7c89bed621 Merge EXPLAIN fixes from trunk.
FossilOrigin-Name: cd579727b107a07140b94f5839d193959d29e6db
2013-11-15 03:30:07 +00:00
drh
72dbffd726 Fix a typo in the "synopsis" for the OP_Lt opcode that causes an
incorrect comment to be added to EXPLAIN output.

FossilOrigin-Name: d99a30a25d6102c389f1fb5ec389c137168615e9
2013-11-15 03:21:43 +00:00
drh
602320e326 Another adjustment to the EXPLAIN indentation logic, in order to deal with
the sorter loop on a CREATE INDEX statement.

FossilOrigin-Name: cbe85cc2a991d89a6cca391ffa1be0582a684e49
2013-11-15 03:16:34 +00:00
drh
f30a969b80 Rework the logic that factors constant expressions out of inner loops, making
it both simpler and faster.

FossilOrigin-Name: 8dc5c76c766828d7c28090bec30ff48227e7b140
2013-11-15 01:10:18 +00:00
drh
01752bc805 Adjust the command-line shell EXPLAIN indentation logic to handle the
second loop of an UPDATE that reads out a RowSet.

FossilOrigin-Name: ea141a9b87dbb5fa1402bf7f6e36e89cc9de3cb3
2013-11-14 23:59:33 +00:00
drh
052e6a8a07 Remove an unused local variable.
FossilOrigin-Name: 10d59226382adcb8016fc2d927e5a0c0b36f3980
2013-11-14 19:34:10 +00:00
drh
400fcbad71 Simplification to the progress callback check. On branch removed.
FossilOrigin-Name: 24ef16548eebcdb9d8b40308f6a16dabf8f8d474
2013-11-14 00:09:48 +00:00
drh
e6400b9901 Make sure the progress callback is invoked prior to an SQLITE_ROW return if
it is overdue to be called.

FossilOrigin-Name: 21f59b04f74738d08ebad693646bbaea24dc45ef
2013-11-13 23:48:46 +00:00
drh
1f57794c92 Merge the skip-scan enhancement into trunk.
FossilOrigin-Name: b0bb975c0986fe01f1184c1d4888fe397174ad0f
2013-11-13 20:46:11 +00:00
drh
d24474475e Import the "PRAGMA vdbe_eqp" enhancement and the enhanced EXPLAIN formatting
the shell from trunk.  Fix a bug in skip-scan and add a test case to prevent
a regression.

FossilOrigin-Name: f668616a29686f3ce532731c534b168e536adbb5
2013-11-13 19:01:41 +00:00
dan
a98bf365fe In the shell tool, if an "EXPLAIN" command is executed in ".explain on" mode, attempt to automatically indent the bodies of loops in the output VDBE program.
FossilOrigin-Name: e7d34ec6814ed4606a6d5d7f68c218ae4d25e666
2013-11-13 18:35:01 +00:00
drh
84e55a80db Add the "PRAGMA vdbe_eqp" command, only available with SQLITE_DEBUG. Simplify
some of the other debugging logic.

FossilOrigin-Name: 8ce33f4c818e1c785a1c176f6f631b8184e1166b
2013-11-13 17:58:23 +00:00
drh
e084f40b37 Add VDBE comments to the beginning and end of skip-scan loops.
FossilOrigin-Name: 0c85d93b52311dee7980d977be6ed0dc70b060c1
2013-11-13 17:24:38 +00:00
drh
2e5ef4ed77 Improve the way that skip-scan loops are constructued. Add test cases.
Improved the scoring of skip-scan loops.

FossilOrigin-Name: 5e75ab93881b85801cb4ebf70f2063ff7c51ac19
2013-11-13 16:58:54 +00:00
drh
c2b23e7a98 Add test cases for skip-scan. Enhance "do_test" so that if the expected result
is of the form "/*..*/" or "~/*..*/" it treats the expected result as a glob
pattern rather than as a regular expression.  Fix a bug in ANALYZE result
loading associated with WITHOUT ROWID tables.

FossilOrigin-Name: d3e6e9b2a74074c05429d3c341c23525504351ab
2013-11-13 15:32:15 +00:00
drh
cd8629e4bb Add the ability to use an index even if the left-most columns of the index
are unconstrainted, provided that the left-most columns have few distinct
values.

FossilOrigin-Name: 27dd5993d1ae5625eb94bf406421eb390d001be9
2013-11-13 12:27:25 +00:00
drh
c181c26cba Avoid an unnecessary OP_IfNull while doing an indexed search.
FossilOrigin-Name: 5196000930600d0cd931b87e864507791b9dab08
2013-11-13 08:55:02 +00:00
mistachkin
015a304f75 Adjust the SQLITE_MALLOCSIZE defines, primarily to make sure _msize gets used with MSVC when appropriate.
FossilOrigin-Name: 4e7e805e1139b2dc05d85e86e5c8254e5d361bf2
2013-11-12 21:37:04 +00:00
mistachkin
3aa4be39a9 Fix harmless compiler warning.
FossilOrigin-Name: ddacd10105c6df2d3a9d707947e72c62e88212eb
2013-11-12 21:10:02 +00:00
drh
5e6790cb15 Minor enhancements to the auxiliary information added to EXPLAIN output with
SQLITE_EXPLAIN_ENABLE_COMMENTS.

FossilOrigin-Name: 0d1328e33ca761eddcf8a50e8e83c997861e9047
2013-11-12 20:18:14 +00:00
drh
e54df42d87 Break out the structure and macro definitions of where.c into a separate
header file whereInt.h for easier editing and debugging.

FossilOrigin-Name: c44467124623733aac64096d605f16139b733a7f
2013-11-12 18:37:25 +00:00
dan
85963f5474 When possible, have FTS use 32-bit operations to read varints from the database.
FossilOrigin-Name: aa7ba302ed13aedde89b5bcbe9119799c0da8a42
2013-11-12 17:46:44 +00:00