Commit Graph

128 Commits

Author SHA1 Message Date
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
tpoindex
7a9b161587 add comment that table is accessed by primary key (CVS 2177)
FossilOrigin-Name: 707690c5f2e1340bbbb4cb06e6b2b76a2a3b5f0d
2005-01-03 18:13:18 +00:00
drh
7465a80899 Fix a typo in a comment. No code changes. Ticket #1052. (CVS 2174)
FossilOrigin-Name: 9fb1402f0835b214c9174866653e95416b32f860
2005-01-03 01:28:51 +00:00
drh
acf3b988f6 Fix comment typos. no code changes. (CVS 2173)
FossilOrigin-Name: 4165217e5114f5377f0823c63ff2aba879927ce7
2005-01-03 01:27:18 +00:00
drh
e6f85e71e9 Fix ticket #1046 by removing code and simplifying the query optimizer.
Remarkably, this simplification also makes the optimizer do a better job.
Ticket #1051 was fixed as a side-effect. (CVS 2172)

FossilOrigin-Name: 5fd1f4711885e3dd6fb2c2700287f78bb0ea178a
2004-12-25 01:03:13 +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
23bf66d6af Minor code and comment cleanup. (CVS 2165)
FossilOrigin-Name: d012628a78edaa8d3cb438a7dcc3770b2eb8588b
2004-12-14 03:34:34 +00:00
drh
e4e7207248 More work on the implementation of cursors, but they are still not
functioning. (CVS 2142)

FossilOrigin-Name: 8b61d1ae1ca469b80f2b344d550c3b363448b193
2004-11-23 01:47:30 +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
danielk1977
299b187d76 Back out changes allowing writes to tables that have open cursors. (CVS 2133)
FossilOrigin-Name: 91acd87e52509a8f78894d0f4b625b54376cac21
2004-11-22 10:02:10 +00:00
danielk1977
ed326d7047 Perform deletes in a single pass. (CVS 2104)
FossilOrigin-Name: a2e1c35b327e33684ab19e5f65727c42c7b2949c
2004-11-16 15:50:19 +00:00
drh
9a43267ba2 More changes to take advantage of the TK_ and OP_ alignments to avoid
unnecessary translations. (CVS 1999)

FossilOrigin-Name: e8e972ba65fc36171f6b685e8a8f67f93452e031
2004-10-04 13:38:09 +00:00
drh
94a11211f5 Code simplifications and size reductions. (CVS 1983)
FossilOrigin-Name: cb631a135da92fd689ee40a8b7e2695a510eb765
2004-09-25 13:12:14 +00:00
drh
ad6d94607f Add comments to unused P3 fields of selected instructions when NDEBUG is
not defined.  This makes VDBE program dumps more readable during debugging. (CVS 1973)

FossilOrigin-Name: 4871c77f8fce36ff230e1f026f4e4e49492515e9
2004-09-19 02:15:24 +00:00
drh
9bb575fd72 Fix a naming conflict between sqlite versions 2 and 3. An open sqlite3
connection now *must* be called "sqlite3".  You cannot call it "sqlite".
This might break existing code. (CVS 1941)

FossilOrigin-Name: 3ddf5a9d1c480a2e3aa32685879063b11afddbe1
2004-09-06 17:24:11 +00:00
drh
290c19482e Optimizations to the code generator. (CVS 1899)
FossilOrigin-Name: bd6649c5aae1bf182610eb267b546c297a34481d
2004-08-21 17:54:45 +00:00
drh
193bd777aa Simplify the where.c logic by flipping expression over so that the controlling
variable is always on the left. (CVS 1838)

