Commit Graph

11380 Commits

Author SHA1 Message Date
drh
2f53b90665 Merge the STAT4 capability into trunk.
FossilOrigin-Name: a32af0abe5fa6d570604fa3534e8230d5b6042fc
2013-08-26 23:18:06 +00:00
mistachkin
31706a2d94 Change MAX_PATH related defines to use character lengths where WCHARs are used.
FossilOrigin-Name: 0a497083e915520c0807cb6611264b1a35ff62b7
2013-08-26 20:45:50 +00:00
mistachkin
09b404419a Merge updates from trunk.
FossilOrigin-Name: 9d6860098f96efc7ea60e2d6116fb7d0e2685a55
2013-08-26 19:36:18 +00:00
dan
4dd5144366 Fix for builds with both SQLITE_OMIT_WAL and SQLITE_MAX_MMAP_SIZE=0 defined.
FossilOrigin-Name: edd5dbdc3239fc88799b822941603fcc828ecbb6
2013-08-26 14:30:25 +00:00
drh
f68060839c Version 3.8.0
FossilOrigin-Name: f64cd21e2e23ed7cff48f7dafa5e76adde9321c2
2013-08-26 04:50:08 +00:00
mistachkin
e49d98fb0a Several modifications to the use of the MAX_PATH macro on Windows to improve consistency.
FossilOrigin-Name: bda4c47df8e80b4cc9e8aac8fd74482869f96107
2013-08-24 23:55:01 +00:00
mistachkin
b5ca3cbcd3 Fix a couple compilation issues on Unix.
FossilOrigin-Name: 25b029d8f32440a94ef8af45153423f6702d7431
2013-08-24 01:12:03 +00:00
mistachkin
e98844f723 Unify the result of PRAGMA mmap_size when mmap support is disabled.
FossilOrigin-Name: 032c31593d6f569842830cac6222362be68b2084
2013-08-24 00:59:24 +00:00
drh
feb56e0e17 Adjust #ifdefs to get SQLITE_OMIT_AUTOMATIC_INDEX and SQLITE_OMIT_PAGER_PRAGMAS
to build.

FossilOrigin-Name: ed310201628cf79c0f57674ae7478ee6738b1c6e
2013-08-23 17:33:46 +00:00
drh
1efd81f7cf Fix a requirements comment in a test case. No changes to the testcase
itself nor to any code.

FossilOrigin-Name: 3ad1f998e5db044849b528c31c4a7e1f3d527320
2013-08-23 16:47:40 +00:00
dan
7dd8d0a87b Modify script mkautoconfamal.sh to use the download.html naming convention for the tar.gz it creates.
FossilOrigin-Name: 375b4e3db0e0c9e83034d1c33d7c57aca48e87b6
2013-08-23 12:04:52 +00:00
drh
cc04afdad0 Defer the creation of automatic indices until the index is actually used.
FossilOrigin-Name: 0775501acf152dcbf4dd039f4511f3d8c4330d85
2013-08-22 02:56:28 +00:00
drh
b00fc3b14e Simplify the btreeGetPage() routine so that it uses a single flag parameter
in place of two boolean parameters.

FossilOrigin-Name: 617e23ec283d3147fc3fd29c474ccedf4915cdc7
2013-08-21 23:42:32 +00:00
drh
9d1ab0794e Minor performance tweaks to the pager.
FossilOrigin-Name: 9ae1f9ce7ea6beaeddc3711080b3796e05acc4f8
2013-08-21 22:54:55 +00:00
drh
cf5ff12105 Refactor the sqlite3_randomness() implementation for improved performance.
FossilOrigin-Name: 4144dffb57b5ed791d7a6d2f26fab5e7dc77fbd1
2013-08-21 22:09:25 +00:00
drh
b49bc86a1a Simplification to the StrAccum object and the sqlite3StrAccumAppend()
method that also results in slightly better performance.

FossilOrigin-Name: 700dbbea8647e0fdaee6d0aba3d3dd8ebfbac04a
2013-08-21 21:12:10 +00:00
dan
c63e880bdb Minor fixes for test cases. No code changes.
FossilOrigin-Name: ef2a6a37366f91889dc2f1ba9cb6d1257d9b05db
2013-08-21 20:04:54 +00:00
mistachkin
47b2995983 Fix typo in test.
FossilOrigin-Name: f9859fe93bcecb4be7c1034291018523124c4a5c
2013-08-21 19:59:14 +00:00
drh
e7ecdfabd2 Update sqlite3MemCompare() to try common cases first, for a modest speed
improvement.

