Commit Graph

4540 Commits

Author SHA1 Message Date
dan
9211f8a6ce Allow FTS4 multi-token phrases to use a combination of in-memory and incrementally loaded doclists. This allows phrases to (partially) benefit from incremental doclists without disabling the deferred token optimization.
FossilOrigin-Name: f6819c5f3363d358e7ef65fe6978f13991bd44af
2013-10-03 19:27:14 +00:00
dan
46539d7cfa Return an error if an attempt is made to create a trigger with an SQL variable embedded within it. If such a variable reference is found within a trigger definition loaded from the sqlite_master table, silently replace it with a NULL.
FossilOrigin-Name: f35f6ae3da77dbdf5f7a4a9927475659fc6e0ca6
2013-10-03 12:29:38 +00:00
dan
eb26672d0e Add a test to check that the new multi-token phrase optimization is actually helping.
FossilOrigin-Name: bc3a2ed5fb2402805928b0002457eebf06f87c47
2013-10-02 08:04:27 +00:00
dan
1073e26435 Merge trunk changes with this branch.
FossilOrigin-Name: 65d9c6fafbc19d3582e07c31fd915a70e7fcfa8e
2013-10-01 20:10:26 +00:00
drh
3b6cb3ceb9 Add some timing tests to the amatch test script.
FossilOrigin-Name: ad71c72be56786d8dcf6917efd10a8d3c2d50419
2013-09-30 19:05:03 +00:00
dan
73632e37c9 Merge trunk changes with this branch.
FossilOrigin-Name: e294a9c7c525d1da698259c2fef089579bfd1c0b
2013-09-30 18:16:07 +00:00
dan
1f03e609ff Fix a performance problem in the FTS4 auxiliary functions triggered by an OR clause in the full-text query.
FossilOrigin-Name: fa0f2f0e3e79ae653118b901e1cca7725dfaf249
2013-09-30 18:14:45 +00:00
drh
92054fefcd Fix memory leaks in the amatch extension. Add a few simple test cases.
FossilOrigin-Name: 604134732e309a738e21bcb4240b9ff285d2bfe4
2013-09-30 17:37:15 +00:00
dan
19384380f3 Have fts4 full-text queries consider "docid<?" and similar constraints.
FossilOrigin-Name: 6622424a3a149edd35ba2ba0881aa41b4536417b
2013-09-30 11:42:19 +00:00
dan
07490d2b8a Add new test file fts3defer3.test.
FossilOrigin-Name: a6cd14effef0a4e5520eea871523e6e7a7d30aef
2013-09-28 16:43:49 +00:00
drh
f42747246a In the nextchar.c extension, allow the second argument to the next_char()
function to be a subquery.

FossilOrigin-Name: 59b9fa223681a7329533b350be7bf5a0a3609255
2013-09-28 13:28:40 +00:00
dan
5d1dcff095 Obtain the required shared-cache write-lock when executing "DELETE FROM tbl" statements. Fix for [1e1321ee98].
FossilOrigin-Name: 1f8f4fdf3ff2b8de27e167a44a19b0f479f5ee1a
2013-09-26 15:21:16 +00:00
dan
56c517aa5f Fix a faulty assert() in sqlite3BtreeBeginTrans() that may fail in shared-cache mode.
FossilOrigin-Name: 1e1321ee985370c2b7e5bd64286bb4d7704b5a30
2013-09-26 11:04:33 +00:00
mistachkin
bbff218016 Merge updates from trunk.
FossilOrigin-Name: 435ce3b3fc0cffb4d7e6f2694c3100066e19f9ed
2013-09-24 19:07:48 +00:00
dan
6284d02160 Test that the unicode61 tokenchars= and separators= options work with the fts3tokenize virtual table.
FossilOrigin-Name: ed24051462c09220ebfb82a347b4a2b5c820ef63
2013-09-18 11:16:32 +00:00
drh
95a7b3e36d The date and time functions use the exact same notion of "now" for every
invocation within the same call to sqlite3_step().

