drh
336a5300de
Get rid of the special RowSet processing in where.c and move that into
...
clients. Added the WHERE_DUPLICATES_OK option to eliminate an unnecessary
RowSet during DELETE with a WHERE clause containing ORs. (CVS 6546)
FossilOrigin-Name: 98606bee9e41b8969fb639fc43864e230185ca43
2009-04-24 15:46:21 +00:00
drh
46619d6787
Make sure that the optimizer realizes that an "x IS NULL" contraint does not
...
necessarily give a single-row result even on a UNIQUE index. Ticket #3824 . (CVS 6545)
FossilOrigin-Name: 207335fdbf992a2f5bc5982b3163a38016ba1b21
2009-04-24 14:51:42 +00:00
drh
ceea33217b
Rework the column-cache mechanism to be more robust (and more correct).
...
The column-alias cache is currently disabled, (CVS 6538)
FossilOrigin-Name: dd4d67a67454a3ff13c286a2a8360c5f0432c91d
2009-04-23 13:22:42 +00:00
drh
044925be0b
Eliminate the OP_VRowid opcode. The regular OP_Rowid now work for both
...
regular and virtual tables. (CVS 6537)
FossilOrigin-Name: ecbef45011f1f98d940b2d3492941213d9f04172
2009-04-22 17:15:02 +00:00
drh
6149526c25
Change the OP_Rowid opcode so that a deferred OP_Seek is pending, it simply
...
pulls the rowid from the deferred seek target and does not actually move
the cursor or do a seek. Other where.c cleanups. (CVS 6536)
FossilOrigin-Name: 1c508a99822caa383e7e24b5d09a9bddd2ee3a00
2009-04-22 15:32:59 +00:00
drh
1b26c7ccfa
Remove the rowhash object from the code. Rowset now fills its role. (CVS 6535)
...
FossilOrigin-Name: e963bed0fe3ce5fa32f04b930e5ed0956dc2aa47
2009-04-22 02:15:47 +00:00
danielk1977
732dc5526b
Fix a segfault that followed a malloc failure introduced by (6527). (CVS 6532)
...
FossilOrigin-Name: 08e71b114087cfddd36c066265982172fcb41c9a
2009-04-21 17:23:04 +00:00
danielk1977
1d46146b58
Attempt to optimize virtual table queries with 'OR' expressions in the WHERE clause. (CVS 6527)
...
FossilOrigin-Name: f61e4cd93682fd98bea2a71d346f9eaa68454390
2009-04-21 09:02:45 +00:00
drh
85799a4715
Only enable WHERE-tracing when both TEST and DEBUG are enabled. (CVS 6463)
...
FossilOrigin-Name: 55b93649258204797f56a58322cf31b564469633
2009-04-07 13:48:11 +00:00
drh
081a166489
Always enable WHERE-tracing on a test build.
...
Oops - accidentally included a debugging change to pragma.c in
this check-in. The real fix for the pragma problem is in the
following checking. (CVS 6458)
FossilOrigin-Name: 567cf90b038a37da93d02954ef8f9f435dcc9a38
2009-04-07 00:43:28 +00:00
drh
69a442ef1f
Make sure the reverse_unordered_selects pragma works even on unindexed
...
tables that are queried without a WHERE clause (CVS 6453)
FossilOrigin-Name: d8c6b28a734fccbbbd567d98ffa7e6557280f737
2009-04-06 12:26:57 +00:00
drh
e3e2ae4a6f
Turn off the debugging macros in where.c - left on by mistake in the
...
previous check-in. (CVS 6404)
FossilOrigin-Name: b601a57582051184baa37b807b1e18db93313e13
2009-03-29 00:15:54 +00:00
drh
75572e9de9
Improvements to cost estimation for evaluating the IN operator.
...
Ticket #3757 . (CVS 6403)
FossilOrigin-Name: 0c438e813c411e8f9e92d6c7405fccb7a36e110a
2009-03-29 00:13:03 +00:00
drh
7c01f1d754
Remove an unused parameter from sqlite3DequoteExpr. Fix another unrelated
...
and harmless compiler warning. (CVS 6386)
FossilOrigin-Name: 8589b0fcc51a32188386e442655fd91f421ca7f8
2009-03-25 16:51:43 +00:00
drh
296a483c2e
Allow the keyword INDEXED to be used as the name of a table or index or
...
column - for backwards compatibility. (CVS 6370)
FossilOrigin-Name: 53149c9f5d5cfaba3374703cd3af92a9d4cf8718
2009-03-22 20:36:18 +00:00
danielk1977
be2296501c
Make sure struct WhereClause is aligned on an 8-byte boundary. Fix for #3613 , #3736 . (CVS 6364)
...
FossilOrigin-Name: 093a0cf4adc8613f744c2ccdef61f0b30a46818c
2009-03-20 14:18:51 +00:00
shane
c0688ea172
Removed compiler warnings from MSVC builds. Ticket #3701 . (CVS 6335)
...
FossilOrigin-Name: 5477833ec7f707ea9937d3fd6a6d8ab49f2016f1
2009-03-05 03:48:06 +00:00
danielk1977
2d2e7bd32e
Reverse commit (6315) for now. (CVS 6317)
...
FossilOrigin-Name: 0e7c369c23a8767b4d3e5cdd47c14716992fb71a
2009-02-24 10:14:40 +00:00
danielk1977
e2d7b24d08
Scan an index instead of a table for "SELECT count(*) FROM <tbl>" queries. Because an index is usually smaller than a table on disk, this saves some IO. (CVS 6315)
...
FossilOrigin-Name: 294ba6f743c9132dce0e73da480bd3c2071e7239
2009-02-23 17:33:49 +00:00
drh
699b3d4f89
Add the reverse_unordered_selects pragma. (CVS 6314)
...
FossilOrigin-Name: bc078e0007b6c3dc07722820bb53798b643212b3
2009-02-23 16:52:07 +00:00
danielk1977
d336e222f4
Instead of using SetNumColumns, specify the number of columns in a table or index using the P4 argument. (CVS 6310)
...
FossilOrigin-Name: e43ed649630cbc49a6f2a25a26a4a6b5fce84c48
2009-02-20 10:58:41 +00:00
danielk1977
6ab3a2ec8a
Changes to reduce the heap space consumed by triggers, views and tables in the in-memory representation of the schema. Also to reduce the space used by prepared statements slightly. (CVS 6305)
...
FossilOrigin-Name: d9f6ffbc5ea090ba0daac571fc9a6c68b9c864e4
2009-02-19 14:39:25 +00:00
shane
fbd60f826d
Changes to completely remove all floating point ops if SQLITE_OMIT_FLOATING_POINT defined. Note that w/o fp, date/time, round, nan, etc. are all gone or limited in functionality. Updated some of the test scripts to support missing fp and 64-bit functionality. Ticket #3029 . (CVS 6250)
...
FossilOrigin-Name: 5cef400023205b55152b91441acc78f9cd8d58a9
2009-02-04 03:59:25 +00:00
shane
63207ab262
Remove compiler warnings under MSVC. (CVS 6249)
...
FossilOrigin-Name: 6301f08a2b32289a49c4af994f2770318c444b49
2009-02-04 01:49:30 +00:00
shane
d87897dfa2
Minor changes to remove a few MSVC compiler warnings at /W3. Ticket #3610 . (CVS 6215)
...
FossilOrigin-Name: c74c78e4eb7f6d674b7564b33387db996fbe5725
2009-01-30 05:40:27 +00:00
danielk1977
25f42fe7a1
Remove incorrect ALWAYS macro associated with empty IN() sets. Ticket #3602 . (CVS 6202)
...
FossilOrigin-Name: f3c09a0cb8bfc1a112c31b556d8921d5c75c5eef
2009-01-24 09:56:15 +00:00
drh
a7e770612b
Make sure the OR-clause optimizer takes the cost of sorting into account.
...
Reset the rowid cache on the OP_Rewind and OP_Last opcodes. Bump the
version number so that we can do an emergency release. Ticket #3581 . (CVS 6173)
FossilOrigin-Name: d28b58209bf5eb575d0cad8dc71ac043395c6471
2009-01-14 00:55:09 +00:00
drh
96c7a7d95f
Fix a bug caused by overzealous code test coverage simplifications.
...
Bug found by TH3. (CVS 6157)
FossilOrigin-Name: 3da5578726cb22118dfca38a2098a1e378644387
2009-01-10 15:34:12 +00:00
drh
1c767f0df3
More coverage improvements. (CVS 6148)
...
FossilOrigin-Name: 6e171c0a64850013b26a223189d5bebcc0a01a8b
2009-01-09 02:49:31 +00:00
drh
103bd88cf7
Increased test coverage in where.c. (CVS 6146)
...
FossilOrigin-Name: 1e5725c5179660277c2e8c321877d7ee3ca21808
2009-01-08 21:00:02 +00:00
drh
171256c45c
Increase test coverage of where.c. Make sure OR-optimization works on
...
UPDATE and DELETE in addition to SELECT. (Bug found by coverage tests.) (CVS 6139)
FossilOrigin-Name: 4b2c08e8984befb12fa2173ca89d9f54cf764d22
2009-01-08 03:11:19 +00:00
drh
7c2fbdeba2
Add new test cases to increase coverage of where.c. (CVS 6138)
...
FossilOrigin-Name: 2e1ab51f05447f9c1f291636b53b1ec584003841
2009-01-07 20:58:57 +00:00
drh
5bd98aef66
Fix a bug in the LIKE query optimization. (Found by coverage testing.) (CVS 6137)
...
FossilOrigin-Name: fe90e9116b6e1e25cf3119d2777a8e9c135153ce
2009-01-07 18:24:03 +00:00
drh
1c8781f43b
Fix compiler warnings. (CVS 6117)
...
FossilOrigin-Name: da770a8dff183b28aca287cafb9c8b82b98ea968
2009-01-06 14:19:36 +00:00
drh
813f31eafe
Fix a problem in the WHERE clause generator when the FROM clause is empty. (CVS 6114)
...
FossilOrigin-Name: a7015625610624be1645e918d0a62cf85bec86ce
2009-01-06 00:08:02 +00:00
drh
04bbcd5ce9
Fix a bug in the multi-index OR cost estimator. Remove leftover "breakpoint"
...
commands from test scripts. (CVS 6086)
FossilOrigin-Name: b090d5736d7eaec17a39d3133e1587b1d2a42acb
2008-12-30 17:55:00 +00:00
drh
46129af9fb
Get EXPLAIN QUERY PLAN working with the multi-index OR optimization.
...
Added new test script "where9.test". (CVS 6084)
FossilOrigin-Name: 4b6460221011e02bedb724169e8e4793e539e65a
2008-12-30 16:18:47 +00:00
danielk1977
9357416a25
Add a few more tests to where8.test. (CVS 6081)
...
FossilOrigin-Name: ac28aa8b618d59628c5b8fc6fe649ec14f554b11
2008-12-30 15:26:29 +00:00
danielk1977
5f0ff5d527
Add a couple of extra tests for the "WHERE ... OR" optimization. (CVS 6077)
...
FossilOrigin-Name: 35c87585b81866e73a58adffe6af79ddcac57cf6
2008-12-30 12:00:12 +00:00
danielk1977
992347f2ed
Fix a bug in where.c causing a malfunction when an INDEXED BY clause specified an unusable index on other than the leftmost table in the FROM clause. Ticket #3560 . (CVS 6076)
...
FossilOrigin-Name: f8ff0212129ce602a1e1e9ad702c47b9302f2f21
2008-12-30 09:45:45 +00:00
drh
954701a054
Always make sure WhereClause objects are initialized to zero when they
...
are first allocated. (CVS 6073)
FossilOrigin-Name: 7d0ae55d6b2d263382f034eb89bbc368fab6a9bc
2008-12-29 23:45:07 +00:00
danielk1977
fdc4019b46
Add test file where8.test. (CVS 6072)
...
FossilOrigin-Name: bff460ec2c3e250de034a6b34312b897bb2f3749
2008-12-29 18:33:32 +00:00
danielk1977
381a4a4882
Remove an old variable declaration that was commented out using a C++ comment. (CVS 6071)
...
FossilOrigin-Name: 0b972f14f00340cbd4e310dea6d1a4f1c05f5628
2008-12-29 14:51:05 +00:00
drh
ca8c4667a8
Multi-index OR optimizer response to ORDER BY rowid.
...
But fix in sqlite3_stmt_status(): report a full table scan
when "ORDER BY rowid" is used without constraints. (CVS 6069)
FossilOrigin-Name: 3464d369d3b6899ec726cf5b42b68b1dac2ba982
2008-12-28 20:47:02 +00:00
drh
294352578e
Optimize WHERE clauses that constain AND, BETWEEN, and LIKE terms as operands
...
of an OR. (CVS 6068)
FossilOrigin-Name: 67cf24b30e087796cfb0fccf47328e72ade5ecdc
2008-12-28 18:35:08 +00:00
drh
6df2acd216
Simplify the VM code that implements WHERE claues. (CVS 6067)
...
FossilOrigin-Name: fa95f843e179a38f663978d675607c4c3037928d
2008-12-28 16:55:25 +00:00
danielk1977
8044294743
Fix a virtual table related assert() that can fail following a malloc failure. (CVS 6064)
...
FossilOrigin-Name: c6fd3b8f29927c0fc634f82885f144c78f0105d9
2008-12-24 11:25:39 +00:00
drh
23d04d5a20
Continuing improvements to the multi-index OR-clause optimizer. Added a
...
few simple test cases. (CVS 6062)
FossilOrigin-Name: 55d4f493e7df8515574a75caec9967d6c71b6012
2008-12-23 23:56:22 +00:00
drh
3368a24e62
Fix an OOM problem in where.c. (CVS 6060)
...
FossilOrigin-Name: d2105f617eeb04c8177546c45bf6c63e72757f91
2008-12-23 16:23:04 +00:00
drh
dd5f5a6231
Multi-index OR-clause optimization now works for simple tests. There are
...
no test scripts for it yet, though. And it is disabled by default, pending
further testing and optimization. We need a lot of both. (CVS 6058)
FossilOrigin-Name: d77a702358deddfa9987147999d06a235e730fa9
2008-12-23 13:35:23 +00:00