FossilOrigin-Name: b25bac79191975149d88fe34618c74354de62c5e
2013-08-21 19:13:53 +00:00
dan
016f7811f2 If a virtual table xSync() returns an error message, copy it into a buffer allocated by sqlite3DbMalloc() before transfering it to Vdbe.zErrMsg.
FossilOrigin-Name: 854ba3049005adf033e07e6740a36e63f2a56758
2013-08-21 17:35:48 +00:00
drh
13c77bf86b Performance enhancement in btreeParseCellPtr().
FossilOrigin-Name: a17190a2296e8cd5e59524ff5914fc5ea3560697
2013-08-21 15:52:22 +00:00
dan
2505a5fee2 Fix an FTS4 problem introduced by [361084e1eb].
FossilOrigin-Name: 5f35c8cb8f8b67121c70f98c02c4aa7c25327690
2013-08-21 15:45:27 +00:00
dan
36e78309de Candidate fix for [d666d600a6].
FossilOrigin-Name: 781592f32c8e1dcd59954c17211cf61349d1c0b1
2013-08-21 12:04:32 +00:00
dan
22c745a9c9 Fix a minor problem in progress.test. No code changes.
FossilOrigin-Name: a95ae93b32a9ad2ae017124ed0881802c3c741c0
2013-08-21 07:25:03 +00:00
dan
c3c16cbd61 Fix a couple of test scripts to work with DEFAULT_AUTOVACUUM and OMIT_VIRTUALTABLE.
FossilOrigin-Name: 356c6c59311eaf7d5633476f635e94a12b8b3924
2013-08-20 20:25:03 +00:00
dan
e934e633a5 Fix an invalid assert() in where.c. Also a crash that can occur in the EXPLAIN QUERY PLAN code under obscure circumstances.
FossilOrigin-Name: ef192abb82c2fc31135f875d7a19908d67c076b0
2013-08-20 17:14:57 +00:00
drh
d0aa2f3afd Ignore IS NOT NULL and NOT NULL constraints on NOT NULL columns.
FossilOrigin-Name: e476408e3c5ba5f3ba5e98ff264167c163d72e3f
2013-08-20 17:00:55 +00:00
dan
4044906210 Test script changes to support testing sqlite3_interrupt().
FossilOrigin-Name: 0cede9f898bcd13dab51b25cb0e72213d988d3d2
2013-08-20 16:08:39 +00:00
drh
9b47ee3f09 Performance optimizations in the VDBE and especially to the OP_Next and
related opcodes and in the sqlite3BtreeNext() and sqlite3BtreePrevious()
routines.  This is a cherrypick of [6f99b54aedeb], [d2efea1682a7], and
[d78c5d89de4b].

FossilOrigin-Name: 7f72fc4f47445a2c01910b268335873de9f75059
2013-08-20 03:13:51 +00:00
drh
f66f26a311 Performance improvement in sqlite3BtreeNext() and sqlite3BtreePrevious()
for the common case of a valid cursor.

FossilOrigin-Name: dc65ad8c4c67b21e3b042b8df6580d02b634a90b
2013-08-19 20:04:10 +00:00
dan
2c18788ffa Initialize a variable in fts3_write.c on the grounds that the argument required to show that it does not require initialization with is complicated. Add an assert() to where.c to silence a clang scan-build warning.
FossilOrigin-Name: d6c4d48a002a6d7057fccc30064ce0b049678f0c
2013-08-19 19:29:50 +00:00
dan
e704713cb8 Fix test script pragma2.test so that it works with ENABLE_MEMORY_MANAGEMENT.
FossilOrigin-Name: 6acf728100ff339e4451bcefd3a20fd5c3cfd662
2013-08-19 18:37:18 +00:00
dan
290703091e Add some extra assert() statements to silence a few clang warnings.
FossilOrigin-Name: 1c63e9515b5f5cb9169928b108d002dcd18ad4fd
2013-08-19 18:17:03 +00:00
drh
4ccc419b3c Remove unused variables from the command-line shell sources.
FossilOrigin-Name: 753a402e90f3c9f675155ea96ee048dbe7a68700
2013-08-19 14:23:31 +00:00
drh
9e48788e9d Fix a potential reference off the end of an array in the query planner.
FossilOrigin-Name: f15591f80212dd6d4ed8e0f14be691cd578d4cdf
2013-08-19 14:19:00 +00:00
drh
77dfd5bb44 Fixes for harmless compiler warnings.
FossilOrigin-Name: a0d9ca4f07f1dc3a189864f8ed9cdb0b1d791b1a
2013-08-19 11:15:48 +00:00
drh
92707acfd0 Adjustments to #ifdefs in analyze.c to all a clean compile with no
extra code with both ENABLE_STAT3 and ENABLE_STAT4 and with neither.

FossilOrigin-Name: f86b75b6c7290ee6ddb3636090b00e99fc68c45e
2013-08-17 18:57:15 +00:00
drh
45e3215db0 Add the cache_spill pragma. Change the fullfsync and checkpoint_fullfsync
pragmas to apply to all attached databases.

FossilOrigin-Name: 65a85a156f3c827890e9f1fd22484a2f875c3b6f
2013-08-17 16:37:04 +00:00
drh
d3605a4f20 The fullfsync, checkpoint_fullfsync, and cache_spill pragmas apply to all
files of a database connection, including those opened by future ATTACH
statements.

FossilOrigin-Name: d07c4331a28d44deca1ece8a34118f5b121b3ee2
2013-08-17 15:42:29 +00:00
drh
d4b5c60eca Test cases for the cache_spill pragma.
FossilOrigin-Name: b85c9ec5e02c1b92faa8eeb9e56e02a576a43a96
2013-08-17 00:25:07 +00:00
drh
40c3941cfa Add the cache_spill pragma.
FossilOrigin-Name: cdb181c04fa99c6c29f23eb68ccb5475e7f6bf9c
2013-08-16 20:42:20 +00:00
dan
0e8194a9c7 Add a test for the problem fixed by [91733bc485].
FossilOrigin-Name: 5c591104813a7e55e59f4f557cbb3e500fa817c2
2013-08-16 17:46:49 +00:00
drh
202ca9075f In sqlite3Stat4ProbeSetValue() change a local variable name iVar to iBindVar
to avoid confusion with iVal, and fix a place where the name was actually
confused.

