Commit Graph

14304 Commits

Author SHA1 Message Date
drh d83e2831b7 In the fuzzcheck test program, use the progress handler to limit the number
of VDBE cycles to avoid getting stuck if the SQL under test contains an
infinite CTE loop.  Add the --limit-vdbe command-line option.

FossilOrigin-Name: fbf9c4325e98120914bb03bdf351b57643f7a8c8
2015-06-24 14:45:44 +00:00
drh 6cbbdb08f8 Fix the progress handler so that it does not fire too soon during an
sqlite3_step() call other than the first.

FossilOrigin-Name: b41ef5d6db107cac2b1b46a955e63414434ee976
2015-06-24 14:36:27 +00:00
drh c6e956f038 Fix a harmless compiler warning.
FossilOrigin-Name: 3b6fa95eebfa01703d9ef4f530674d17e965c512
2015-06-24 13:32:10 +00:00
drh 94701b048a Rig the fuzzcheck test program so that it times out after 10 seconds in case
of an infinite loop in the test case.

FossilOrigin-Name: 659cfc9d1e9db83db171d621f248a7c2a5b183f6
2015-06-24 13:25:34 +00:00
drh 45143e9d31 Update the database fuzz test cases to cover all recent findings.
FossilOrigin-Name: 47ba7d96b1b91858ef1b592374839bc820719b95
2015-06-24 13:05:18 +00:00
drh 9a64586864 Add the --rebuild object to fuzzcheck.
FossilOrigin-Name: db87664a224f44e01b85570a3f3b6ec1c81d6e0a
2015-06-24 12:44:42 +00:00
drh 9e7804dfd4 Prevent an infinite loop while searching a corrupt freelist.
FossilOrigin-Name: 4e5424fe89eed346f6cf26a05c72694d1eb9f58f
2015-06-24 12:24:03 +00:00
drh 672073a41b Strengthen the new balance_nonroot() code against various corrupt database
problems.

FossilOrigin-Name: 5ba983432069714afebbb2f0ef22d41be52f7a4c
2015-06-24 12:07:40 +00:00
drh 40a3cabe68 Adjustment to a malloc test so that it accepts a narrow range of values to
account for variations in malloc subsystems.

FossilOrigin-Name: e0195070f84f418c46698627a2dcbfcfb94d999c
2015-06-24 10:46:25 +00:00
drh b468ce1256 Remove an invalid NEVER() and add a test case to cover it.
FossilOrigin-Name: 14b73d201509d3c04f760a08d21f3c499f2870a8
2015-06-24 01:07:30 +00:00
drh 9c739e26da Performance optimization on balance_nonroot() and related routines.
2.6% faster overall with a size increase of less than 750 bytes.

FossilOrigin-Name: 25131e7062125e91c2d60ed2cadf134dd7609124
2015-06-24 00:05:45 +00:00
drh 2ec18a3cce Mark some branches as unreachable after the recent change that recognizes
mismatch result set sizes on compound SELECT statements sooner.

FossilOrigin-Name: c8d1f305b6e9dfc36b8e3f4ab92de4457884d903
2015-06-23 23:31:52 +00:00
drh ea82b37302 Testability improvement.
FossilOrigin-Name: eed6a3314518cdab809264284d7680385f0d5d2a
2015-06-23 21:35:28 +00:00
dan 51ef0f57c7 Improve test coverage of fts5.
FossilOrigin-Name: df5ccea80e8f0da83af5e595b539687006085120
2015-06-23 18:47:55 +00:00
drh fe647dc9ee Multiple overflow cells are always adjacent and sequential. Exploit this
invariant for a small size reduction and performance increase and add
assert()s to prove the invariant.

FossilOrigin-Name: f77f2f48f48e374a72b6c054142f7a3ec0b1483c
2015-06-23 18:24:25 +00:00
drh 4f4bf7747a Faster loading of cell pointers into the b.apCell array in balance_nonroot.
FossilOrigin-Name: fda89b0512477f9da09fd0f4e548ed4b13efd49d
2015-06-23 17:09:53 +00:00
drh 008d64c23a Avoid unnecessary cachedCellSize() calls in the cell partition adjustment
phase of balance_nonroot().