FossilOrigin-Name: daf6ba413cb3cb6065774ba07495eab4a28b49b0
2013-09-16 12:57:19 +00:00
mistachkin
9ac99313b5 Fix test issues for Windows portability.
FossilOrigin-Name: 650b32825a85baff11b8e568649fd797066c8ab1
2013-09-13 23:26:47 +00:00
drh
55e85ca5f5 Add the soft_heap_limit pragma.
FossilOrigin-Name: c326356f9a18bff5cf36bd59331e2cc207e349fa
2013-09-13 21:01:56 +00:00
drh
a496fa7c02 Adjust the query planner to take into account WHERE clause terms that do not
drive indices.  Add the unlikely() and likelihood() functions used to give
hints to the query planner about the selectivity of WHERE clause terms.

FossilOrigin-Name: bc446449a19171c0fa0681973b06bc80d3c0517f
2013-09-13 17:47:57 +00:00
dan
f1d2670d40 Add tests for the fts4 unicode61 tokenchars and separators options.
FossilOrigin-Name: 9ce6f40dfb54b35cecba3cc9c1ec0d111f6e9f11
2013-09-13 12:10:09 +00:00
drh
a4c3c87e3d Merge in the Expr.flags expansion to 32-bits. Use an extra bit to help
optimize the sqlite3ExprSkipCollate() routine.

FossilOrigin-Name: 4c84d1b4c20f18921dd705bf67e8225975b83e86
2013-09-12 17:29:25 +00:00
drh
7d9e7d8287 Improvements to likelihood processing so that commuting an unindexed term in
the WHERE clause does not change the query plan.

FossilOrigin-Name: 6e6bded055cdbc902731687c86d92c39a3ba5904
2013-09-11 17:39:09 +00:00
drh
89a75397e0 Add test cases to cover TPC-H Q8.
FossilOrigin-Name: eb5cef8351d12c0f8550dac96ee7a6e495975b5a
2013-09-11 14:57:11 +00:00
drh
09328c00d6 Additional unlikely() test cases. Logic tweaks to support test coverage.
FossilOrigin-Name: 5d00cce74a7aefaf30022ae971ab1e0451e0ad6e
2013-09-11 14:34:58 +00:00
drh
aae0f9e462 Change the name of the two-argument unlikely() function to likelihood().
Add test cases.

FossilOrigin-Name: 29a359b8d7f90e6fa2b28ce2a112284fd3870494
2013-09-11 11:38:58 +00:00
drh
abfa6d52ed Tweaks to the index selection logic.
FossilOrigin-Name: 52d52688644f635a50a60ff17b160f3affa8fa6c
2013-09-11 03:53:22 +00:00
drh
36fabb6297 Merge trunk fixes into the unlikely-func branch.
FossilOrigin-Name: a51d751553b14aa26912c516f60727551deb8e60
2013-09-10 01:53:18 +00:00
drh
1d2b3c1f8a Deterministically initialize the PRNG used as a tie-breaker in the ANALYZE
command, so that the analysis is always the same given the same database.
This simplifies testing.

FossilOrigin-Name: 48ed8b565b84c8fa7898c2f9817c01f7e9c9182e
2013-09-10 01:41:25 +00:00
mistachkin
9a5cbbc4a5 Merge updates from trunk.
FossilOrigin-Name: 8922be1a3e0269552e12b87fe1e5141c38a8d3f8
2013-09-06 22:27:55 +00:00
mistachkin
9a5b271908 When converting from a BLOB value in the tointeger() and toreal() SQL functions, make sure that endianness of the machine does not matter.
FossilOrigin-Name: 94c4cdc50d2753c859e494d53cebd09edd2e5663
2013-09-06 20:30:53 +00:00
drh
cca9f3d291 Initial implementation of the unlikely() SQL function used as a hint to
the query planner.

FossilOrigin-Name: 036fc37a034093a4c6fc190633bd41c2b7230d77
2013-09-06 15:23:29 +00:00
dan
8ff2d9561a When preparing an UPDATE statement, avoid generating VDBE code for those foreign key related actions and constraint checks that may be seen to be unnecessary by considering the subset of table columns potentially modified by the UPDATE.
FossilOrigin-Name: e940b5de49baa1d6a4cf859fbbc0e0df86ac5dbf
2013-09-05 18:40:29 +00:00
dan
af0d8bcf4b Add tests to improve coverage when SQLITE_ENABLE_STAT3 is defined.
FossilOrigin-Name: f929e9b41f2f69b086be3dd48fe557adbba7ae5c
2013-09-04 16:38:42 +00:00
drh
55a1b30875 Fix a bug in the command-line shell for ".mode insert" on UTF16 databases
with BLOB values.