FossilOrigin-Name: 91733bc4856034c10bc2ba0acdae1970b05d62b9
2013-08-16 17:18:02 +00:00
drh
cf9f83dca2 Merge the fork that resulted from a check-in race.
FossilOrigin-Name: b7fe4f362bdf7b233a7b09eb9ce16d296165f82a
2013-08-16 14:51:32 +00:00
drh
0e1f0029c0 Fix valueFromExpr() so that it returns SQLITE_NOMEM following an OOM when
changing text encodings.  Also fix some asserts to accommodate OOM errors.

FossilOrigin-Name: dc1ccd09c443cebc4731dbe1a0dea84a9ccf6a9b
2013-08-16 14:49:00 +00:00
dan
22d73b1cbe Fixes for test code that was not working with utf16 databases. Run the analyze*.test scripts as part of the 'utf16' permutation test.
FossilOrigin-Name: fe99494d99df95f699ffab07b1e212800b5ff00d
2013-08-16 14:48:23 +00:00
dan
585c823256 Add extra tests. No code changes.
FossilOrigin-Name: 949127d53e0a907ed6f73c6828637d94b265468c
2013-08-16 14:23:02 +00:00
dan
c367d4c052 Avoid buffer overreads and false OOM error reports that could be caused by corrupted sample records in the sqlite_stat4 table.
FossilOrigin-Name: 9f85b6a52a0b9b1524daa6f24d85257e7f591e95
2013-08-16 14:09:43 +00:00
drh
61b3440603 Fix a potential segfault following an OOM while running ANALYZE.
FossilOrigin-Name: 0118797823c9093e68113578f3f3aae65de41453
2013-08-16 13:34:50 +00:00
drh
d94f512f58 Merge recent trunk changes into the STAT4 branch.
FossilOrigin-Name: c69b512af276a438399747af22659415af3a5d4d
2013-08-16 12:26:33 +00:00
drh
0af16ab2c2 Make sure that GROUP BY terms select input column names in preference to
output column names, in compliance with the SQL standard.
Ticket [1c69be2dafc28].

FossilOrigin-Name: f2d175f975cd0be63425424ec322a98fb650019e
2013-08-15 22:40:21 +00:00
drh
e35463b312 Bare identifiers in ORDER BY clauses bind more tightly to output column name,
but identifiers in expressions bind more tightly to input column names.
This is a compromise between SQL92 and SQL99 behavior and is what
PostgreSQL and MS-SQL do.  Ticket [f617ea3125e9c].

FossilOrigin-Name: c78b357c00a35ed48ce2ffbc041de8d22570d1e2
2013-08-15 20:24:27 +00:00
mistachkin
fc7df53aee Make it easy to attach a debugger the test fixture process prior to any tests being run.
FossilOrigin-Name: 53cd9ebfaf401c7932bf591e134a527c9962b88e
2013-08-15 20:05:03 +00:00
dan
0adbed8a60 Fix a crash that can occur if the sqlite_stat3 or sqlite_stat4 table is corrupt.
FossilOrigin-Name: d51df8a8fcc31c37f6e1c9612204af5738ed865e
2013-08-15 19:56:32 +00:00
dan
af2583c83c Fix a crash that can occur following an OOM fault.
FossilOrigin-Name: 9f80b2687012ab7c4d6d654fe19f40878bd78bd8
2013-08-15 18:43:21 +00:00
dan
3bc9f74fe9 Change some assert() statements in vdbe.c to ensure that a memory cell used to store a VdbeCursor object is not also used for some other purpose.
FossilOrigin-Name: 71070c9fce86103f174220e07771df99b2e01405
2013-08-15 16:18:39 +00:00
drh
f0459fc410 Make sure the ANALYZE command allocates enough VDBE registers.
FossilOrigin-Name: 46fec9b1a1c4616df5a634dbf9235bd13408d3a9
2013-08-15 16:15:00 +00:00
dan
1f616ad8fa Add tests for sqlite_stat4 sample selection. And a fix for the same.
FossilOrigin-Name: 1fb4d9d6f2675515feb8e3d971bbd54716372549
2013-08-15 14:39:09 +00:00
drh
26080d9241 Clarification and typo fixes in comments related to name resolution.
No changes to code.

