Commit Graph

12153 Commits

Author SHA1 Message Date
drh
7e4efaecad More efficient removal of duplicates in recursive queries using the UNION
compound operator.

FossilOrigin-Name: 06c2db875e6cabd81c2a153b2fa4aba03eaed268
2014-02-26 21:35:31 +00:00
drh
3852b68edd In the command-line shell for CSV import, if the lines are \r\n terminated
and the last field is blank, make sure an empty string and not a "\r" string
is imported.

FossilOrigin-Name: 9c2e7612cd137895e13ee872e668ce1216719d85
2014-02-26 13:53:34 +00:00
drh
434a93147c Improved handling of constants and especially constant functions in the
ORDER BY clause of a query.  Do not optimize out "ORDER BY random()".
Fix for ticket [65bdeb9739605cc2296].

FossilOrigin-Name: dca1945aeb3fb005263f9be00ee8e72b966ae303
2014-02-26 02:26:09 +00:00
drh
0baa035a1e Do not allow temporary registers to be in use across an OP_Yield within a
co-routine.  Fix for ticket [8c63ff0eca81a9132d8].

FossilOrigin-Name: 97a8c9733cba97c78e979dfd5c66610c23e90288
2014-02-25 21:55:16 +00:00
dan
1fed5dab0d Attempt to speed up sqlite3VdbeRecordCompare() by various means. This code is in an interim state.
FossilOrigin-Name: 85206e0bbac29adab52bef795f6d1479f2ae2c0e
2014-02-25 21:01:25 +00:00
drh
e8c1eba9a9 Also adjust the order of files in the amalgamation to ensure that
_FILE_OFFSET_BITS is defined before any #include, for QNX.

FossilOrigin-Name: 23001a85cd334090cf6c70d4d7e722a01f4f6899
2014-02-25 18:12:58 +00:00
drh
5e990bea51 QNX requires that _FILE_OFFSET_BITS be set prior to any system #include.
FossilOrigin-Name: 953cdd6adadfd46b51ad61d7939cecca154a02cb
2014-02-25 14:52:01 +00:00
mistachkin
151d05cd39 Fix several small style/consistency issues with the previous check-in.
FossilOrigin-Name: 2477b3a294beb35f806a38f3ebc008942ba01617
2014-02-24 21:42:33 +00:00
mistachkin
edb4ece65e Merge updates from trunk.
FossilOrigin-Name: 854d410ad3a2bb3af5465d933ac9535fe3f22bfe
2014-02-24 21:23:07 +00:00
mistachkin
1925a2e6f8 Enhance testing support for the Win32 VFS dynamic extension loading facilities.
FossilOrigin-Name: 53081e7202fb55f792a78e73627466eb0200f11c
2014-02-24 21:20:25 +00:00
dan
98c91905c9 Close some stray connections in walro.test.
FossilOrigin-Name: d6746cabaa22429644c956a4b5fd91896376de2d
2014-02-24 19:49:36 +00:00
drh
9d41bc105d In memsys5, initialize new allocations to non-zero bytes. Change the content
of freed allocations to prevent use after free.  These changes in SQLITE_DEBUG
only.

FossilOrigin-Name: ba5f0a5599dece6d8f3dfe652800c28875c74a24
2014-02-24 19:07:51 +00:00
drh
15ab9418d9 Remove an unused variable from the VDBE_PROFILE compile-time option. Keep the
opcode count in an u32 instead of an int.

FossilOrigin-Name: 4df0ac9023d9261145a4425a508ba009a10276fc
2014-02-24 14:24:01 +00:00
mistachkin
5b4627e957 Better loadable extension handling in the Win32 VFS when compiled for Cygwin.
FossilOrigin-Name: 6676475c47558a52cb2632e92a541e13d143b2dc
2014-02-21 05:44:18 +00:00
drh
4d87aaed56 Fix the text of a comment used to generate VDBE opcode documentation so that
it omits symbols that can be mistaken for a hyperlink by the parser.

FossilOrigin-Name: b46d4e8923e6e367412bba7aeac07039bbcbabd1
2014-02-20 19:42:00 +00:00
drh
06280ee582 Fix a harmless shadowed-variable warning.
FossilOrigin-Name: 824029090d1c4c4c608f67dd197961eba29c039d
2014-02-20 19:32:38 +00:00
drh
4300c1ae3b Make sure that the difference between two string pointers is passed into
sqlite3_mprintf() as type "int".

FossilOrigin-Name: d5d973fedcf5a2eea219f10e11ba3dacdd0593f0
2014-02-20 19:23:15 +00:00
drh
5655c549aa Add the VdbeCoverageNeverTaken() macro, and comments that better describe how
the VDBE branch coverage measurement works.  Add some tags to provide 100%
VDBE branch coverage.