FossilOrigin-Name: d8fdc7821808e2bfa048144ee3015b745232dc30
2013-09-04 16:08:50 +00:00
mistachkin
aeddf19e60 Additional test cases for the tointeger() and toreal() SQL functions when converting from a BLOB.
FossilOrigin-Name: e1814452faa698946ef77f06a42665277ee59cc1
2013-09-04 00:58:00 +00:00
dan
b13af4c5dd Fix another problem in stat4 sample selection.
FossilOrigin-Name: d59f580904e6e7e90fc0a692a3dd4eeff5942479
2013-09-03 14:43:12 +00:00
drh
67a5ec7b54 Make sure the omit-noop-left-join optimization is not applied if columns
of the LEFT JOIN are used in the ORDER BY clause.  
Ticket [be84e357c035]

FossilOrigin-Name: 0303d6bc7112e6f810ae1bd75cafc5ffc51f5212
2013-09-03 14:03:47 +00:00
dan
b49d1047c6 Further stat4 related tests.
FossilOrigin-Name: 0a702c4b4c35fdbcb62e3ab88b9e57d7ea0052a8
2013-09-02 18:58:11 +00:00
dan
84f48296fa Add tests to check if ANALYZE is choosing common non-periodic samples for the stat4 table.
FossilOrigin-Name: 175842997af134138784bff6f8e93573deb5b36b
2013-09-02 11:52:11 +00:00
dan
575ab2f8f6 Fix a problem with using stat4 data to estimate the number of rows scanned by a range constraint on the second or subsequent column of any index where an affinity transformation must be applied to the constraint argument.
FossilOrigin-Name: c21f58d84859e479a6cc619671a0df48b2f9692e
2013-09-02 07:16:40 +00:00
mistachkin
1c215c9fd4 Merge updates from trunk.
FossilOrigin-Name: 2982725e12715fba425a46ae024f317f031b6a54
2013-09-01 23:36:44 +00:00
dan
4a1aa3851a Fix a problem causing SQLite not to use stat4 or stat3 data to analyze constraints of the form "column = expr COLLATE collation" (those with an explicit COLLATE on the non-column side of the comparison operator).
FossilOrigin-Name: 1e86d81d46c9da6aaee0c6938ee40933f35e3d0d
2013-08-31 17:21:26 +00:00
dan
3fa2a82b8b Reenable a test accidentally disabled when the stat4 branch was merged.
FossilOrigin-Name: d9fadc8fa6ef02d516678d57896d93e0a5f52cfe
2013-08-31 14:56:30 +00:00
drh
f46af73720 If the cost of two whereLoop objects is the same in every way except that
one has fewer expected output rows than the other, then choose the one with
fewer output rows.

FossilOrigin-Name: 79e458ef7acfddbc189163e3e958da529becb130
2013-08-30 17:35:44 +00:00
dan
43398081a8 Add a test for fts4 unicode61 option remove_diacritics=0.
FossilOrigin-Name: 6bf7ae6ff6b18712544ddeafb6848b3b27ff22d2
2013-08-30 13:29:51 +00:00
dan
cd40abb297 Candidate fix for [9f2eb3abac]: Have the whereShortCut() planner ignore indexes with more than four columns.
FossilOrigin-Name: c1152bdcbb5ac185f743015fff63769effa81b4b
2013-08-29 10:46:05 +00:00
mistachkin
a17713ff8d Disable several toreal() tests that require high floating point precision when it is unavailable.
FossilOrigin-Name: b724219b008d9851de18bd4158375100d781c5a3
2013-08-29 02:27:39 +00:00
mistachkin
5db4f78ef5 Merge updates from trunk.
FossilOrigin-Name: 375dfe288fd0c4eb3c343a3cb23a7e3851903805
2013-08-29 01:11:45 +00:00
mistachkin
1d406e0dfd Small enhancements to unit testing infrastructure.
FossilOrigin-Name: 9229aeb361f9805894321327d05aba855b8799f3
2013-08-29 01:09:14 +00:00
dan
1d2b70e3d2 Re-enable test file wild001.test.
FossilOrigin-Name: 4f182ddc36944fa54f1a34c1f0527db0ebb39c96
2013-08-28 19:01:07 +00:00
mistachkin
312404ef76 Merge updates from trunk.
FossilOrigin-Name: ffc6e682836cdf275189427109f8af2aeb423bcd
2013-08-28 18:56:04 +00:00
drh
e4f9b9b7c0 Add the win32-longpath VFS allowing windows filenames up to 32K characters in
length.  Remove unused code when -DSQLITE_MAX_MMAP_SIZE=0.  Fix some
compiler warnings on windows.

