danielk1977
c9cf6e3d31
Fix for #2445 . A bug in the lookupName() logic that could cause a crash when a WHERE clause used an alias to refer to an expression in the result-set of the SELECT, and that expression was itself a reference to a table column. (CVS 4122)
...
FossilOrigin-Name: 044ca1c72a8f4632dc2e6a94690d164d3560ee38
2007-06-25 16:29:33 +00:00
drh
4f07e5fbdf
Remove terms with operator TK_AS from the expression tree. Ticket #2356 . (CVS 3991)
...
FossilOrigin-Name: 5627ff74be9242418434a06fe5c104d1f9128cab
2007-05-14 11:34:46 +00:00
drh
32ffdb7393
Additional tests to give full coverage testing to ticket #2211 . (CVS 3630)
...
FossilOrigin-Name: ecb1f2fd7b96797459287eaab95693ae17ec2079
2007-02-06 23:41:34 +00:00
drh
7b4fc6a8cb
When optimizing out an ORDER BY clause due to uniqueness constraints, make
...
sure unused terms to the right in the ORDER BY clause to not reference other
tables in a join. Ticket #2211 . Additional test cases needed before
closing this ticket. (CVS 3629)
FossilOrigin-Name: 912faf18d86416b1a36660851f8a4554e6746875
2007-02-06 13:26:32 +00:00
drh
cc19254de9
The query optimizer does a better job of optimizing out ORDER BY clauses
...
that contain the rowid or which use indices that contain the rowid.
Ticket #2116 . (CVS 3536)
FossilOrigin-Name: f245f5c2c2d337fe6458824beb7f9e721837765f
2006-12-20 03:24:19 +00:00
drh
8a51256c0c
Create separate affinities for INTEGER and REAL. (CVS 2766)
...
FossilOrigin-Name: ce06c123d0c5663dbaf263c2e0aaf5d9cdeb2ccd
2005-11-14 22:29:05 +00:00
drh
ec7429ae27
More efficient handling of the LIMIT clause. Scalar subqueries and EXISTS
...
on compound SELECT statements now working properly. Ticket #1473 . (CVS 2747)
FossilOrigin-Name: edca8913ca012fc0c17343a27f819de95147b1bd
2005-10-06 16:53:14 +00:00
drh
3d1d95e625
The SUM() aggregate function returns an integer result if all inputs are
...
integers. Any single non-integer input causes the result to be a floating
point value. (CVS 2669)
FossilOrigin-Name: 21adf4bd99e732650a1e8e9a1cc954126983a654
2005-09-08 10:37:01 +00:00
drh
a21c8495f9
Fix over-aggressive optimization of ORDER BY as reported on the mailing list. (CVS 2655)
...
FossilOrigin-Name: efbb4bc83cd86b6a26d58c5818c58c2e3edaab18
2005-09-01 17:47:51 +00:00
drh
4db38a7092
All regression tests now pass with the new bounded-memory sort code.
...
There is still lots of opportunity for optimization, however. (CVS 2654)
FossilOrigin-Name: 81259a01f1e85ba50a1d017b1282bf841b16f0a5
2005-09-01 12:16:28 +00:00
drh
9eb2028fbc
After calling realloc() on an array to resize it, be sure not to use pointers
...
into the old array. Ticket #1376 . (CVS 2617)
FossilOrigin-Name: 9f9a257123274779150cbc290b9f86a09b3b2c03
2005-08-24 03:52:18 +00:00
drh
3adc9cedb0
The new optimizer now passes all regression tests. (CVS 2566)
...
FossilOrigin-Name: a21212843359fb9fdbd60799ae50ad3566f4399a
2005-07-28 16:51:51 +00:00
drh
7ec764a29e
Add comments to test cases. Improvements to the query plan test variable. (CVS 2555)
...
FossilOrigin-Name: ef3a157f469d72cbd2f713f997598ddf47f340d2
2005-07-21 03:48:20 +00:00
drh
9042f395cc
Fix bugs in the new query plan instrumention logic. (CVS 2549)
...
FossilOrigin-Name: 578490c91331a386f84652db0b3bfd74c82046e1
2005-07-15 23:24:23 +00:00
drh
ba0232a0df
Any non-zero value is considered TRUE in a WHERE clause. Ticket #1211 . (CVS 2496)
...
FossilOrigin-Name: 0f7af623791d8d2ed35c3978ab12316912d9b6f8
2005-06-06 17:27:19 +00:00
danielk1977
3e8c37e7f8
Modify test scripts to work when SQLITE_OMIT_SUBQUERY (along with other OMIT macros) is defined. (CVS 2251)
...
FossilOrigin-Name: bb0254ab14417f0ab40f10f37cb63a60507f070a
2005-01-21 03:12:14 +00:00
drh
ac931eb93b
Fix for ticket #1062 : Correctly handle redundant terms in a WHERE clause. (CVS 2198)
...
FossilOrigin-Name: 1bee1bb91d39ff8a33efe662b6cab6dbd2d50e3c
2005-01-11 18:13:56 +00:00
drh
9012bcbc0a
The optimizer now uses only the index and ignores the table if it can get
...
away with doing so, thus saving a single BTree search per row of result.
This could potentially double the speed of certain queries. The
code passes all regression tests but new tests to exercise the new
functionality are yet to be added. (CVS 2170)
FossilOrigin-Name: e5aa489453bf31126da6473ef93c89ec27935cde
2004-12-19 00:11:35 +00:00
drh
51669863a8
Improvements to the query optimizer. This is a work in progress. (CVS 2169)
...
FossilOrigin-Name: 9b86993ff721b577b920c7c67fb41d3d4355fe88
2004-12-18 18:40:26 +00:00
drh
b6c29897eb
Add initial infrastructure for cursors. In where.c, optimize out clauses
...
of the form "ORDER BY rowid" if a table scan is being performed. Do a
reverse table scan if "ORDER BY rowid DESC" is present. (CVS 2141)
FossilOrigin-Name: fc8c1393c86017a816beb52725b68af3b973f979
2004-11-22 19:12:19 +00:00
drh
6bf895708c
Update tests to work even if some features of the library are disabled. (CVS 2050)
...
FossilOrigin-Name: b11fc9b3f3a2711f98e7e45724aa1d30081197f3
2004-11-03 16:27:01 +00:00
drh
92febd92ad
Tcl interface transfers values directly between SQLite and Tcl_Objs, without
...
at translation to strings. (CVS 1898)
FossilOrigin-Name: e97c331362545ce21117776c7b61d3488668f2bf
2004-08-20 18:34:20 +00:00
drh
ce665cf60e
Eliminate the OP_SortMakeRec and OP_SortCallback opcodes. Sort using the
...
standard record format. (CVS 1426)
FossilOrigin-Name: 25643a0137d395572f16cfec3ab3327d913138ba
2004-05-21 03:01:58 +00:00
drh
736c22b803
Most sorting problems are fixed. Dead code has been removed. 3 test failures
...
remain but will be fixed by the new function API once it gets implemented. (CVS 1425)
FossilOrigin-Name: 3b55095e036d68886d007239333bbf90acd15692
2004-05-21 02:14:24 +00:00
drh
7cf6e4de35
Change opcode names and comments to better describe the operation of
...
the incrKey flag. OP_MoveTo becomes OP_MoveGe. (CVS 1407)
FossilOrigin-Name: 8f249c45cbc77f4320798ff1a830b55e5c74888a
2004-05-19 14:56:55 +00:00
drh
772ae62a82
Bug fixes in where.c. The where.test test works again. (CVS 1406)
...
FossilOrigin-Name: 7c31e257e2d109bfedf63dc307b422e1abd46d0e
2004-05-19 13:13:08 +00:00
drh
ed717fe3b2
Enhance the "PRAGMA integrity_check" command to verify that all indices are
...
correctly constructed. New calls to integrity_check are made in the test
suite. These changes are intended to prevent any future problems such
as seen in ticket #334 . (CVS 1024)
FossilOrigin-Name: c9734c27074d2039a1896a8c6965c08d03711b13
2003-06-15 23:42:24 +00:00
drh
7bdc0c1def
Modify the optimizer so that it does not assume that functions are
...
constant. (CVS 920)
FossilOrigin-Name: 767f1af236d115e8388e1dcc28a4df1be48d6c85
2003-04-19 17:27:24 +00:00
drh
37ea94b8c9
Bug in WHERE clause processing fixed. Ticket #298 . (CVS 919)
...
FossilOrigin-Name: 9b619c98b586a207a87942640d3a94220ff8ab02
2003-04-19 16:34:04 +00:00
drh
d4d595f94c
Make sure the min() and max() optimizations work on empty indexed tables.
...
Ticket #296 . (CVS 914)
FossilOrigin-Name: 98ef6110068e5ed3cd77a14b004f890b79b731f7
2003-04-17 12:44:23 +00:00
drh
1a844c380b
Fix a bug in the reverse scan logic that comes up when the table being
...
scanned is empty. Add additional tests for the reverse scan. (CVS 797)
FossilOrigin-Name: 0051c87d5e8d07fae09da2eb7b0d8cbd1bbd3c8e
2002-12-04 22:29:28 +00:00
drh
dd4852c3d1
Fixes to the logic that decides if the ORDER BY can be ignored due to the
...
use of an index. Tests updated. (CVS 796)
FossilOrigin-Name: bfb9a2aa939ecffc5dc2c7c23bddd57d357bdf13
2002-12-04 21:50:16 +00:00
drh
6977fea801
Correctly handle column names and string constants in parentheses.
...
Fix for ticket #179 . (CVS 770)
FossilOrigin-Name: 3b68aa25c451b7c09ece457ac2b70a9a5d93508a
2002-10-22 23:38:04 +00:00
drh
c330af1dca
Disable sorting by indices if there is a COLLATE subclause in the
...
ORDER BY clause. (CVS 713)
FossilOrigin-Name: 2438da791afb53b4f1c7a9ff9705d393c86f3cbd
2002-08-14 03:03:57 +00:00
drh
e31847449e
The query optimizer now attempts to satisfy an ORDER BY clause using
...
an index. Sorting is still used if there are no suitable indices. (CVS 628)
FossilOrigin-Name: f09e19b43ef61073713cf32282c90ea666229eba
2002-06-19 14:27:05 +00:00
drh
df199a25bd
Make the LIMIT clause work even if the destination of the SELECT is
...
something other than a callback. (Ticket #66 ) (CVS 619)
FossilOrigin-Name: 699cf362083043615eb88635a228bfa46a315c9c
2002-06-14 22:38:41 +00:00
drh
48185c15c7
Added tests for the new IN operator optimizer and fixed a bug that the
...
new tests found. This completes the implementation of enhancement #63 . (CVS 612)
FossilOrigin-Name: 2a710e18176c486525f0abb06644a511a2cd1d7a
2002-06-09 01:55:20 +00:00
drh
08192d5f76
Fix for ticket #31 : Do not attempt the flattening optimization if the
...
subselect does not contain a FROM clause. Handle the special case where
a WHERE clause is constant. (CVS 548)
FossilOrigin-Name: 24e4cf73d22bb41d26bf3c833f1854a9c90923e8
2002-04-30 19:20:28 +00:00
drh
8aff10153e
Bug fixing in the new integer primary key code. (CVS 334)
...
FossilOrigin-Name: 29cab124b4f7eae9d9feb60d2f3a2c443fd9b9aa
2001-12-22 14:49:24 +00:00
drh
487ab3ca18
The new code for taking advantage of inequalities in WHERE clauses
...
is in place. It appears to work. (CVS 305)
FossilOrigin-Name: 262bcd17df19f45def6144b5a7e0602ca5b03deb
2001-11-08 00:45:21 +00:00
drh
b19a2bc603
Disclaimed copyright. Preparing for release 2.0. (CVS 250)
...
FossilOrigin-Name: 4e926efe2b59adfec4086eb1d2ba830238facb4c
2001-09-16 00:13:26 +00:00
drh
c87fa69a29
Add index access methods to the DBBE in preparation for adding a new
...
DBBE for the btree.c module. (CVS 236)
FossilOrigin-Name: c15f6ffc4d41f30a06d750c8015226713ae0126b
2001-08-19 18:19:46 +00:00
drh
6de4f4ca1c
:-) (CVS 93)
...
FossilOrigin-Name: 3c0540e6fb103402c3f37fd2df17f9786b363db0
2000-06-12 12:20:48 +00:00