FossilOrigin-Name: ec8bfa3891dbf0f3172e31cf322974c03f9af59a
2004-07-20 18:23:14 +00:00
drh
2ffb11855a Fix for ticket #813. (CVS 1818)
FossilOrigin-Name: 88e4bfa154e33c627ff2abb15cc55a100359d370
2004-07-19 19:14:01 +00:00
drh
c275b4ea91 Store schema cookies on the TEMP database. Ticket #807. (CVS 1817)
FossilOrigin-Name: c6c13dc460094e6adea2b14849edf9f485238b99
2004-07-19 17:25:24 +00:00
drh
8feb4b1d9e Correctly handle joins of more than 32 tables. Ticket #806. (CVS 1812)
FossilOrigin-Name: 880644097004cba1e215a5697d0553b3b98c9884
2004-07-19 02:12:14 +00:00
danielk1977
ededfd5e83 Remove redundant opcodes OP_MakeKey and OP_MakeIdxKey. (CVS 1612)
FossilOrigin-Name: a71a9ff114f2162696d8d37fbc87b315568f6dcb
2004-06-17 07:53:01 +00:00
danielk1977
f7df9ccfe7 Trivial modifications to prevent compiler warnings. (CVS 1608)
FossilOrigin-Name: b3d5ad6f7832d46e34e99e4a1cb7e47c88f207a4
2004-06-16 12:02:47 +00:00
danielk1977
f9d19a6b3f Check the value of the schema cookie before reading the sqlite_master table. (CVS 1585)
FossilOrigin-Name: 80c299f8839d920c61854f575498340b28db98d7
2004-06-14 08:26:35 +00:00
danielk1977
d2b65b9fad Add the sqlite3_collation_needed() API and fix some error handling cases
involving unknown collation sequences. (CVS 1563)

FossilOrigin-Name: 518d82d3b1ab996d675f45c94d740c98578a04a6
2004-06-10 10:51:47 +00:00
danielk1977
0202b29ef7 Some progress on user-defined collation sequences. (CVS 1544)
FossilOrigin-Name: c634e71f1909819fb55c728bc410e5cc390428e3
2004-06-09 09:55:16 +00:00
drh
80242055e5 Start all transactions and verify all schema cookies near the beginning of
of each vdbe program. (CVS 1543)

FossilOrigin-Name: 1086196460e261718e78512d77e25dde021a117d
2004-06-09 00:48:12 +00:00
danielk1977
0f69c1e3ec Transform OP_HexBlob and OP_String8 to OP_Blob and OP_String the first time they are executed. (CVS 1492)
FossilOrigin-Name: 3225de8902b0e7e60c4d9f3a5ef51bc74f57d364
2004-05-29 11:24:50 +00:00
drh
d3d39e939d Add internal support for collating sequences. This breaks 244 tests. (CVS 1420)
FossilOrigin-Name: a6cb09d7af537726acc87b9133f68c81e839e047
2004-05-20 22:16:29 +00:00
drh
fec19aad44 Correctly handle 64-bit integers in SQL statements. (CVS 1408)
FossilOrigin-Name: 34f03ba6a9d6e2144d0c6cbbbeb37b4c69705f1f
2004-05-19 20:41:03 +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
danielk1977
b4964b723c Omit the '\0' at the end of UTF-8 strings on disk (it is implied). Also
don't store the number of rows at the beginning of each table record. (CVS 1390)

FossilOrigin-Name: 202a470f2c1804a96e69f16709d1a92e405971f0
2004-05-18 01:23:38 +00:00
danielk1977
e014a83880 More changes to support the new types model. Compound SELECTs are currently
broken. (CVS 1389)

FossilOrigin-Name: 0f6c9b05e688e281fa168aacdd867db408df2863
2004-05-17 10:48:57 +00:00
danielk1977
a37cdde042 More changes to support the manifest type model. A few things are currently
broken. (CVS 1385)

