Commit Graph

3465 Commits

Author SHA1 Message Date
drh
0e9365ced3 Log all error from close() in os_unix.c to sqlite3_log() but do not attempt to
report errors back up to the application.  Update the unix error logging to
put the most important information earlier in the message.

FossilOrigin-Name: 7b6e30e6a712311d4ef275253b085b85e6e17116
2011-03-02 02:08:13 +00:00
drh
5b6c545ba1 When a stale schema-cookie is seen, expire only the one statement that
encountered the bad cookie, not every statement on the database 
connection.  Ticket [b72787b1a7cea1f]

FossilOrigin-Name: 1bca0a7e198391202fd2bc1650c0a62028a9aaa5
2011-02-22 03:34:56 +00:00
dan
ef7075de1f Fix a problem with "EXPLAIN QUERY PLAN SELECT count(*) FROM tbl".
FossilOrigin-Name: 9f9f32882501ac9b6e60f81195a64bdbf6e4497b
2011-02-21 17:49:49 +00:00
dan
e18d495315 Have os_unix.c call sqlite3_log() following errors in certain system calls.
FossilOrigin-Name: 01076528a43b61ae20ef6969b7d326de9b5313e4
2011-02-21 11:46:24 +00:00
shaneh
ae23162e52 Add "do_not_use_codec" logic to some of the TCL based test cases that read/write directly to the DB.
FossilOrigin-Name: edd27669f3d0ec8c878267fb5cae9b73fcdfd2b8
2011-02-16 01:23:50 +00:00
shaneh
54215638aa Skip some tests in capi3e.test when compiled with SQLITE_OMIT_UTF16.
FossilOrigin-Name: b04304b9677b84c4bfca011bf7fa0488e7d56d08
2011-02-14 03:49:40 +00:00
shaneh
a91491e5c7 Skip flattening if subquery has LIMIT and outer query is DISTINCT. Fix for ticket 752e1646fc.
FossilOrigin-Name: 559739998833643f589fa76d8360080691f83c18
2011-02-11 20:52:20 +00:00
drh
ac6de304e5 Allow an index paired with a NOT NULL constraint to be used for sorting
under the condition that the index be treated as a non-unique index.

FossilOrigin-Name: d78949fc93077e1aa7f05cf9f7e947727939cc96
2011-02-11 03:56:11 +00:00
drh
3772206769 Refactor the cost function in the query planner. Give extra cost (thus
reduce likelihood of selection) to full table scans.

FossilOrigin-Name: 878da276ebf643b716ddd650d4d0ca3595fe5bf2
2011-02-10 00:08:47 +00:00
dan
ecac670a8b Do not report corruption if the the db size header field is greater than the file size on disk unless the two change-counter header fields are identical. Fix for ticket [89b8c9ac54].
FossilOrigin-Name: 00c4596f0b270120848ab8d06dcdec7813a9a315
2011-02-09 18:19:20 +00:00
dan
28f9b0b5fd Fix some test cases in walfault.test. Extend one test case to restore code coverage. Add wal5.test to the "coverage-wal" permutation.
FossilOrigin-Name: f83b07ace340c9dd3e0cbe3cd3c106db003b0bd4
2011-02-07 16:24:39 +00:00
dan
9c5e3680df Change blocking-checkpoint tests so that they run once using "PRAGMA wal_checkpoint" and once using calls to sqlite3_wal_checkpoint_v2(). Also fix edge cases surrounding the output variables set by wal_checkpoint_v2().
FossilOrigin-Name: 5a4b6652cf3780ffed6fe0fe669e8090b0b71e81
2011-02-07 15:12:12 +00:00
dan
2fe88b7ca4 Ensure fts4aux can handle a table name in single or double quotes as a constructor argument.
FossilOrigin-Name: 929d62e496bb36a3ee0e19ec4609329d79aaeddc
2011-02-05 15:47:12 +00:00
dan
bb7e77c758 Add test cases for fts4aux. Fix a bug affecting fts3 tables with multiple columns.
FossilOrigin-Name: dc511e60a65232a7087e12ff40b63506cf37a634
2011-02-05 14:37:57 +00:00
dan
4c600ac389 Change fts4aux to (additionally) report on term frequency in individual columns of an fts table.
FossilOrigin-Name: 3996f92a9aca9ac2628be003eca83c8f954c71de
2011-02-04 18:56:25 +00:00
drh
47fe5533a6 Merge the stat2 query planner enhancements into the trunk.
FossilOrigin-Name: 499edcbc8ab70fcf35431d4e672c68dbcb6c5aad
2011-02-04 06:36:44 +00:00
drh
9ab724f196 If a deferred foreign key constraint fails on a statement that is not part
of a larger transation, make sure that the statement fully ends so that
subsequent invocations of the same statement will not pass the constraint
because they think the transaction is not closed.  This is a merge of
the deferred-fk-quirk branch together with a test case.

