Commit Graph

12705 Commits

Author SHA1 Message Date
drh
d15f87ecfd Fix a bug in the whereRangeSkipScanEst() procedure (added by
check-in [d09ca6d5efad3e4cfa]) where it fails to consider the possibility
of a ROWID column when computing the affinity of a table column.

FossilOrigin-Name: 6aea2258dd7d3967900cefe4cd0af48a7ee7e169
2014-07-24 22:41:20 +00:00
drh
b12879fd1a Avoid trying to allocation zero bytes when analyzing a unique non-null index.
FossilOrigin-Name: 85e2badeeb7f7599eb6fd35512f9bd524f0b1b3f
2014-07-24 20:25:16 +00:00
drh
9d793325b0 Avoid change tests when analyzing single-column unique indexes after
getting past the initial NULL entries.

FossilOrigin-Name: 4690e99c07024f40fafba1db8e4487b287b788a9
2014-07-24 19:54:20 +00:00
drh
2bd2c29a95 Merge all recent trunk changes into the threads branch.
FossilOrigin-Name: 770685892c8f09b9cddb2fbb2877cfb291e19425
2014-07-24 16:54:28 +00:00
drh
ba5b09319e Add the readfile(FILENAME) and writefile(FILENAME,CONTENT) SQL functions to
the command-line shell.

FossilOrigin-Name: fb1048cb2b613a0dbfe625a5df05e9dcd736a433
2014-07-24 12:39:59 +00:00
drh
c4747f2314 Add support for hexadecimal integer literals in the parser.
FossilOrigin-Name: f8f79f28785db716b10c3bc9d6652b98253fd125
2014-07-24 12:19:41 +00:00
drh
6976c2123b In the command-line shell, in CSV output mode, terminate rows with CRNL but
do not expand NL characters in data into CRNL.  Provide the extra -newline
command-line option and the extra argument to .separator to designate an
alternative newline character sequence for CSV output.

FossilOrigin-Name: 16c8ce10e1530731441e6c4538691b71564684ed
2014-07-24 12:09:47 +00:00
drh
dbd9486d5b Add experimental "costmult" logic. Only enabled when compiled with
-DSQLITE_ENABLE_COSTMULT.

FossilOrigin-Name: 729ece40885ed7f52c5981364833fc62281a388b
2014-07-23 23:57:42 +00:00
drh
6861b8a13f Ugh. Consecutive UNIQUE index entries are only distinct if the index is
on NOT NULL columns.  So the previous version was not quite right.  This
check-in fixes the problem.

FossilOrigin-Name: 30033f965030a015fad15e532bcaba1314c8cc0f
2014-07-23 19:37:21 +00:00
mistachkin
3b9fab1cb9 Enhancements to the hex literal tests.
FossilOrigin-Name: a3cc027fa7ca41da23ecd0770a075a48416af020
2014-07-23 19:04:25 +00:00
drh
553818a0aa Improve the performance of the ANALYZE command by taking advantage of the
fact that every row of a UNIQUE index is distinct.

FossilOrigin-Name: 3e1e79e1335f7ad33cd35f384f2a063c4aa2253b
2014-07-23 18:36:55 +00:00
drh
11d451eb8a Updated documentation on sqlite3_temp_directory. No changes to code.
FossilOrigin-Name: e6225a7bf77a700b318563b1a854b4b3a9e031e1
2014-07-23 15:51:29 +00:00
drh
1b7ddc5915 Remove a surplus function prototype. #ifdef code that is not used when
hex integers are omitted at compile time.

FossilOrigin-Name: a5b383e077e4b277a65920f7cc202f32f07aa9ee
2014-07-23 14:52:05 +00:00
drh
9296c18a50 Change the hex literal processing so that only the SQL parser understands
hex literals.  Casting and coercing string literals into numeric values does
not understand hexadecimal integers.  This preserves backwards compatibility.
Also:  Throw an error on any hex literal that is too big to fit into 64 bits.

FossilOrigin-Name: 6c6f0de59bf96b79c8ace8c9bfe48c7a6a306a50
2014-07-23 13:40:49 +00:00
drh
5ec659cfcb Casting hex literals directly from string to float always results in a
positive number.

FossilOrigin-Name: 4b86ccdf4f4eb4339a5706e10ad24f01b6c3939e
2014-07-23 02:07:11 +00:00
drh
d35588dc21 Reformatting a few test cases for clarity.
FossilOrigin-Name: 7e1bbacb11a4689b69856450125cae3d045307af
2014-07-23 01:59:47 +00:00
drh
fce4da1b73 Test cases for hex literals.
FossilOrigin-Name: 19054339c47448bcdfd1f7be35daa3826c409077
2014-07-23 01:56:32 +00:00
drh
28e048c618 Add support for parsing C-style hexadecimal literals.
FossilOrigin-Name: 34a1f38b7a23c64f5c6e5b34c19a20480be53961
2014-07-23 01:26:51 +00:00
drh
0f65cce825 When running ANALYZE, it is not necessary to check the right-most key column
for changes since that column will always change if none of the previous
columns have.