FossilOrigin-Name: 12d0a8859de0a9d823997cfeccc77bd572cb6d13
2013-08-28 18:18:12 +00:00
drh
d41d39f24d In the query optimizer, when converting BETWEEN and LIKE/GLOB expressions
into simpler forms for processing, be sure to transfer the LEFT JOIN markings.
Fix for ticket [bc878246eafe0f52c].

FossilOrigin-Name: caab361ebee5f5c3fdafd9b1abe3d1ab7c5b4db9
2013-08-28 16:27:01 +00:00
drh
868ccf2679 Fix an off-by-one error that causes a quoted empty string at the end of
a CRNL-terminated line of CSV input to be misread by the shell.

FossilOrigin-Name: b5617e4fdadc4cded93c985008e90982dd48bc3b
2013-08-28 13:33:40 +00:00
drh
f7f8de5fb2 Add a test case for empty quoted field in CSV import in the shell.
FossilOrigin-Name: 3df56e849164811117f9ac8ee2aee1eee188bb96
2013-08-28 11:57:52 +00:00
mistachkin
70e9ffa3bb In the win32longpath test, move the journal mode change down where it was intended to be.
FossilOrigin-Name: 5cead293bbbcddd7d0976db41133e40704efcc99
2013-08-28 07:42:43 +00:00
mistachkin
3741827ea1 Support database file names longer than 260 characters using the new 'win32-longpath' VFS variant.
FossilOrigin-Name: 37e85e444cde18f061049437980b965d4485f43c
2013-08-28 05:49:39 +00:00
drh
2f53b90665 Merge the STAT4 capability into trunk.
FossilOrigin-Name: a32af0abe5fa6d570604fa3534e8230d5b6042fc
2013-08-26 23:18:06 +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
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
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
mistachkin
98ab33a82f Add test cases for tointeger() and toreal() functions. Fixes for several tests.
FossilOrigin-Name: 5e1e9fd5e4f189836442baa42244be00de13ff0f
2013-08-20 09:26:38 +00:00
mistachkin
cf02d7cf0b Add tointeger() and toreal() SQL functions.
FossilOrigin-Name: af49707211ff7c7c4d30f4f457631ea8a9fa39eb
2013-08-19 21:15:34 +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
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
dan
0e8194a9c7 Add a test for the problem fixed by [91733bc485].
FossilOrigin-Name: 5c591104813a7e55e59f4f557cbb3e500fa817c2
2013-08-16 17:46:49 +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
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
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
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
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
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
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
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
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
dan
3d40759803 Merge latest trunk changes with this branch.
FossilOrigin-Name: 08f74c45ecf711a2373af578d44470add9082377
2013-08-07 18:42:27 +00:00
dan
ddc2d6e8f5 Fixes for builds without SQLITE_ENABLE_STAT4.
FossilOrigin-Name: 84999e27cc0d14b89d9fe024e29d287c69285369
2013-08-06 20:15:06 +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
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
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
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
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
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
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
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
mistachkin
626c25846c Merge updates from trunk.
FossilOrigin-Name: dd4b77c82af07bdcc92ed743f050e70887e5956e
2013-07-20 00:39:33 +00:00
mistachkin
9ed04ebc8f Fixes to test numbering.
FossilOrigin-Name: f755b4b21c885f3e897c2a79fc7ac1220210e653
2013-07-19 23:58:41 +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
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
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
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
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
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
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
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
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
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
dan
f73819af05 Add extended error code SQLITE_BUSY_SNAPSHOT - returned in WAL mode when a read-transaction cannot be upgraded to a write-transaction because it is reading from a snapshot other than the most recently committed.
FossilOrigin-Name: 361c22969aa75340ed696e00e3dc5d17d5493bee
2013-06-27 11:46:27 +00:00
drh
db95f68b14 Update the ".import" command of the command-line shell so that it can
accept field values that span multiple lines and so that it issues
error messages if the input text does not strictly conform to RFC4180.