FossilOrigin-Name: c1e94169dd8eb80b4d18c73be9f81585330d11ad
2014-02-19 19:14:34 +00:00
drh
3d77dee935 Add the SQLITE_NOTNULL P5 code for comparison operations - really a composite
of SQLITE_NULLEQ and SQLITE_JUMPIFNULL.  This flag indicates that NULL operands
are not possible and raises and assert() if NULL operands are seen.
Also omit an unnecessary scan of the sqlite_sequence table when writing
into an AUTOINCREMENT table.

FossilOrigin-Name: d2c047f304848e49864ed8c216b48fd671fa3916
2014-02-19 14:20:49 +00:00
drh
c0bf493ea5 Make sure a multi-row VALUES clause works correctly in a compound SELECT.
FossilOrigin-Name: 85b355cfb40e8dbeb171980204ffad897184063f
2014-02-19 01:31:02 +00:00
drh
49d9ba6354 Tweaks in support of VDBE branch test coverage.
FossilOrigin-Name: b97825646996792d0a67b83f135658027c8569ca
2014-02-19 00:53:46 +00:00
drh
f4345e40a0 Fix VDBE branch accounting on comparison operators.
FossilOrigin-Name: b287520c9226f7a9fab98142f5c207bfe959cd7e
2014-02-18 11:31:59 +00:00
drh
7d1761059b Add VdbeCoverage() and VdbeCoverageIf() macros for improved VDBE coverage
testing.

FossilOrigin-Name: b92d31a97d5fe4606d9ae1393c7f3e052f46bf5a
2014-02-18 03:07:12 +00:00
drh
552fd45441 Improvements to "NOT IN (SELECT ...)" processing. Only test for NULL values
on the RHS on the first iteration, then remember the result.  There has been
logic to do this for year, but it didn't work right and ended up repeating
the NULL test on every iteration.  This inefficiency was found using the
VDBE coverage testing tools.

FossilOrigin-Name: 915f6f1c7aab54583729e60bdc1565f25ecc6f74
2014-02-18 01:07:38 +00:00
drh
bb13813ed1 Merge in performance enhancements for INSERT operations, especially INSERTs
on tables that have no affinity columns or that have many indices or INSERTs
with content coming from a SELECT.  Add the SQLITE_TESTCTRL_VDBE_COVERAGE
test control and the SQLITE_VDBE_COVERAGE compile-time option used for measure
coverage of branches in VDBE programs.

FossilOrigin-Name: a72687699ba2af2e7383be7371d4121750c7e34f
2014-02-17 23:52:13 +00:00
drh
688852ab15 Add logic to do test coverage measurements on the VDBE code.
FossilOrigin-Name: ce184c7bb16988641d37c908d9b3042456d4be3d
2014-02-17 22:40:43 +00:00
drh
8be09304b7 Add a test case for OP_SoftNull.
FossilOrigin-Name: f29d194e03d6bcc78bf883b77e591dbccada02f0
2014-02-17 15:40:19 +00:00
drh
7591051a73 Merge the VDBE_PROFILE fixes from trunk.
FossilOrigin-Name: 2914e4191121004a3f564b1fbf1c235dcc595503
2014-02-17 15:36:39 +00:00
drh
57bf4a8eeb Avoid unnecessary calls to applyAffinity() during INSERT and UPDATE
operations, especially for table that have indices and tables for which
all columns have affinity "NONE".

FossilOrigin-Name: 35b4d6e938164fabaf30b504c54cfd9a69060cee
2014-02-17 14:59:22 +00:00
drh
2926f9694f Fix the VDBE_PROFILE logic. Add a script to process the output file.
FossilOrigin-Name: 7adb3da235c8c162c84f05ef4ccf1cc463805d5f
2014-02-17 01:13:28 +00:00
mistachkin
65acf373c9 Use the modern MinGW major version macro, not the deprecated one.
FossilOrigin-Name: 057c16ee9786efcad6372a29b02d743ff3d628ff
2014-02-16 19:20:00 +00:00
drh
05a86c5c0f Enhance the code generator for INSERT INTO ... SELECT so that the SELECT
generates output directly in the registers that INSERT INTO will be using,
in many cases, and OP_SCopy operations can thus be avoided.

FossilOrigin-Name: aa2d8b0e8154dd2f5e2c837dc11ab362b083495b
2014-02-16 01:55:49 +00:00
drh
cfc6ca4179 Seek past NULLs in a top-constrained search. Avoid checking for NULLs in
the body of the search.

FossilOrigin-Name: e07a32f30862acf3b322d4d8deb015846d6f8f5f
2014-02-14 23:49:13 +00:00
mistachkin
a7b3b63524 Better support for MinGW 4.x.
FossilOrigin-Name: e147230767383ed9f64085b613fd18508f74be21
2014-02-14 23:35:49 +00:00
drh
f78da0e6af Reduce the number of cases where it is necessary to check for NULL after
the loop terminating condition.