FossilOrigin-Name: 48f40861db4fbd10725a2b8b606d44fe16d5bd27
2014-07-22 22:46:54 +00:00
drh
3526319b48 Add the OP_ReopenIdx opcode that works like OP_OpenRead except that it becomes
a no-op if the cursor is already open on the same index.  Update the
OR-optimization logic to make use of OP_ReopenIdx in order to avoid
unnecessary cursor open requests sent to the B-Tree layer.

FossilOrigin-Name: 77f412caf0192d3e7fecb377d6d72123d8b64424
2014-07-22 20:02:19 +00:00
drh
a45fdc7b1e The optimization of check-in [b67a6e33f2] does not work (it generates
incorrect VDBE code) if an OR term is AND-ed with a constant expression.
So back that optimization out and add a test case to make sure it does not
get added back in.

FossilOrigin-Name: eed754fe93644f4df082eac0c0a7ffc5c78ccd10
2014-07-22 19:14:42 +00:00
drh
f5d87f77e2 Fix the index name for the shadow tables in the spellfix1 extension so that
multiple instances of the spellfix1 virtual table can each have their own
index.

FossilOrigin-Name: 438c348a40383796a710499e4e1b7a6b08f75778
2014-07-22 16:00:49 +00:00
drh
d08b27988c Correction: The maximum SQLITE_MAX_ATTACHED value to avoid overflowing a
signed 8-bit integer is 125, not 127.

FossilOrigin-Name: 48e378029528dac33d29866016128d236a7995d9
2014-07-22 15:33:31 +00:00
drh
25df48d967 Enhance the sqlite_stat1.stat parsing to allow additional text parameters
at the end.  Unrecognized parameters are silently ignored.

FossilOrigin-Name: ca2a5a2c770fa94cd8db1b1b241ede058a7c58e2
2014-07-22 14:58:12 +00:00
drh
358406fc57 Expire prepared statements after running ANALYZE.
FossilOrigin-Name: b083a961f8ac3a6158e822574d73cd63e3103b09
2014-07-22 14:42:16 +00:00
drh
83a305f20e Enhance the comment on whereLoopAddBtree(). No changes to code.
FossilOrigin-Name: b22dd165da227a52d88b17a91e80a1701dce61ad
2014-07-22 12:05:32 +00:00
drh
53ad7e48ab For the OR-optimization, avoid generating OP_OpenRead opcodes that reopen
exactly the same index.

FossilOrigin-Name: b67a6e33f23ce5f5d9a545fa9d6700a7ed636901
2014-07-22 00:40:45 +00:00
drh
215c0c82fa Limit the maximum SQLITE_MAX_ATTACHED to 127, since a signed character
is sometimes used to store the database index.

FossilOrigin-Name: f1c76c7c4c7d16855db60d16e23ecdf8d7ca862a
2014-07-21 20:07:17 +00:00
drh
a7ab6d8165 Allow the SQLITE_MAX_ATTACHED compile-time option to be larger than 62. The
default limit on the number of attached databases remains 10.

FossilOrigin-Name: 1a817ae2f35fa0396148dda2782cd4f919bf5c6f
2014-07-21 15:44:39 +00:00
dan
857745c089 Update the sqlite3_stmt_busy() function so that it correctly returns true for "ROLLBACK" statements that have been stepped but not yet reset.
FossilOrigin-Name: 61cee3c0678f5abd9131a29ab946a5e71f55643e
2014-07-19 17:57:10 +00:00
drh
33af1a6faa Fix harmless compiler warnings in the showdb and showwal tools and in
the unicode tokenizer of FTS3.