FossilOrigin-Name: 93f632152e464a89322a0130adaf9f342411bf7d
2013-06-26 22:46:00 +00:00
dan
6559172e1a Update the boundary3.tcl script so that it can be run with tcl 8.5 or 8.6 to regenerate boundary3.test.
FossilOrigin-Name: ebac5afa471526dffc8026e66753263476137a3b
2013-06-26 16:30:26 +00:00
drh
4580cfb93e Cut over the next generation query planner. Increase the version number
to 3.8.0.

FossilOrigin-Name: 0fe31f60cadc5fe5a9d87e110bfaed5fd026cba1
2013-06-26 11:43:18 +00:00
drh
0057a74675 Merge in the latest changes from trunk. Simplify the implementation of the
tointeger() and toreal() functions.  Fix test cases and put unambiguous
labels on all testcase names.

FossilOrigin-Name: 9b837b0508fbfb395f0a0d8e4bd127730c80ffc5
2013-06-21 19:29:33 +00:00
mistachkin
f5fe3ae9e6 Merge updates from trunk.
FossilOrigin-Name: fa2a91e6c631864846484d13cffdc51856953cd1
2013-06-21 18:32:11 +00:00
dan
9faa648239 Add a few more tests for the fts4 notindexed option.
FossilOrigin-Name: b53c0c41f97c7ddaeea61f0e6035d1c4747db3f7
2013-06-21 18:18:23 +00:00
dan
8def92bac3 Add the "notindexed" option to fts4.
FossilOrigin-Name: 8ff2b8f5948ccddce70102e6d68d464c66e4f7ca
2013-06-21 17:30:47 +00:00
drh
74f91d4462 Add in the cost of doing a table lookup on OR searches. Make test case
changes to deal with difference in STAT3 behavior.

FossilOrigin-Name: d97898e8e3990ae8c1882c9102b57692d8810730
2013-06-19 18:01:44 +00:00
drh
75bf6b984a Use automatic indices on subqueries of the FROM clause when appropriate.
FossilOrigin-Name: e8f124284ee0d0e373dc4431668630f1e17015c1
2013-06-17 14:18:21 +00:00
drh
b8916be945 Add a new ORDER BY optimization that bypasses ORDER BY terms that are
constrained by == and IS NULL terms of the WHERE clause.

FossilOrigin-Name: b920bb70bb009b7c54e7667544c9810c5ee25e19
2013-06-14 02:51:48 +00:00
drh
e1e2e9acd6 Make the MIN() and MAX() macros available in sqliteInt.h. Add TUNING
comments to the NGQP and adjust costs slightly.

FossilOrigin-Name: 3a72af2a95b04b8e195ef17cb3e9d9021a4f0915
2013-06-13 15:16:53 +00:00
drh
37ca04880a Merge all changes from trunk.
FossilOrigin-Name: f2e15b1974e55373b5819e3b2326653f890f409f
2013-06-12 17:17:45 +00:00
drh
4fe425ad79 "make test" now passing.
FossilOrigin-Name: addd7f466d6ff55f82d907286650c26b06e9397b
2013-06-12 17:08:06 +00:00
drh
fd5874d23d Add the "queryplanner" test permutation. Continuing refinements to NGQP.
FossilOrigin-Name: 25e2cde105a19293bdb9c001b48624e5d7f8c4e5
2013-06-12 14:52:39 +00:00
drh
8a4380d761 Fixes to EXPLAIN QUERY PLAN output. Change weights back to something closer
to what they are in legacy.  More test case fixes.

FossilOrigin-Name: 36373b85f9a97840aa06e24ae31c12fcfbae084e
2013-06-11 02:32:50 +00:00
drh
8636e9c55c Handle virtual tables correctly when using logarithmic costs. Fixes
to test cases.

FossilOrigin-Name: e612664aa2e24ed5e222be2c7fe16e210ac9bded
2013-06-11 01:50:08 +00:00
drh
5822d6feb2 Fix test cases for the new EXPLAIN QUERY PLAN format. Add the
wherecosttest tool.  Other fixes to logarithm cost.