FossilOrigin-Name: 2f94d4623f9aae1b5bc7041bd85f4e3a7462c60e
2011-02-04 05:47:51 +00:00
drh
0097eb3942 Fix the ATTACH command so that the filename argument can be any expression
and so that if authorizer callback gets a NULL pointer for the filename
if the filename argument is anything other than a string literal.
Ticket [9013e13dba5b58c7]

FossilOrigin-Name: e64e1453a9c204d93de1af92dc0b3ca26762b024
2011-02-04 00:51:16 +00:00
dan
767f9a8f9e Extra tests for fts4 compress/uncompress hooks. Fix some minor problems with the same.
FossilOrigin-Name: 80225abe79b0a7723b922ec129954438af95855a
2011-02-03 12:48:17 +00:00
dan
16690ed167 Extra tests for the fts4aux module.
FossilOrigin-Name: cfc475690d85ea7e3547424289d9837f46ab7ef4
2011-02-03 10:56:00 +00:00
drh
e4737d203b Fix a superlock test case to conform to the new wal_checkpoint returns.
FossilOrigin-Name: 8bf2d51b6a50da84cf6b0d2bd78e633d6810160b
2011-02-03 01:26:32 +00:00
dan
d42892ebaf Fix minor problems with the output of "PRAGMA wal_checkpoint". In both code and tests.
FossilOrigin-Name: aef61036b31963e4c3ff4e8acf8c1734dc9394af
2011-02-02 19:17:39 +00:00
dan
20d5f354e9 Optimize handling of equality and range constraints on the "term" column of an fts4aux table.
FossilOrigin-Name: 386701ded2bcee5309ec9f285d94e6eb1eade193
2011-02-02 17:30:43 +00:00
drh
87fa53ee8d Merge in the blocking-checkpoint enhancement, including the new
sqlite3_wal_checkpoint_v2() interface and the
PRAGMA wal_checkpoint(full) statement.

FossilOrigin-Name: bac7342c368a7c4f5f2878e08d9581dcbf57dd58
2011-02-02 16:34:08 +00:00
dan
0bfda98155 Fix a case in fts4 where a corrupt %_stat table could lead to a crash.
FossilOrigin-Name: 4ade96ce974244fc34bb97713d3cba10e3d33056
2011-02-01 17:55:48 +00:00
dan
a240fd01b6 Add virtual table module "fts4aux", used to inspect the full-text index of an fts4 table directly. Also add the "compress" and "uncompress" fts4 options.
FossilOrigin-Name: b010ddcc52889160af2183a33c5f483bb0ae91b9
2011-02-01 16:34:32 +00:00
dan
1af5e9a494 Add test script pagerfault3.test. No changes to code or existing tests.
FossilOrigin-Name: 682fe41efd3578e8c9abc7138b61f361c3adbe95
2011-01-28 16:45:42 +00:00
drh
40ad34c608 Reactivate the analyze5.test script.
FossilOrigin-Name: a2a9f6401c927f6259cda3ba35219cabef24e84d
2011-01-28 03:13:58 +00:00
drh
083310dfcc Change the weighting of binary searches on tables to 1/10th the cost of a
search on an index.  Change the assumed reduction in search space from a
indexed range constraint from 1/3rd to 1/4th.  Do not let the estimated 
number of rows drop below 1.

FossilOrigin-Name: 4847c6cb71423248b186ab7842b97c83e2f5fefd
2011-01-28 01:57:41 +00:00
dan
b69577d3b8 Update test file mutex1.test to account for [e3b500fb5d].
FossilOrigin-Name: c86e46f4fd8f485fa1d34c70e17ea3aa1b334ce3
2011-01-26 15:23:22 +00:00
dan
6d4fb833b7 Update mutex1.test so that it works with the memsubsys1 permutation (pagecache memory). Change a few instances of SQLITE_MUTEX_STATIC_LRU2 in comments and test code to STATIC_PMEM.
FossilOrigin-Name: 456bd5c63b41bae8e389df81e318b830aa314000
2011-01-26 07:25:32 +00:00
dan
7cfbeb7fb5 Changes to exclusive2.test to make it more deterministic.
FossilOrigin-Name: 84b0c2bc7125623be2ee526b5ca75e1b72debb93
2011-01-26 06:13:14 +00:00
dan
ff07ccadee Fix a problem in memsubsys1.test. Modifications to test code only.
FossilOrigin-Name: 7ef3f7cba768ef0c4782a6c80424833b4df6a059
2011-01-25 09:54:53 +00:00
drh
fc4491366b Restructuring and generalizing analyze5.test. The whole script is
currently disabled and will need to be reenabled prior to merging with trunk.