FossilOrigin-Name: 6319ee1256b1f7c39dd39a536a39b77b3d10dcac
2015-06-23 16:00:24 +00:00
drh f783893b8d Change pageInsertArray() and pageFreeArray() so that they use the CellArray
object and compute cell sizes as needed, resulting in smaller and faster code.

FossilOrigin-Name: f7f41818119bb7bfbd1f1297d294b32f32769cd3
2015-06-23 15:36:34 +00:00
dan c94a08100b Merge latest trunk changes with this branch. Add tests for columnsize=0.
FossilOrigin-Name: ef44c71a22518727030dd90c0139af8973b05841
2015-06-23 15:06:13 +00:00
drh 4edfdd38fb Improvements to the way balance_nonroot() constructs the b.apCell array of
pointers to cells.

FossilOrigin-Name: ee44bb25b2a88e25ba2afe37cf03ba199692a3a0
2015-06-23 14:49:42 +00:00
drh a2306712f2 Merge the compound SELECT operator fix from trunk.
FossilOrigin-Name: a7be554f4b8534fc237fa4c6defc38fcd4049707
2015-06-23 13:02:10 +00:00
dan 923cadb1ae Test that the left and right sides of a compound SELECT operator have the same number of expressions in the expanded expression list before beginning to generate code.
FossilOrigin-Name: 4df852ce26c95d5d23c83dbe9c59d2c3435acddf
2015-06-23 12:19:55 +00:00
drh 1ffd247c0c Avoid computing cell sizes in balance_nonroot() until they are really needed.
This gives an overall 1.7% performance gain for about 1000 extra bytes of
code space.

FossilOrigin-Name: 43844537e8a372953386663f8177202901ba7566
2015-06-23 02:37:30 +00:00
drh 658873bdb3 Change the way that balance_nonroot() partitions cells between the sibling
pages such that a scan of the cell size array is not required.

FossilOrigin-Name: 168728715156d756ac8c0df45710d054eee027ec
2015-06-22 20:02:04 +00:00
drh 82c4f9b407 Update the fuzztest data using the latest test vectors discovered by AFL.
FossilOrigin-Name: b97f9cf73e503c7285ba3a801e1f932f222d96b2
2015-06-20 14:11:56 +00:00
drh 5f02ab0976 Make sure that the likelihood() function does not mess up generation of
result-set code when it is used (inappropropriately) in a result-set 
expression.

FossilOrigin-Name: 7cdbae625eb029538a693d2bebec465a6f65fb90
2015-06-20 13:18:34 +00:00
drh b11b0efde6 Performance improvements in btreeParseCell() by inlining the varint decoder.
FossilOrigin-Name: 172a864d14fd9f0e3e97d2a13b22222ae0fedd39
2015-06-19 20:31:02 +00:00
drh eeab2c63a9 Fix corner cases involving corrupt varint values in record headers.
FossilOrigin-Name: 3189116b42c5ecef5e30c8b317f4458bbf8b9086
2015-06-19 20:08:39 +00:00
drh 56cb04efc8 Performance improvements in btreeParseCell() by inlining the varint decoder.
FossilOrigin-Name: faab0ed928074f3ec7c25e1a2058414fbd9b013c
2015-06-19 18:24:37 +00:00
drh 5fa605142f Add the MemPage.xParseCell method and provide various implementations
(variations on the former btreeParseCellPtr()) depending on the page type.

FossilOrigin-Name: 41d03d883c4f7ca279eb9dd679f3ab81c8d957d9
2015-06-19 17:19:34 +00:00
drh 25ada07ab4 Make cellSizePtr() a method on the MemPage object, with alternative
implementations depending on the page type.  This results is a small performance
improvement and size reduction.

FossilOrigin-Name: 02f7e9d7d7b93d0b6bbd6cc0d0359b3b741b9931
2015-06-19 15:07:14 +00:00
drh 4307690b5c Further #ifdef changes in speedtest1.c in order to support SQLite back to
version 3.3.9 and perhaps even earlier.

FossilOrigin-Name: 9246eca54adaee571dab0c066afaa604fcf9c44f
2015-06-18 15:26:09 +00:00
drh 606f2344e9 Pervent the likelihood() function from moving ON clause terms of a LEFT JOIN
into the WHERE clause.
Fix for ticket [5f60b11fc8e23490e2]