FossilOrigin-Name: 574cc8eb1448cff67390f2e16cc9b7c3ddd4658b
2014-07-19 17:49:40 +00:00
mistachkin
86ac612e8a Fix some harmess compiler warnings in the FTS3 Unicode module.
FossilOrigin-Name: c01caea5d6ad7a570628b85fb3056ac955ff03dd
2014-07-19 15:44:29 +00:00
mistachkin
ef60703e8f Fix warnings related to having a 64-bit size_t.
FossilOrigin-Name: 29ac9336dba2b62d13315cecfc5c4a74cc54087a
2014-07-19 15:40:39 +00:00
mistachkin
35683976a4 Fix warnings caused by the previous commit.
FossilOrigin-Name: 89634a419d0c1ef899d0591c7c6ab9290bf665d2
2014-07-19 15:30:01 +00:00
mistachkin
0461cc4795 Fix harmless compiler warnings for MSVC in the showdb/showwal command line tools.
FossilOrigin-Name: 6dc7b2f119eb92da17c9e914bdad30a9ceaebdb5
2014-07-18 21:16:37 +00:00
mistachkin
3a046c6c31 Update clean targets with the recently added command-line tools.
FossilOrigin-Name: 2beefa68c0c53f663321bebf0ac06f6c936be63f
2014-07-18 21:02:54 +00:00
drh
a6f5972c75 Improved documentation for checkpoints and the busy handler. No changes
to code.

FossilOrigin-Name: ca92c0240681b199c4b8ecc557792b8aea71692d
2014-07-18 19:06:39 +00:00
drh
71607c77c8 SQLite has long accepted some unadvertised and non-standard join syntax.
Add a test to ensure that future versions continue to accept this non-standard
syntax, to avoid breaking legacy applications that use the undefined syntax.

FossilOrigin-Name: 824dde7fc48dbca6d6c956c4eb79bbfa2d139ee5
2014-07-18 17:39:48 +00:00
drh
56f674c8a0 Improvements to the ".fullschema" command in the command-line shell.
FossilOrigin-Name: fa80c64caa573297bf43cb5b11d9e7db58567200
2014-07-18 14:43:29 +00:00
mistachkin
166c373779 Fix harmless compiler warnings in the fts3view utility program that can occur with MSVC.
FossilOrigin-Name: 1cec1e030035e5253fb7ebbdfe5c1a3029e4e29b
2014-07-07 18:03:38 +00:00
mistachkin
de54527fb2 Add the fts3view utility program to the MSVC makefile.
FossilOrigin-Name: b04751bd59fed513ab615e7f368fe25c64b3607c
2014-07-07 17:57:50 +00:00
drh
42d3d37ad1 Fix a division-by-zero error in the fts3view utility program. Add the
fts3view utility program to the "main.mk" makefile.

FossilOrigin-Name: 64f02699b4bd747e4c2f0debf72d37ec275137d8
2014-07-07 16:07:43 +00:00
dan
2eaf03d72b Change fts3/4 so that the "unicode61" is included in builds by default. It may now be excluded by defining SQLITE_DISABLE_FTS3_UNICODE.
FossilOrigin-Name: 0cc0230ae9cfc9760fd8ef2c25e82576b052dbeb
2014-07-03 12:18:22 +00:00
dan
43fbe5e2c9 Add another test to verify that SQLite is using stat4 data for composite primary keys on WITHOUT ROWID tables.
FossilOrigin-Name: 0df1fe72f8271abc86cd552027d938c910f90967
2014-07-01 15:22:11 +00:00
dan
39caccf83d Ensure that all fields are loaded from the stat4 table for records that correspond to indexes on WITHOUT ROWID tables with composite primary keys.
FossilOrigin-Name: 21981e35062cc6b30e9576786cbf55265a7a4d41
2014-07-01 11:54:02 +00:00
drh
6614181610 Merge the latest trunk changes into the threads branch.
FossilOrigin-Name: ae23a65eb1547fbe8b86ab71477071990a22d31d
2014-06-30 20:25:03 +00:00
drh
49e77b1925 Bump the version number to 3.8.6.
FossilOrigin-Name: f925e9baafea625f63105f8013abb3807b418379
2014-06-30 19:28:57 +00:00
drh
855f63908f Attempt to use STAT4 information to estimate the selectivity of WHERE clause
terms when using the skip-scan optimization.

FossilOrigin-Name: d09ca6d5efad3e4cfa93a4dc711e6ba6079d4b4b
2014-06-30 19:07:58 +00:00
drh
c7de8267a8 Fix for ticket [b2fa5424e6fcb15]: Better define the format of the sqlite_stat4
file for WITHOUT ROWID tables and make sure the ANALYZE command generates a
file in the appropriate format.  Use the sqlite_stat4 data to enable the use
of WHERE terms that cover all indexed columns plus some prefix of columns
in the primary key.

FossilOrigin-Name: bc2de8095fa9c385db0adf22ca55b0298a33c284
2014-06-30 18:57:53 +00:00
dan
fd984b8114 Fix a problem in where.c with using the stat4 sample data of an index on a WITHOUT ROWID table.
FossilOrigin-Name: 053a210e3169732c58f84cb54c9b6f6df3a8f4ea
2014-06-30 18:02:20 +00:00