FossilOrigin-Name: aa580e368e3c398b8377b80342dfdd906324c248
2013-06-10 23:30:09 +00:00
drh
09081862cf Add test cases to demonstrate the memory leak on the COLLATE clause.
FossilOrigin-Name: 0a60212c9c8404ee079985a58094ed2b2b554d48
2013-06-09 20:16:26 +00:00
dan
f2c9229f73 Up until now the fts4 "unicode61" tokenizer has treated all private use codepoints except the first and last of each of the three ranges as alphanumeric (eligible to be part of tokens). This commit fixes this so that all private use codepoints are considered alphanumeric. In other words, it fixes the handling of codepoints 0xE000, 0xF8FF, 0xF0000, 0xFFFFD, 0x100000 and 0x10FFFD.
FossilOrigin-Name: 6cfd9af5250029c0d275be027b4208c48954a8a1
2013-06-05 16:17:21 +00:00
drh
6f403ca450 Add a test case contributed on the mailing list
that works in NGQP but fails in legacy.

FossilOrigin-Name: 96afe50866a08ed14e911c3c955030f7ab83a3ed
2013-06-05 12:18:15 +00:00
drh
e353ee3898 Update some variable names and comments in the ORDER BY optimizer. Fix a
bug in the ORDER BY optimizer dealing with IS NULL constraints.  Updates
to test cases.

FossilOrigin-Name: cf96eb5945a9bab71104cb1581ee13ab30022566
2013-06-04 23:40:53 +00:00
drh
aec93a1f2d Test case updates.
FossilOrigin-Name: 0360fec7c093870269211447e9642b5ee34ff778
2013-06-04 15:31:16 +00:00
drh
7699d1c4e5 Refactor the ORDER BY optimizer in the NGQP so that it is easier to maintain
and so that it can support optimizing out GROUP BY and DISTINCT clauses.

FossilOrigin-Name: e605c468e3a1163167831c4a6220825c0b5d083b
2013-06-04 12:42:29 +00:00
drh
7c171098b7 Remove more vestiges of sqlite_query_plan from the test cases.
FossilOrigin-Name: eb27086e8a8a4d5fcb2ea358256a555e34339423
2013-06-03 22:08:20 +00:00
drh
a3855653ed Adjust the xBestIndex methods on both the fuzzer and transitive_closure
virtual tables so that an unused MATCH operator gets a really large cost.
Remove ambiguities from the fuzzer test cases.

FossilOrigin-Name: e2c1af78b65a8ace976fa6c035db212e1ffc79b8
2013-06-03 21:25:28 +00:00
drh
45c154ac90 Pull in recent trunk changes. Fix the ORDER BY optimizer so that it is better
able to deal with COLLATE clauses.  Clean up ambiguities in the descidx1.test
script.

FossilOrigin-Name: 6bc71dfcf0ef757c5c2b426dd8fddc1e5ae0f598
2013-06-03 20:46:35 +00:00
drh
f5ad80397d Fix a typo in a collating function inside the e_reindex.test script.
FossilOrigin-Name: 4d74fccf02134a998a84097b021ba9d501e34ff0
2013-06-03 20:39:15 +00:00
drh
74990dce64 Resolve ambiguities in test cases in collate2.test.
FossilOrigin-Name: dcbbcb2e6c85780276cb3a392549f70e21e94408
2013-06-03 19:01:26 +00:00
drh
d2b113bc33 Fix a bug in the transitive_closure virtual table that NGQP exposes.
Update between.test module to avoid using sqlite_query_plan.

FossilOrigin-Name: aa66b864204b4b8717d845499132b987eb8ef924
2013-06-03 18:50:15 +00:00
drh
d108d74d48 Virtual tables now always report 25 rows instead of 0 rows in the
EXPLAIN QUERY PLAN output.  Adjust tests accordingly.

FossilOrigin-Name: 7d91f688815597ff65ec04b7daa21cb9e5d6bf98
2013-06-03 15:24:11 +00:00
drh
6186b30901 Add test cases to verify that ticket [bc1aea7b725f2761] has been fixed in
the NGQP.

FossilOrigin-Name: 9b97af94ae7b1624ef1f5adee58010593fbb8b1c
2013-06-03 14:15:34 +00:00
drh
ae70cf1816 Allow tracing of whereLoopInsert() when the 0x8 bit is set on ".wheretrace".
Remove the use of sqlite_query_plan from where2.test.  Fix a bug in the
code generator for OR clause optimizations.