FossilOrigin-Name: ed96e14adce4a4f94cc6838c46bc97937c4cb72a
2015-06-18 14:32:51 +00:00
drh b3d903ebe5 Show the values of Expr.flag in the AST of ".selecttrace"
FossilOrigin-Name: a84d1004cbee67f2b8ba1fd201e43af49ea67c1b
2015-06-18 14:09:13 +00:00
drh 5995e292e6 Add #ifdefs to some features speedtest1.c so that it compiles with
older versions of SQLite, going back to version 3.5.1.

FossilOrigin-Name: f50dd154d33c58d7a9aa1852fdc362c2e81feef2
2015-06-18 12:37:32 +00:00
drh 14e067455e Performance improvement in sqlite3VdbeMemShallowCopy() for the common
case where the receiver does not require prior resource deallocation.

FossilOrigin-Name: d718ea36dce8cf1684c8bcda457fee87f8f8c4e2
2015-06-17 23:28:03 +00:00
mistachkin 073664de88 Improve spacing and comment style for the shell. No changes to code.
FossilOrigin-Name: 5b547da00d131a494a6b348339af3d91dfa6e3b6
2015-06-17 18:57:37 +00:00
drh 00452196d8 Improved comments on the fuzzcheck.c test program. No changes to code.
FossilOrigin-Name: a7e27d19280048bcfff6d2e796eed72287b9dabe
2015-06-17 18:24:40 +00:00
drh bbe031f9f1 Fix a uninitialized variable use in the command-line shell when the
".open" command is invoked without any arguments.

FossilOrigin-Name: fc4f4d1eccec2e09b5d2e6c4da082204f4d5a016
2015-06-17 17:08:22 +00:00
drh b0870486aa Performance optimization and comment fixes for the LIKE and GLOB operators.
FossilOrigin-Name: c89d772628564a808173f6f73bc1798ec714276b
2015-06-17 13:20:54 +00:00
drh c5b41ac8ee Make getCellInfo() a real function instead of a macro, for a size reduction
and a 0.2% performance gain.

FossilOrigin-Name: 55c393ea14197ae5fa56ebca7a47e7d980511fa7
2015-06-17 02:11:46 +00:00
drh f1aabd6b78 Optimizations to two VDBE accessory routines for a 0.2% performance increase.
FossilOrigin-Name: 66d033b9c9a8c16b9a342be0b325bd85b8487c03
2015-06-17 01:31:28 +00:00
drh 0dd5cdaea5 Ensure that the CREATE TABLE AS statement correctly undoes partial changes
to the sqlite_master table if the SELECT on the right-hand side aborts with
an error.  Fix for ticket [873cae2b6e25b]

FossilOrigin-Name: 400e025e7c61efab71b891743c07a0862e5bb934
2015-06-16 16:39:01 +00:00
drh 07d694c750 Adjust ICU tests to account for recent changes in the official
Unicode definition of whitespace.

FossilOrigin-Name: 0816525386ac51454b7b09a507e45b6a2cb8bf6e
2015-06-15 16:40:38 +00:00
drh 3e24a34324 Fix a harmless comment typo. No code changes.
FossilOrigin-Name: ae6876521819e7a8ce473c8f96617cba35e2156d
2015-06-15 16:09:35 +00:00
drh f5ed7ad63e Fix harmless compiler warnings.
FossilOrigin-Name: b0badb99023e23bef0e2064cec58f2b279af0c0b
2015-06-15 14:43:25 +00:00
drh e4d38707ea Improved detection of database corruption in freeSpace().
FossilOrigin-Name: 29bcb56887f862a1f06677a7b4bfae6475d29732
2015-06-15 12:58:15 +00:00
drh c056e4b257 Comment typo fix. No code changes.
FossilOrigin-Name: 17f185adb960b1fa4faa13cdf685b92a20a52072
2015-06-15 10:49:01 +00:00
drh 74a043607e Omit mutex calls in pcache1 when the mutex is NULL, for a significant
performance improvement.

FossilOrigin-Name: caf8f574e5c64da461c6dfba8a06cf3fb18aaa42
2015-06-13 11:19:47 +00:00
drh 982215a2c5 Avoid unnecessary mutex usage in pcache1, for a significant speedup.
FossilOrigin-Name: dcf4fb8d764611de60afea27cda0a8548ba7ca82
2015-06-13 11:10:55 +00:00