FossilOrigin-Name: 31fcc7067bd76da4bf19232811b90cf8b76eed74
2011-01-24 17:46:35 +00:00
dan
27381bd519 Modify the trace callback mechanism so that SQL commands executed from within virtual table or user function callbacks are passed to the trace callback without parameter expansion and enclosed in SQL comments.
FossilOrigin-Name: a764915b87564fa91ee68e9b1f41394ce0f1fc7e
2011-01-22 13:32:29 +00:00
drh
5ac0607169 Adjustments to the result row estimator for the IN operator so that it gives
the same estimates as the equivalent OR operator.  Test cases for the same.

FossilOrigin-Name: c82cb9c028b3ba5463ae50c30196dbf157a7a305
2011-01-21 18:18:13 +00:00
dan
f3aef49cbd Add options to test command [do_faultsim_test] to support testing VFS implementations.
FossilOrigin-Name: 503ad889da675b3dd83da7338e2902e42f69acac
2011-01-21 15:52:02 +00:00
drh
3851b74ae1 Update ANALYZE test cases to check out the use of histograms for equality
constraints.

FossilOrigin-Name: c7b59afaf0c0bf85dbaf0a122cc8d65fca93680f
2011-01-20 20:36:13 +00:00
drh
82759754ce Use histogram data to improve the row-count estimates on equality constraints.
FossilOrigin-Name: 6bfc5c69eb22938972bbf4e60179952dc215f770
2011-01-20 16:52:09 +00:00
drh
e847d3247f The first of a planned series of enhancements to the query planner that
enable it to make better use of sqlite_stat2 histograms when the table
has many repeated values.

FossilOrigin-Name: 2cd374cd23fa2fd38f49090d6eeb9b1e521d51d5
2011-01-20 02:56:37 +00:00
drh
986d3b95bb Get all test cases working with the mutex-free-pcache implementation.
FossilOrigin-Name: 2dc98d29995bef51108e99aa8f7a56427cf9e1d7
2011-01-18 16:13:27 +00:00
drh
602acb4871 Add the SQLITE_OMIT_AUTORESET compile-time option which if enabled causes
the sqlite3_step() routine to return SQLITE_MISUSE if it is called after
it has previously returned anything other than SQLITE_ROW, SQLITE_BUSY, or
SQLITE_LOCKED.

FossilOrigin-Name: 053ce76deb356d31358454507ba94947142e20ca
2011-01-17 17:42:37 +00:00
drh
d40d7ec78b Make sure the change-counter and SQLite-version fields of the header are
set correctly even when doing a VACUUM with locking_mode=EXCLUSIVE.
Ticket [5d863f876ee9561b].

FossilOrigin-Name: 04fa1e16905183b948ee6456675799a873d5f97d
2011-01-16 00:56:19 +00:00
drh
104a7bba8c Increment the change counter and update the SQLite version number whenever
page 1 is added to the WAL.  Ticket [5d863f876ee9561b9]

FossilOrigin-Name: c1e0d09cd3f5feae123468a35f147021d839641c
2011-01-15 17:12:59 +00:00
dan
39210bdaa6 Add a test case demonstrating the problem described by ticket [5d863f876e].
FossilOrigin-Name: af54963f0fa0afafbc2d0847f30543c041b182ec
2011-01-15 16:52:10 +00:00
drh
94e7bd55bd Fix comments, including some documentation comments, in the page cache
logic.  No code changes.

FossilOrigin-Name: c80e9c1a0dc0e501b209874e147e1cb1348cb4a4
2011-01-14 15:17:55 +00:00
dan
47e909bb15 Fix a bug in test code (test_vfs.c).
FossilOrigin-Name: 772a3845f8ef5cd3131992c45f6ce607977820f3
2011-01-14 11:51:28 +00:00
drh
5b3696e8a6 Fix a typo on the sqlite3_open_v2() documentation.
FossilOrigin-Name: b0add45abc9929c5b8d1124879bc3e8acf2ab7c7
2011-01-13 16:10:58 +00:00
dan
a8ab60c648 Fix a couple of crashes in fts3 that can occur if the database contents are inconsistent.
FossilOrigin-Name: 811e12cddfb3246c6cf3d5085bd9b72b12e05550
2011-01-13 11:20:04 +00:00
dan
86596e552e Fix a segfault that can occur in matchinfo if an fts4 table contains mostly zero-length documents. Specifically, if the table contains more rows than it does bytes of text.
FossilOrigin-Name: fe9047668eaaf76e7aa1ef1f32dec7c7c4226e45
2011-01-13 10:58:26 +00:00