FossilOrigin-Name: f30abdf9d814d6c75bf1c803054737c737ad636f
2013-08-15 14:27:42 +00:00
mistachkin
1f28e0703f Make it easy to attach a debugger the test fixture process prior to any tests being run.
FossilOrigin-Name: c23acba11bfefc019b5945cfb345f9afcf4b6242
2013-08-15 08:06:15 +00:00
dan
f00e902580 Change the way ANALYZE works to use a single cursor when scanning indices.
FossilOrigin-Name: bdce612b35193abf72de1a563ea7962375b3574e
2013-08-14 19:54:12 +00:00
mistachkin
3dfaf6766c Fix a few more minor comment typos. No changes to code.
FossilOrigin-Name: 9e999081a59b161a0a1f968fbc01a1db9ea43b93
2013-08-14 00:20:23 +00:00
mistachkin
037933b8a7 Fix an outdated comment and a comment typo. No changes to code.
FossilOrigin-Name: ac336959490083ffeaaf25aaec97ecb59a2f4536
2013-08-13 22:33:41 +00:00
dan
8ad169abb4 If ENABLE_STAT3 is defined but ENABLE_STAT4 is not, have ANALYZE create and populate the sqlite_stat3 table instead of sqlite_stat4.
FossilOrigin-Name: cca8bf4372ab7a0258aa5c9397818415c6cf0abf
2013-08-12 20:14:04 +00:00
dan
86f69d98d2 If there is data in both the sqlite_stat4 and sqlite_stat3 tables for a single index, ignore the sqlite_stat3 records.
FossilOrigin-Name: 2a41736728d83a777ea8112da927cb047ec6684e
2013-08-12 17:31:32 +00:00
drh
6b0ae91930 Handle a NULL input to decodeIntArray() that can result from a prior OOM.
FossilOrigin-Name: fa1588adab6759fd3d1be02524aa19a0d1c6adaa
2013-08-12 17:00:08 +00:00
dan
0106e378f1 Re-enable reading from the sqlite_stat3 table (as well as sqlite_stat4).
FossilOrigin-Name: 6d45078e621526fc2bac0eaefbb0f9602b9a8ec5
2013-08-12 16:34:32 +00:00
dan
5133c78cae Fix a bug in calculating the average number of entries for keys not present in the sqlite_stat4 table.
FossilOrigin-Name: ec3ffb174844406a6186c3dcc41b76d0331b502c
2013-08-12 11:21:10 +00:00
dan
568cd51b79 Fix minor problems caused by adding the rowid to the records in stat4.
FossilOrigin-Name: 088d1ff94890ada50d43e6a366a58167ec5a8e96
2013-08-12 09:29:04 +00:00
dan
dd6e1f193e Add the rowid field to the end of sample records stored in the sqlite_stat4 table.
FossilOrigin-Name: 3a5e8ab7ddbe1d943b35ef329fe4e5a1bfdb0d9d
2013-08-10 19:08:30 +00:00
dan
84d4fcc52d Fix a couple of typos in a comment in analyze.c. No code changes.
FossilOrigin-Name: 5bcccb93df98f5dfee0ea4d797b07fe0257258a9
2013-08-09 19:04:07 +00:00
drh
c8af850479 Update the header comment on analyze.c to describe the sqlite_stat4 table
format.

FossilOrigin-Name: 4d97809d6b29809f12d753043bda1976bdb1bd3b
2013-08-09 14:07:55 +00:00
dan
b3c02e210f Fix problems in estimating the number of rows visited by a range query using sqlite_stat4 data when the column subject to the range query is not the leftmost of the index.
FossilOrigin-Name: 9228aaf54dd2700c4f460f94f9c2309407578983
2013-08-08 19:38:40 +00:00
dan
84c309b6ae Use a binary search instead of a linear scan when comparing a sample key against data from the sqlite_stat4 table.
FossilOrigin-Name: e50dc30523210ba12324d5d8379503610f13aa34
2013-08-08 16:17:12 +00:00
drh
ab80be99e3 If the SQLITE_EXTRA_INIT function is defined, make sure it is called only
once by the effective sqlite3_initialize() call.

FossilOrigin-Name: e2b597cafe7c8a8313b051d6a302fed54f235727
2013-08-08 14:38:45 +00:00
dan
ad45ed7414 Fix a segfault in "ALTER TABLE t1 ADD COLUMN b DEFAULT (-+1)". Also an assert() failure that could occur if SQLITE_ENABLE_STAT4 were not defined.
FossilOrigin-Name: 9fec3e38287067d60874530300fbeb602958c951
2013-08-08 12:21:32 +00:00
dan
6cb8d76ccb Fix a bug in using stat4 data to estimate the number of rows selected by a range constraint.
FossilOrigin-Name: f783938ea999731ea073cd2c78e278095f7bea6d
2013-08-08 11:48:57 +00:00
drh
869c0409e3 If the SQLITE_ALLOW_URI_AUTHORITY compile-time option is set, then allow
non-localhost authorities on URI filenames and pass them through as a UNC
to the underlying VFS.

FossilOrigin-Name: 3adb6c1bfda897859dc9cf9ae7f1e6719855ee68
2013-08-07 23:15:52 +00:00
dan
eea568d68e Replace variable Index.avgEq (average number of rows in keys for which there is no sample in sqlite_stat4) with vector Index.aAvgEq.
FossilOrigin-Name: 7b70b419c43b2c3b2daf11d833a1d60245bfaef5
2013-08-07 19:46:15 +00:00
dan
3d40759803 Merge latest trunk changes with this branch.
FossilOrigin-Name: 08f74c45ecf711a2373af578d44470add9082377
2013-08-07 18:42:27 +00:00
dan
32c693a6e6 Fix typos in a comment in analyze.c. No code changes.
FossilOrigin-Name: 812ed0c58fc5f729a2d4f16775fad6724cc367a6
2013-08-07 16:38:33 +00:00
dan
1f28eaddc4 Change the way samples for the sqlite_stat4 table are collected.
FossilOrigin-Name: 13ed5ac13562e7a39905d70fd47059f4d8001bba
2013-08-07 16:15:32 +00:00
drh
7ed103210d Fix the ".dump" command on the command-line shell so that it works for
"sqlite_stat4" in addition to "sqlite_stat1".

