1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00
Commit Graph

588 Commits

Author SHA1 Message Date
mistachkin
f64188910d Fix several harmless compiler warnings. Fix a couple compiler issues with the shell.
FossilOrigin-Name: 8917e9f9a0802cbfb6f33e2ab1c2f98e4df5babd
2013-08-28 01:54:12 +00:00
dan
36e78309de Candidate fix for [d666d600a6].
FossilOrigin-Name: 781592f32c8e1dcd59954c17211cf61349d1c0b1
2013-08-21 12:04:32 +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
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
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
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
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
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
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
drh
2c036cff3d Fix an uninitialized variable detected by valgrind. Unclear whether or not
this should apply to trunk.

FossilOrigin-Name: 19ab4811d542ba781aeb6a4eb3c74642677225e1
2013-06-26 00:34:13 +00:00
drh
4a5acf8e5c Adjustments to testcase() macros for improved testability.
FossilOrigin-Name: 4fbb0c4d26c54aaefbe5397cde2a0b9d2ce3885f
2013-06-18 20:06:23 +00:00
drh
8e23daf372 Fix the Parse.nQueryLoop state variable to work with NGQP.
FossilOrigin-Name: f1cac24f06b9c71cfa472fdcf2da4cd8689a7cc3
2013-06-11 13:30:04 +00:00
drh
f7b5496e8e Many small harmless comment changes. Removal of obsolete comments and
fixing misspelled words.  No changes to code.

FossilOrigin-Name: a0d5cc9315dc6e9ef7dee4c3dfabf4e562d64376
2013-05-28 12:11:54 +00:00
drh
6fdd3d8aa0 The sqlite3ExprCollSeq() function can no longer be called while parse
the schema, so remove the code path inside of sqlite3ExprCollSeq() that
dealt with that case.

FossilOrigin-Name: 867b3e3b29a357f68e48f0898bf323c5dd0575a4
2013-05-15 17:47:12 +00:00
drh
aa87f9a68b Make sure the affinity and datatype of sub-subqueries are initialized
prior to subqueries as the latter relies on the former.

FossilOrigin-Name: 39b4e6ff9316cc78ea88349091e195b8104d1e9e
2013-04-25 00:57:10 +00:00
mistachkin
48864df97d Many spelling fixes in comments. No changes to code.
FossilOrigin-Name: 6f6e2d50941e444ebc83604daddcc034137a05b7
2013-03-21 21:20:32 +00:00
drh
1ccce44937 Fix the ORDER BY optimization with IN constraints when the RHS of the
IN constraint is a descending index.

FossilOrigin-Name: 62316ebaca933f7e5df2018e8360a2b74234f30a
2013-03-12 20:38:51 +00:00
drh
503a686e09 Always use strncmp() rather than memcmp() when comparing strings where one
or other string might be less than the length parameter, since optimized
versions of memcmp() might read past the first difference and in so doing
generate an access violation.

FossilOrigin-Name: d73435587ba7459e2e2c32980d0e17abdeceb4bc
2013-03-01 01:07:17 +00:00
drh
433dccfb52 Rename SQLITE_CONSTRAINT_RAISE to SQLITE_CONSTRAINT_TRIGGER. Put the
extended constraint error codes in alphabetical order.  Add many test cases
for the extended constraint error codes.

FossilOrigin-Name: 3f67437536591a1b0742a25b983707933aaa16d5
2013-02-09 15:37:11 +00:00
drh
d91c1a1768 Add extended error codes for constraint errors.
FossilOrigin-Name: 5461104668a49529577f21df97f6a0e7d8f0c679
2013-02-09 13:58:25 +00:00
drh
3e3f1a5b49 Now supports result sets of the form "TABLE.*" with nested FROM clauses.
FossilOrigin-Name: 4cf5ed7ea198abc32f8118e79490e77f847f08c1
2013-01-03 00:45:56 +00:00
drh
261d8a51e2 Adjustments to the collating-sequence refactoring to facilitate full-coverage
testing and to fix some minor issues found by TH3.

FossilOrigin-Name: cdbfa664839a409589ec7cebfc9111235d2f3b38
2012-12-08 21:36:26 +00:00
drh
580c8c1816 Veryquick passes all tests now.
FossilOrigin-Name: 7b96115e81deab0aa0472839cf787ba3f2fc64a7
2012-12-08 03:34:04 +00:00
drh
d91eba9673 Recognize TK_COLLATE operators that have been transformed into TK_REGISTER.
Skip both TK_COLLATE and TK_AS operators when looking for the top of an
expression.

FossilOrigin-Name: f66c1db2965054f38125218202b6a6ec62d57666
2012-12-08 00:52:14 +00:00
drh
62a66e7034 Do not report missing collating functions while parsing the schema.
Also remove a stray comment.

FossilOrigin-Name: e313edca0472f07e9b872b92120d80b4bc177328
2012-12-07 22:54:41 +00:00
drh
7a66da1395 Many more tests are passing. Only about 100 failures remain in veryquick.
FossilOrigin-Name: f9fa7581c0371fe0feb4e97487741ade18595810
2012-12-07 20:31:11 +00:00
drh
0a8a406e9b Some errors in veryquick resolved. Many more to go.
FossilOrigin-Name: 972443b4eb282d45507da06c75e2cd46dd72326b
2012-12-07 18:38:16 +00:00
drh
4b17cf5855 Veryquick now row to completion without segfaulting or asserting. But there
are still lots of errors.