FossilOrigin-Name: 707f0323264c35be14847a6adc49a0dc5eaf4ad2
2013-05-31 15:18:46 +00:00
drh
6fa978dade Futher simplifications to the NGQP. Fix some test cases to use
EXPLAIN QUERY PLAN rather than the (now obsolete) sqlite_query_plan
global variable.

FossilOrigin-Name: ae985db4fa08b5efbef5a834e852f0b05101264b
2013-05-30 19:29:19 +00:00
drh
70bdcc738e The expected result in a test case can be of the form "*glob*" or "~*glob*" to
match or not match the GLOB pattern.  This is useful for matching
EXPLAIN QUERY PLAN output that contains regular expression syntax characters
like "?", "(", and ")".

FossilOrigin-Name: a3b4e261bd7e278f150872cce7b020af5ad8d2ed
2013-05-30 19:28:34 +00:00
drh
e1e9766dee Merge recent trunk changes into the NGQP branch.
FossilOrigin-Name: aebe1f2603ee04d792af73aaf59625bda99d5cd1
2013-05-30 11:48:36 +00:00
dan
ba4f01edb3 Add tests for running FTS 'merge' and 'optimize' commands in shared cache mode.
FossilOrigin-Name: 09e5a7ad85dc592fce868a2d0f8719c6915ccb47
2013-05-29 14:22:19 +00:00
drh
def3367e50 Add the percentile() SQL function as a loadable
extension in the ext/misc directory.

FossilOrigin-Name: a64d760d9290b1be78cdda7ae66d4f02c3b3fa53
2013-05-28 20:25:54 +00:00
dan
87ddfeb079 When writing to an FTS table, take an exclusive shared-cache lock on the %_segdir table before writing. Otherwise, an xCommit() call may report an SQLITE_LOCKED error.
FossilOrigin-Name: 3cd2da42e9403b1e6243ad53f3f2bbf89c0fb9b0
2013-05-27 10:11:53 +00:00
drh
7c4ac9860c Merge the latest trunk changes into the NGQP branch.
FossilOrigin-Name: 7c8f992c04504a132686ad0652efdff19e43480d
2013-05-24 13:55:23 +00:00
dan
7a7083cf70 Have the "make fulltest" command run the "mmap" permutation test.
FossilOrigin-Name: 82ad373f85aa0a87d24c6dbb2ea7dca8c5aff56a
2013-05-23 10:15:46 +00:00
drh
34e258c942 Cause the mmap_size PRAGMA to immediately change the mmap space if the
database connection is already active.  In particular, reducing mmap_size
will immediately free up process address space.

FossilOrigin-Name: 761177927cb51e4f5e66061ca39cf37edbe8346b
2013-05-23 01:40:53 +00:00
drh
ef86637655 Use the NGQP plan for EXPLAIN QUERY PLAN output. This change causes 207
errors in veryquick.test, many of which are benign.

FossilOrigin-Name: f783e8e6b10de44029c7c5f57e4648a4a677ca1b
2013-05-22 20:49:02 +00:00
drh
a50ef114f4 Improvements to ORDER BY handling in the NGQP. Fix an "exit" mistakenly
left in a test script during the previous check-in.