FossilOrigin-Name: 1e80c4b12dbb5beab422e2a33a8782ac9d767321
2013-08-07 16:04:27 +00:00
drh
4bfd4ad9a7 Remove the unused sqlite3Utf8to16() utility function.
FossilOrigin-Name: 9159b43eb2cb5d6ed18a5ad168fa27134fec2553
2013-08-07 15:57:24 +00:00
dan
87cd93215e When estimating the number of rows scanned using data from the sqlite_stat4 table, avoid allocating UnpackedRecord and KeyInfo structures until they are definitely required.
FossilOrigin-Name: 353950a5269fa439cc3e57b62e16558a84ea2557
2013-08-07 15:52:41 +00:00
drh
3b449ee481 Add a guard #ifndef to test_intarray.h to prevent harm if it is #included
more than once.  Add a comment on the closing #endif of the guards on
sqlite3.h and test_multiplex.h.

FossilOrigin-Name: 0ad83ceb79767738bd06a28840cf84da0464ab4f
2013-08-07 14:18:45 +00:00
drh
4a6fc3596b Fix typos and add clarification to comments in where.c. No code changes.
FossilOrigin-Name: f8d8790ede0fcaf6c5b60ac22919c1d97c74e838
2013-08-07 01:18:38 +00:00
dan
ddc2d6e8f5 Fixes for builds without SQLITE_ENABLE_STAT4.
FossilOrigin-Name: 84999e27cc0d14b89d9fe024e29d287c69285369
2013-08-06 20:15:06 +00:00
dan
7a4192358a When possible, use the multi-column samples in sqlite_stat4 to estimate the number of index rows scanned by a query plan.
FossilOrigin-Name: 2973f5ca736c4a6f13c653d54b6a29d7cae8d0ed
2013-08-06 20:01:43 +00:00
drh
9fe809c561 Fix a test case related to partial indices so that it works even if
STAT3 is disabled.

FossilOrigin-Name: 153c645025637bbff14dfce793e4b92210ded7e8
2013-08-06 19:18:17 +00:00
drh
d3f4964168 Adjust #ifdefs in test_autoext.c so that it compiles with
SQLITE_OMIT_LOAD_EXTENSION.  Fix compiler warnings in two other
test modules.  No changes to the core.

FossilOrigin-Name: 89930ea3c3b3bd078f641b2c5203d851083bbf1a
2013-08-06 18:35:31 +00:00
drh
d9b8c0d761 Update the configure script to use the latest version number (3.8.0).
FossilOrigin-Name: 52e8ec5e24730efa6d89cbaf1e03bc1d5c59cc05
2013-08-06 18:21:21 +00:00
drh
812ea83343 Add a testcase() macro to verify OOM coverage.
FossilOrigin-Name: d43dcbc488120aeb7104ab9e6a27f62bb348bf6a
2013-08-06 17:24:23 +00:00
drh
3535ec3e10 Remove unreachable branches in expr.c, replacing them with assert() and
testcase() statements.

FossilOrigin-Name: 9103c27ceb3f4023ea3a41b679a10717d3f80210
2013-08-06 16:56:44 +00:00
drh
2d463113f0 For the ".import" command of the command-line shell, start a transaction
if there is not one active already.

FossilOrigin-Name: 5dcc2d91bd343cd0fac79d3c8f079a5ce534cdf7
2013-08-06 14:36:36 +00:00
drh
9f099fd45a Clean up the input reader in the command-line shell for improved legibility
and performance.

FossilOrigin-Name: 2b1743d60171635c1e5a6ede6b4928f4671f948d
2013-08-06 14:01:46 +00:00
drh
8c8a8c4573 More than double the speed of the resolveP2Values() routine in vdbeaux.c by
moving from an extended if-else on every opcode to a switch.  Opcodes are
reordered in mkopcodesh.awk to put the switched opcodes close together,
for additional performance and to reduce code footprint.

FossilOrigin-Name: 924f7e4d7a8fa2fe9100836663f3733b6e1a9084
2013-08-06 07:45:08 +00:00
drh
d58d3278cb Performance optimization: Avoid calling convertCompoundSelecctToSubquery()
on queries that do not use the UNION, EXCEPT, or INTERSECT operators.

FossilOrigin-Name: c589b2fed7beabc2337d701094c22635914d9c23
2013-08-05 22:05:02 +00:00
mistachkin
f3d2aaeca2 For the vtshim module, always zero out the xChildDestroy function pointer after calling it.
FossilOrigin-Name: 240f7252c66ad3ff5ae0ef06455c1ff9bd78bbb4
2013-08-05 21:54:17 +00:00
drh
323df7907e Factor all KeyInfo object allocations into a single function:
sqlite3KeyInfoAlloc().  Always allocate enough space so that 
sqlite3VdbeRecordCompare() can avoid checking boundaries and hence
run faster.