FossilOrigin-Name: 3c1ae447dec8fc2af1c5105134061717594ac0e0
2014-02-14 20:59:53 +00:00
drh
4a1d365903 Add OP_IdxGT and OP_IdxLE as distinct opcodes. Formerly these operations where
done using OP_IdxGE and OP_IdxLT with the P5 flag set.  But VDBE code is easier
to read with distinct opcode names.  Also change OP_SeekGe to OP_SeekGE, and
so forth, so that the capitalization is consistent.  The whole point of this
change is to improve the readability of VDBE listings.

FossilOrigin-Name: b6bea903ac8e1717ed50b221d73bd0be061c7663
2014-02-14 15:13:36 +00:00
mistachkin
2953ba9e20 Revise how the Tcl system encoding is handled by the test suite.
FossilOrigin-Name: 9e573198e107f1b85ee37c52a10343d38968bda1
2014-02-14 00:25:03 +00:00
mistachkin
3f40d40ad9 Improvements to the makefile and README for MSVC.
FossilOrigin-Name: b22b61406899c2694dae984995d2484fdb8122f1
2014-02-13 21:57:48 +00:00
dan
dd973548f1 Ensure that if the "psow=0" URI option or FCNTL_POWERSAFE_OVERWRITE file-control is used to clear the power-safe overwrite flag, extra padding frames are added to the WAL file.
FossilOrigin-Name: 48c821fd97a8f03757c90560c37a46bd0843570e
2014-02-13 19:27:08 +00:00
drh
56e3767eb4 Change README to README.md and expand it. Remove unrelated and obsolete files.
FossilOrigin-Name: 18d4e258c45c32984b23d97b896a761eeef2dbdf
2014-02-13 19:10:24 +00:00
dan
e5b6ea797e Avoid passing a flags argument with the internal WAL_SYNC_TRANSACTIONS bit set when calling sqlite3OsSync().
FossilOrigin-Name: e3b79e920c298a39613631d689d1a2f182d00496
2014-02-13 18:46:59 +00:00
drh
962f9669b6 Update the tclconfig files to the latest from http://core.tcl.tk/tclconfig.
FossilOrigin-Name: b81ba7a4bc7e840fce25fc6801957a64f877ff60
2014-02-13 13:42:43 +00:00
drh
fe48599294 Minor simplifications to the "zeroPage()" routine in btree.c.
FossilOrigin-Name: cc8f10bcb206c9def69b06f26decf025b8d9119d
2014-02-12 23:52:16 +00:00
drh
e0670b6220 Remove the "rowid cache" that sought to remember the largest rowid for a
table and thereby speed up OP_NewRowid.  That cache was ineffective.
Removing it results in a performance increase of 0.4%, less memory usage,
and a slightly smaller library size.

FossilOrigin-Name: 56bc5ce8958c8e6250531b4052b905d7ac993db3
2014-02-12 21:31:12 +00:00
drh
784156f84c Make sure "rowid" columns are correctly resolved in joins between normal
tables and WITHOUT ROWID tables.  Fix for ticket [c34d0557f740c45070].

FossilOrigin-Name: 5d01426ddfb2d47c57f93f71378594e637424be0
2014-02-12 14:43:52 +00:00
drh
c5185cd845 Increase the version number to 3.8.4
FossilOrigin-Name: 0a8bcbbd4e11a60923736b2be9b1ce83ea2263fb
2014-02-11 16:24:34 +00:00
drh
39a3088dc4 Updates to the command-line shell. Simplify the banner message. Add the
".save" command as an alias for ".backup".  When starting with no arguments,
include a banner message warning that the database is transient and in-memory
and mention the ".open" command.

FossilOrigin-Name: f5ad1e1bf2828c5da70c1ff944d8212036142e6f
2014-02-11 16:22:18 +00:00
drh
aaa21b41e8 Fixes to the "editline" support in the command-line shell.
FossilOrigin-Name: 7989ce5f105657060a39be295255da8eff9ed56e
2014-02-11 14:37:51 +00:00
drh
7c3280649a Make sure that virtual WHERE-clause terms do not get transformed into real
terms when processing set of OR-connected terms.
Fix for ticket [4c86b126f22ad].

FossilOrigin-Name: c950d6c4117d076f871518e738cdf9e8c46a19fc
2014-02-11 01:50:29 +00:00
drh
a6e3a8c9d5 Fix a pointless conditional. Add a test case.
FossilOrigin-Name: 9367632dd7e4fec9197227e35b0627c2e81ebffc
2014-02-10 21:07:51 +00:00