FossilOrigin-Name: 7fafab12e4c0c832c421975f8329c3214403d281
2012-12-07 14:02:14 +00:00
drh
ae80ddea9f Remove the Expr.pColl field and compute the collating sequence as it is needed.
This fixes the test script "shared9.test", though there is still a memory leak.
And there are other problems.  Consider this a work-in-progress.

FossilOrigin-Name: fd011cb22f2d899d94ec7ce22641d7a8f5e19972
2012-12-06 21:16:43 +00:00
drh
6e83a57f43 Proposed fix for ticket [bfbf38e5e9].
FossilOrigin-Name: 18ae030dad30303129186738c27cdc4ba06362b9
2012-11-02 18:48:49 +00:00
drh
e8abb4cad3 Fix an out-of-date comment. No changes to code.
FossilOrigin-Name: 10cc12b16b2f1ae4e6b3a84cef5a44564d282e9c
2012-11-02 18:24:57 +00:00
drh
21172c4cc0 Add an optimization that attempts to run a subquery as a coroutine rather
than manifesting it into a temporary table.

FossilOrigin-Name: 7af3acbbd49a2114fcdada9ec907c68ba9b053bd
2012-10-30 00:29:07 +00:00
dan
41fb5cd103 Shared-cache mode fixes for views and virtual tables.
FossilOrigin-Name: 2b370dea704b59262c604af0efcef5660b194454
2012-10-04 19:33:00 +00:00
drh
7e5418e4a4 Add more bits to the bit vector that is used to disable optimizations for
built-in test.  Add specific bit patterns to disable ORDER BY using an
index in general and for joins.  Use macros to test for bits in the 
disabled-optimization bit vector, in order to make the code clearer.

FossilOrigin-Name: d2fcba1e143beca8c45724d2108870657c269e17
2012-09-27 15:05:54 +00:00
drh
e8e4af7697 Consolidate more of the DISTINCT processing logic into a single spot in the
code.  Reduce the number of OP_Column operations needed to perform a
WHERE_DISTINCT_ORDERED.

FossilOrigin-Name: 79e922f7ae29bbe06d639d648fbd72523cf9a28e
2012-09-21 00:04:28 +00:00
drh
dbaee5e342 Enhance IN processing to allow efficient use of indices with numeric affinities.
Add test cases for IN processing that would have spotted the error in the
[2be661a48023f4] check-in.

FossilOrigin-Name: 5ded9b68388f4024425c11f09b03529ac89454ce
2012-09-18 19:29:06 +00:00
drh
d4305ca61c Enhancements to the comments on sqlite3FindInIndex(). No code changes.
FossilOrigin-Name: b1a4c394995eb90b3fb43ab204704bda03799303
2012-09-18 17:08:33 +00:00
drh
e1a022e48b Make sure the KeyInfo.aSortOrder array is always allocated so that we never
have to test for KeyInfo.aSortOrder==0 in performance-critical loops.

FossilOrigin-Name: 45793f0b844fee7445bc9269b403f89a58f77150
2012-09-17 17:16:53 +00:00
drh
fb0a60819b Merge the nested aggregate query enhancements into trunk.
FossilOrigin-Name: d4cd6017c9875947a05b1dc36538d4272fb18739
2012-08-24 01:07:52 +00:00
drh
ed551b95a4 Add test cases and fix bugs associated with the previous check-in
enhancements to nested aggregate subquery processing.

FossilOrigin-Name: 00b1dc71be4c3420730b5f7840af824ea86165e7
2012-08-23 19:46:11 +00:00
drh
030796df8d Further improvements to the processing of nested aggregate queries.
FossilOrigin-Name: 3c3ffa901f5ce8a523028ff15563ce3e0f55a641
2012-08-23 16:18:10 +00:00
drh
2b596da8b7 Refactor field names in the SelectDest object to make them distinct and easier
to grep for.

FossilOrigin-Name: b589f1efb3907a68058bf2ee981dca126d083e83
2012-07-23 21:43:19 +00:00
drh
bbabe19767 Mark and always-true conditional as such. Add the fuzz-oss1.test test module.
FossilOrigin-Name: bdc01fd0fa0c15efbb32bf18527c71e3e4dc48ed
2012-05-21 21:20:57 +00:00
drh
3a8c4be7d4 Candidate fix for the nested aggregate query problem of ticket
[c2ad16f997ee9c8e].

FossilOrigin-Name: f3dd1fafd4718558de1f06139419a8c560d727f5
2012-05-21 20:13:39 +00:00
drh
d5a336ef58 Fix harmless compiler warnings (unused parameter warnings) in the aggregate
query analyzer.

FossilOrigin-Name: 2d43562084316ec180a4c2cfc3fee08d58432204
2012-04-19 15:49:19 +00:00
drh
374fdce485 Improved handling of aggregate subqueries within an aggregate query.
FossilOrigin-Name: 430bb59d798286a86c351de92c429345f016b3f0
2012-04-17 16:38:53 +00:00
drh
5fb52caadf Do more aggressive optimization of the AND operator where one side or the
other is always false.

FossilOrigin-Name: f9a7e179cbbeeab5e57bbf392bef89750215546b
2012-03-31 02:34:35 +00:00
drh
4e245a4c35 Fix compiler warnings on GCC and MSVC and fix a C89-ism that
broke the build for MSVC.

FossilOrigin-Name: b451c0f97f0abe78ebe6c62ff489ec1ad8a1f767
2012-03-30 00:00:36 +00:00