FossilOrigin-Name: a4af838f8d1b81ec6c8db97655c6876aca0738d9
2004-05-16 11:15:36 +00:00
danielk1977
13dadd2798 Delete some code no longer in use (CVS 1376)
FossilOrigin-Name: f24aedc2b0c401d8b714ba39b604d7caa7f6a430
2004-05-14 11:16:56 +00:00
danielk1977
3d1bfeaa22 Implement type affinity for table and index records (CVS 1375)
FossilOrigin-Name: dbfe6e93166d9557d66cab9dca7977baa3501e5e
2004-05-14 11:00:53 +00:00
danielk1977
132872b37e Change the names of external symbols from sqlite_XXX to sqlite3_XXX. (CVS 1339)
FossilOrigin-Name: 19b100ec0d088b2cca147c967a80d18403b7ee86
2004-05-10 10:37:18 +00:00
danielk1977
4adee20fcb Change lots of internal symbols from sqliteXXX to sqlite3XXX so that the
library links again. It doesn't work yet, due to changes in the btree layer
calling convention. (CVS 1324)

FossilOrigin-Name: 8af6474c49263ae26216dff9465b33f76b500cf4
2004-05-08 08:23:19 +00:00
drh
701a0aebe2 Use sqliteVdbeOp3 instead of sqliteVdbeChangeP3 where applicable. (CVS 1266)
FossilOrigin-Name: 51f1e8f7539596b33bc3365ec8f34041602d049c
2004-02-22 20:05:00 +00:00
drh
f7a9e1ac87 Use sqliteErrorMsg instead of sqliteSetString whereever practical. (CVS 1264)
FossilOrigin-Name: 69aac043af7f93e7b3f036622c0ac9261cae1839
2004-02-22 18:40:56 +00:00
drh
751f41217e Fix comparisons of ROWID against floating point numbers so that they work
correctly.  Ticket #377 and #567. (CVS 1178)

FossilOrigin-Name: c9ac3db8e08403398ec344757385334601a59374
2004-01-14 21:59:22 +00:00
drh
143f3c45a7 Rework the fix to ticket #461 so that we do not have to do redundant tests
of WHERE clause terms looking for NULLs.  See also check-in (1103). (CVS 1167)

FossilOrigin-Name: 5fd581787e88173f0303f870fc956ec9285cca4e
2004-01-07 20:37:52 +00:00
drh
0f18bfa789 Fix the code generator to a void a VDBE stack overflow on 3-way joins.
Ticket #519. (CVS 1129)

FossilOrigin-Name: 230a4ff2c8a3927533baf5b22edc9f25490d5443
2003-12-10 01:31:21 +00:00
drh
41743984bf Always use "(char*)0" to terminate the argument list of sqliteSetString().
This is needed for 64-bit systems that use a 32-bit integer by default. (CVS 1126)

FossilOrigin-Name: 656c90387a4a714b4f31040ece9b0e15e30934af
2003-12-06 21:43:55 +00:00
drh
dab3518880 Remove support for the Oracle8 outer join syntax. (CVS 1106)
FossilOrigin-Name: 824430b3ce435386b83ceb882f1510ac9f27d8fa
2003-09-27 13:39:38 +00:00
drh
562528c480 Do all WHERE clauses tests, even if an index is used for lookup so that
we know the test cannot be FALSE.  The test might end up being NULL in which
case it would need to be treated as false.  Ticket #461. (CVS 1103)

FossilOrigin-Name: 5aea81488b2d3bcdc009ccf0f0ffcda046e38d79
2003-09-27 00:41:27 +00:00
drh
d4f5ee2805 Initialize a variable to prevent an MSVC compiler warning. Ticket #394. (CVS 1051)
FossilOrigin-Name: 96e3c539586bf86c4fe8de0ac25de6655f704035
2003-07-16 00:54:31 +00:00
drh
1dd59e0f94 Correctly handle comparing an INTEGER PRIMARY KEY against a floating point
number.  Ticket #377. (CVS 1045)

FossilOrigin-Name: 982aa3356bcc217003cd9e6a829619219c334797
2003-07-06 17:22:25 +00:00
drh
8bf8dc9208 Fix problems with TEMP indices that lead to corrupt databases. These
problems were discovered while working on ticket #317.  No sure yet if
that ticket is fixed. (CVS 981)

FossilOrigin-Name: 01398fb78bab7e5c6f439f2b743f26e82118468a
2003-05-17 17:35:10 +00:00