FossilOrigin-Name: 7301bedd94c8610568349953b18ff3575203e1b2
2013-08-05 19:11:29 +00:00
dan
c612970c9d Modify the vdbe code generated by ANALYZE to use fewer memory cells and cursor slots.
FossilOrigin-Name: 4a51cf289fad8aebc637b5f96488de18e861195d
2013-08-05 19:04:07 +00:00
dan
e043201d3d Use N separate cursors when scanning an index with N columns to collect sqlite_stat4 data. This fixes a problem with collecting incorrect nEq values from multi-column indexes.
FossilOrigin-Name: 3a71afe67418ce00097cd9714c395fe9ff16f23b
2013-08-05 18:00:56 +00:00
drh
af5b2af77d Improve performance of sqlite3VdbeRecordCompare() by using an approximation
that might give false negatives and only running the more expensive exact 
subexpression if the approximation fails.

FossilOrigin-Name: 28979dcd16f53e0ddca8eed74b668834e2856f03
2013-08-05 15:32:09 +00:00
drh
407ceeb84d Add a missing '#include "tcl.h"' to test_rtree.c.
FossilOrigin-Name: 4b8b426f10f8ae13bf553f7adf5ae09383fa0bd4
2013-08-05 12:31:41 +00:00
dan
c55521a60b Fix a couple of problems in code related to sqlite_stat4.
FossilOrigin-Name: badd24d987240db5528b37d1c177431617079f9b
2013-08-05 05:34:30 +00:00
dan
f52bb8d385 Begin adding experimental sqlite_stat4 table. This commit is buggy.
FossilOrigin-Name: 2beea303a1d609cd2ff252412c50b966b9e5e8f1
2013-08-03 20:24:58 +00:00
drh
3975974780 Updates to requirements marks. No code changes.
FossilOrigin-Name: 213020769f310aec1591d97756b53891d0b64005
2013-08-02 23:40:45 +00:00
drh
e0c7efd9ae Add NEVER() and ALWAYS() macros on some unreachable yet prudent branches.
FossilOrigin-Name: c5c0a8ab6c222185d5f9d4321e64d9f93cd36b7d
2013-08-02 20:11:19 +00:00
drh
b47e07f1c1 Add support for partial indices.
FossilOrigin-Name: 478113f18b1d28606b107b5a0bed04cb90a82cf2
2013-08-02 16:41:02 +00:00
drh
1e7d43c977 Silently ignore database name qualifiers in CHECK constraints and in
partial index WHERE clauses.

FossilOrigin-Name: 2e8c845eb5011a2743dace333aa38383588f2080
2013-08-02 14:18:18 +00:00
drh
0b22101b2f Fix typos in documentation for SQLITE_DBSTATUS_DEFERRED_FKS .
No changes to code.

FossilOrigin-Name: f3efbfcd515ad6ac833f4b26391dcc44603a96e8
2013-08-02 13:31:31 +00:00
drh
989b116a03 Fix the CREATE INDEX statement so that trying to create a TEMP index on
a non-TEMP table throws an error rather than segfaulting.

FossilOrigin-Name: e3c8935f8736d00dc83644fa21d86ca7fec6d2fc
2013-08-01 22:27:26 +00:00
drh
af4300636a Fix an incorrect expected result in a test case in corruptG.test.
FossilOrigin-Name: 6913831ad2892fdc8331ee53426d935386eacb9e
2013-08-01 22:26:56 +00:00
drh
f5601cac4d Fix a potential buffer overread in sqlite3VdbeRecordCompare() when a
serial_type specifies a field that starts in bounds but is much too large
for the allocated buffer.  Mostly harmless.  The overread is unlikely to
go more than one or two bytes past the end of the buffer.

FossilOrigin-Name: e436b2f4e5c5e6b2f70e65332c0c7d618e2ef20a
2013-08-01 20:26:04 +00:00
drh
df003d61ce Make sure signed integer overflow does not cause a segfault while attempting
to read a corrupt database where the header size varint on a record is larger
than the maximum 32-bit signed integer.

FossilOrigin-Name: c3baca99f4580652afb2c3f73036ab83796a1557
2013-08-01 19:17:39 +00:00
dan
2acbc0dd78 Add test case for the problem fixed by [127a5b776d].
FossilOrigin-Name: 65816718b59b286c11d939235a23c7325f25594b
2013-08-01 17:43:35 +00:00
drh
828463375c An improved method for avoiding the use of the STAT3 samples to compute
the estimated number of outputs when the left-most index is equality
constrained.  This check-in undoes the previous fix and applies a new one.

FossilOrigin-Name: 127a5b776d16e1e23c5b3d454f6aaea67f1ded3a
2013-08-01 17:21:26 +00:00
drh
788482c745 Avoid using left-most column STAT3 samples if the left-most column has an
equality constrain and there are inequality constraints on the second column.

FossilOrigin-Name: 31b4e63b3c30fcad22340d84d6076a306f26b49e
2013-08-01 16:52:50 +00:00
drh
3bf0ac1709 Fix bug in the logic that determines the end of a CREATE INDEX statement.
Added a VACUUM test case that exposed the bug.