FossilOrigin-Name: 12c709b4369c7d94d7fb743d0d0da7a9350a3d16
2013-05-22 02:06:59 +00:00
drh
d15cb17174 Enhanced "wheretrace" output in the NGQP solver routine.
FossilOrigin-Name: 04dfb85a2a7025d4b5056b73fa8477691323919f
2013-05-21 19:23:10 +00:00
dan
cf8489fe2f Add extra "PRAGMA mmap_size = N" statements to mmap1.test and mmap2.test.
FossilOrigin-Name: cec0a06c17435d5a35e76b52d6901ecda98f9916
2013-05-17 12:25:00 +00:00
dan
4c5aeecc90 Fix minor test script issues causing releasetest.tcl to fail.
FossilOrigin-Name: d8ded9d8a1052885ce223c70efa55c0dd8b9920e
2013-05-16 19:15:07 +00:00
dan
5b04dc517a Several releasetest.tcl related fixes to test cases. No code changes.
FossilOrigin-Name: e97d744ba1138e6c4c1fc657c32f4391ea7479f1
2013-05-16 14:28:47 +00:00
dan
617dc8602d In sqlite3_close_v2(), do not attempt to roll back a transaction if there exist active statement objects. Any open transaction will be rolled back when the last of these statement objects is finalized.
FossilOrigin-Name: d11e76072a17fe833b87595d9d79f2c4b0b09cb3
2013-05-16 11:57:28 +00:00
dan
11f71d6ae4 Fixes to allow testfixture to be compiled with SQLITE_OMIT_VIRTUAL_TABLE defined.
FossilOrigin-Name: 00231fb0127960d700de3549e34e82f8ec1b5819
2013-05-15 18:34:17 +00:00
drh
f7d2573d7c Merge the shared-cache-fixes branch into trunk.
FossilOrigin-Name: 5cc1cc55d28a73d390d51fdf6f2c026f1cab1d75
2013-05-15 17:08:46 +00:00
dan
d58792e0f0 Extra test for commit [6dae62c4e5].
FossilOrigin-Name: b10b9e758b171b0f514592bba70c3ecd17c8c47f
2013-05-15 16:24:46 +00:00
drh
2ab2d55f01 Fix the sharedA.test module so that it does not attempt to run TCL callbacks
on a different thread from where the interpreter was originally created.

FossilOrigin-Name: 65ff754e3521aa8ee9135d235166cac2a8f57ebd
2013-05-15 16:08:33 +00:00
dan
d5dd3305a1 Do not run sharedA.test if the system is not threadsafe.
FossilOrigin-Name: d484eaf8d6dfaf2c1065b93b2a52a6db91c09fa4
2013-05-15 15:53:52 +00:00
dan
91cf9ba339 Merge latest trunk changes with this branch.
FossilOrigin-Name: 47dd65a890955f333d431e275f3f4d95d34a5ba5
2013-05-15 15:42:14 +00:00
dan
911ce41818 When loading a database schema that contains an index definition that includes a COLLATE clause for which the collation sequence is unavailable, do not assume that that index uses BINARY instead. Fix for [0fc59f908b].
FossilOrigin-Name: 6dae62c4e505a9a1a22c2771ef3e1921407c4748
2013-05-15 15:16:50 +00:00
dan
6743081784 When closing a connection, avoid tripping active cursors belonging to a different shared-cache client. Also, if sqlite3_close() is called while there are still active statements belonging to the connection, return SQLITE_BUSY and do not roll back any active transaction.
FossilOrigin-Name: 6071b7cce067c807e040283fc4b7449dc6eca498
2013-05-15 10:21:50 +00:00
mistachkin
1654256ac8 Merge updates from trunk.
FossilOrigin-Name: 6fbad957259eb8c15eaf7e5657240ae24aaf343e
2013-05-15 08:00:44 +00:00
drh
35cbe7f523 Merge together the fork in this branch.
FossilOrigin-Name: 164e3d4da20cc16d2a04d602b5a8229e0db99d9d
2013-05-14 23:13:41 +00:00
drh
85ec3b63d8 Fix an assert() in unlockBtreeIfUnused() so that it checks for the existance
of an untripped cursor, not for the existance of any cursor at all.

FossilOrigin-Name: a6f851d0fe01d8c8d44a2fe0b716ff7a5194c63b
2013-05-14 23:12:06 +00:00
dan
bf0e57a7d0 Avoid deleting a b-tree "has-content" vector belonging to another shared-cache connection from within sqlite3_close().
FossilOrigin-Name: 93462df78247f5634b9f53752cf80056bbfe9aac
2013-05-14 20:36:31 +00:00
dan
cd7b91a7f1 Candidate fixes for problems revealed by notify2.test. Notify2.test is still failing at this point.
FossilOrigin-Name: ea0428f9b6e63066e7444a2ba2f8c12a2e3ab7e4
2013-05-13 18:23:15 +00:00
drh
b3129fa560 Do not move WHERE clause terms inside OR expressions that are contained
within an ON clause of a LEFT JOIN.  Fix for ticket [f2369304e47167e3e].

FossilOrigin-Name: 1128575d0ab24f7023a0f6e6ce4828b9a09a7c6c
2013-05-09 14:20:11 +00:00