FossilOrigin-Name: 2e3df0bc900c01286d3ce32c2bbf9e5293973f9b
2013-08-01 16:02:40 +00:00
drh
66518ca71f More test cases and corresponding bug fixes.
FossilOrigin-Name: 0c8cfdfae215c95cf167f404a1d346690b28e972
2013-08-01 15:09:57 +00:00
drh
619a1305e7 Fill out an initial implementation of the sqlite3ExprImpliesExpr() function.
FossilOrigin-Name: 8e07aa2ad5579aeb82174ce5bd432ddb9c058bc1
2013-08-01 13:04:46 +00:00
drh
cf0fd4a5fd Refactor internal function name sqlite3VdbeGetValue() to
sqlite3VdbeGetBoundValue().

FossilOrigin-Name: 81834c3023876487a1188390aae850cf71683701
2013-08-01 12:21:58 +00:00
drh
721dfcf544 Fix the ANALYZE command to work with partial indices.
FossilOrigin-Name: 60353124f4e965393ecd864019bdbca1999fb69e
2013-08-01 04:39:17 +00:00
drh
8a9789b6c1 Test cases and bug fixes for the partial index logic.
FossilOrigin-Name: 6b73ae7c123801787c8994113cbeb87ee96ba653
2013-08-01 03:36:59 +00:00
drh
b2b9d3d758 Add the logic to keep partial indices up to date through DML statements and
when new partial indices are created.  This new logic is untested except to
verify that it does not interfere with full indices.

FossilOrigin-Name: fb9044d15ad4fd6ae4a38858c0c0e6fe9d4faa25
2013-08-01 01:14:43 +00:00
mistachkin
c6fc65ce08 Limit the number of memset() calls used when determining a temporary file name on Windows. Also, fix a harmless compiler warning.
FossilOrigin-Name: 136fc2931b156f91cdd76a7a009298cdf09d826a
2013-07-31 23:28:36 +00:00
drh
4bd5f73fa0 Add logic to the query planner to only use partial indices if the WHERE clause
constrains the search to rows covered by the partial index.  This is just
infrastructure.  The key routine, sqlite3ExprImpliesExpr(), is currently a
no-op so that partial indices will never be used.

FossilOrigin-Name: 8ca3eac111e06a1854f878a74bffe8f20eb47f1b
2013-07-31 23:22:39 +00:00
mistachkin
aa82eba40d Slight modifications to path name translation handling for Cygwin.
FossilOrigin-Name: 33ba1f4c5dc2ef8292adf17a32ade0cde0887d88
2013-07-31 22:39:26 +00:00
mistachkin
16a2e7a053 Use a new error code to represent a failure to get the configured temporary directory on Windows.
FossilOrigin-Name: c93d891b03c626b9ed01ed5ef2f246b2d4a40a64
2013-07-31 22:27:16 +00:00
drh
68f7a9e942 The MAX_PATH constant in windows is measured in characters, so multiple by 3
to get the number of bytes assuming worst-case UTF8 pathnames.

FossilOrigin-Name: bb06e1579022c24546ac5117a99846b3c37ef59b
2013-07-31 19:55:25 +00:00
drh
3780be115a Resolve names in CREATE INDEX WHERE clauses and detect errors. Disallow
expressions that contain variables, subqueries, or functions.
The expression is still not used for anything, however.
still unused.

FossilOrigin-Name: f2aa7842c8b9df24294f09e2bde27b3f08c455c7
2013-07-31 19:05:22 +00:00
drh
1fe0537e51 Here begins an experimental branch for exploring the idea of a partial index.
This check-in is able to parse a WHERE clause on a CREATE INDEX statement, but
does not actually do anythingn with that WHERE clause yet.

FossilOrigin-Name: 6794b2dcb48b3507caccfc7867fc185818cf8291
2013-07-31 18:12:26 +00:00
drh
6b36e82c7b Reduce the size of the stack required by the codeOneLoopStart() function in
where.c.

FossilOrigin-Name: eb6d4278b8516e0571269049d1eaa55066f51b1a
2013-07-30 15:10:32 +00:00
mistachkin
f67feefffc For the MSVC makefile, recompile vdbe.lo and parse.lo first.
FossilOrigin-Name: 9e819f0f12b6f2a8e0e7a90251b3115ff1595f25
2013-07-29 19:03:20 +00:00
drh
443dbcf5ae Comment and preprocessor macro cleanup.
FossilOrigin-Name: c0809b5e32c2ca0600098447a573e718eaeb319f
2013-07-29 15:54:06 +00:00
drh
30a6837c35 In main.mk, always recompile vdbe.o and parse.o first, since changes to either
parse.y or vdbe.c will cause all files to be recompiled and if there are
syntax errors in vdbe.c or parse.y we want to hit them early in the compile
process.

FossilOrigin-Name: a94a66d10f160ee79fffa8527655c2cc4a0c7103
2013-07-29 13:51:54 +00:00
drh
53371f90e4 In the command-line shell, work around the fact that popen() and pclose()
are not defined in stdio.h. in C89 and later.

FossilOrigin-Name: 8bcbb33fd0a970e16a920e1d35571836dbb9ba50
2013-07-25 17:07:03 +00:00
dan
1d1f07df58 Fix a typo in main.c: SQLITE_DEAULT_AUTOMATIC_INDEX -> SQLITE_DEFAULT_AUTOMATIC_INDEX
FossilOrigin-Name: cc78e21c7794948a187e694773735058fc7460d7
2013-07-25 16:41:39 +00:00
drh
0d1961e91c Enhance the progress handler so that it keeps track of the number of VDBE
cycles across sqlite3_step() calls and issues callbacks when the cumulative
instruction count reaches threshold.

FossilOrigin-Name: 4698a82ef855a8e56163622283fb25317d7efdc4
2013-07-25 16:27:51 +00:00
mistachkin
036acf3644 Add 'queryplantest' target to the MSVC makefile.
FossilOrigin-Name: ad0551e039ccaa9e7a28682b756b56ac2b8fef0d
2013-07-20 00:34:31 +00:00
mistachkin
9ed04ebc8f Fixes to test numbering.
FossilOrigin-Name: f755b4b21c885f3e897c2a79fc7ac1220210e653
2013-07-19 23:58:41 +00:00
drh
af66433625 Remove unused "codec" code from the command-line shell.
FossilOrigin-Name: 37abfe0c1e5da63342389c527a9f7cbe0f8392d9
2013-07-18 20:28:29 +00:00
drh
6b75329ae1 Improved documentation for sqlite3_set_auxdata().
Ticket [406d3b2ef91c].

FossilOrigin-Name: 62465ecba7431e1d71e17a61f1af7dc65fe4fe97
2013-07-18 18:45:53 +00:00
dan
6447827e3b Ensure that all auxiliary data registered by calls to sqlite3_set_auxdata() is destroyed when the VM is halted.
FossilOrigin-Name: 153deac8faca3bcc95f6f37e500b659b39b3e872
2013-07-18 18:29:24 +00:00
dan
28f8aebf75 Fix a typo in the previous commit.
FossilOrigin-Name: cd9096e64b86c8d45f6744e6eb6ced2aa1a18279
2013-07-18 18:28:04 +00:00
dan
0c5477997b Ensure that all auxiliary data registered by calls to sqlite3_set_auxdata() is destroyed when the VM is halted. Partial fix for [406d3b2ef9].
FossilOrigin-Name: 71effa59c98d167e6e4b269e59ad5f468e664ac1
2013-07-18 17:12:08 +00:00
drh
1ac87e1e81 Fix a 8-byte alignment problem in the query planner that might cause
problems on sparc when compiled with -m32.

FossilOrigin-Name: 5dcffa671f592ae9355628afa439ae9a2d26f0cd
2013-07-18 14:50:56 +00:00
drh
b8c068329d Documentation changes to warn that sqlite3_set_auxdata() might call the
destructor even before it returns.  Also fix the regexp extension to deal
with that case.  Ticket [406d3b2ef91c].

FossilOrigin-Name: 7acc8cd32d593a473c9e9adaf323220a7a46480a
2013-07-18 14:16:48 +00:00
drh
47af6e76d6 Fix copy/paste errors in comments in the transitive_closure virtual table.
No changes to code.

FossilOrigin-Name: b1b0de29fdf7de83722bb85b748f058b9901e77a
2013-07-17 21:08:49 +00:00
drh
cc0713057f Enhance the sqlite3_analyzer tool to give reports on the sizes of individual
indices.

FossilOrigin-Name: 3b4096cc8a3b4517cdf49dcfe1f33279a5eb8efb
2013-07-17 18:12:15 +00:00
drh
9f01e582be Clear the error string pointer in sqlite3_vtab object after the error string
is transferred to SQLite.  Ticket [78588b938a11].

FossilOrigin-Name: 64bf8148b84e0ebb45c12b629f49bc9b316aceba
2013-07-17 11:54:47 +00:00
drh
7232ad0700 Make sure the sqlite3_prepare16 and sqlite3_prepare16_v2 interfaces do not
read past a zero-terminator if the nBytes parameter is too large.

FossilOrigin-Name: 20dba3a7fb3e7078b95af3beca948467a3af6a89
2013-07-16 23:26:43 +00:00
drh
aa32e3c60a Enhance the query planner so that it looks at multiple solutions to OR
expressions in the WHERE clause.

FossilOrigin-Name: 5e19d054105fb16ff52d265d48cc87a418603f6f
2013-07-16 21:31:23 +00:00
drh
425e27db12 Add the sqlite3_cancel_auto_extension(X) interface which will undo a prior
call to sqlite3_auto_extension(X).

FossilOrigin-Name: cdce87eb889a43dafcc560d5f97ab517d0266860
2013-07-15 17:02:28 +00:00
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
mistachkin
60bdad7f54 Environment variable names in nmake must be in all uppercase.
FossilOrigin-Name: 0328e873f2f98ac0aed93ec07ba7e14228cc10e0
2013-07-11 03:09:45 +00:00
mistachkin
4eaa1295c9 More corrects to VS 2013 integration.
FossilOrigin-Name: 7a8b0e362b529d54231453046f22e90e651ecdc5
2013-07-10 21:33:25 +00:00
mistachkin
6cdc63d4e3 Use the VisualStudioVersion variable instead of _MSC_VER.
FossilOrigin-Name: 603e9db817d457e59e329ad55ac3f1e567759b32
2013-07-10 19:53:49 +00:00
mistachkin
da5b1cd446 More changes to support MSVC 18.
FossilOrigin-Name: 29c458e2c21f7c8db727fe8dbd4d154918b53a4e
2013-07-10 19:39:02 +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