drh [Mon, 24 Jun 2002 22:01:57 +0000 (22:01 +0000)]
Partial fix for a problem with LEFT OUTER JOIN. It used to be that the test
for the right-hand table not matching the left table occurred after all
ON, USING, WHERE clause processing. The test should occur after ON and
USING clauses are checked but before the WHERE clause is check. This fix
works as long as the total number of "AND" separated terms in the ON, USING,
and WHERE clause does not exceed 32. To do: make this work for any number
of terms and add test cases.
that (CVS 639)
drh [Thu, 20 Jun 2002 11:36:48 +0000 (11:36 +0000)]
This patch contains the beginnings of the data-typing infrastructure.
The new build-in TypeOf() function is added. New opcodes for doing
pure text comparisons are added. Most changes are disabled pending
the 2.6.0 release. (CVS 632)
drh [Thu, 20 Jun 2002 03:38:26 +0000 (03:38 +0000)]
Fix for ticket #73: The ORDER BY clause is significant for subqueries.
This passes all regression tests, but more testing is needed to exercise
all paths through the new code. (CVS 631)
drh [Mon, 17 Jun 2002 17:07:19 +0000 (17:07 +0000)]
Add preliminary logic for the eventual move to having separate TEXT and
NUMTEXT datatypes. Also change the version number to 2.5.0 in preparation
for an interim release. (CVS 625)
chw [Sun, 16 Jun 2002 04:54:28 +0000 (04:54 +0000)]
Changed sqlite_mprintf_str to allow a NULL string parameter.
Command template now is cmd FORMAT INT INT ?STRING?. When
STRING omitted a NULL is passed to sqlite_mprintf. (CVS 620)
drh [Sun, 9 Jun 2002 01:55:20 +0000 (01:55 +0000)]
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)
drh [Thu, 6 Jun 2002 23:16:05 +0000 (23:16 +0000)]
Fix for ticket #62: Do not report an SQLITE_READONLY error until the application
actually tries to write data into a readonly file. It is OK to start a
transaction on a read-only file, and doing so will get you a read lock. This
change allows TEMP tables to be read/write even though the main database is
readonly. (CVS 607)
drh [Thu, 6 Jun 2002 18:54:39 +0000 (18:54 +0000)]
Added the %fallback directive to the lemon parser generator and used this
in the parser to make the parse tables much smaller. This reduced the size
of the library by 15K. (CVS 605)
drh [Fri, 31 May 2002 15:51:25 +0000 (15:51 +0000)]
Refinements to NULL processing: NULLs are indistinct for DISTINCT and UNION.
Multiplying a NULL by zero yields zero. In a CASE expression, a NULL comparison
is considered false, not NULL. With these changes, NULLs in SQLite now work
the same as in PostgreSQL and in Oracle. (CVS 600)
drh [Thu, 30 May 2002 12:27:03 +0000 (12:27 +0000)]
Once it is opened, leave the checkpoint journal file open for the
duration of a transaction, rather than closing it and reopening it
for each statement. (Ticket #53) (CVS 599)
drh [Mon, 27 May 2002 12:24:48 +0000 (12:24 +0000)]
A SELECT statement inside the body of a TRIGGER uses the SRT_Discard target
to discard the query results. Such selects are intended to be used to call
user-defined functions for their side-effects. They do not return results. (CVS 594)
drh [Sun, 26 May 2002 20:54:33 +0000 (20:54 +0000)]
NULL values are distinct. A comparison involving a NULL is always false.
Operations on a NULL value yield a NULL result. This change makes SQLite
operate more like the SQL spec, but it may break existing applications that
assumed the old behavior. All the old tests pass but we still need to add
new tests to better verify the new behavior. Fix for ticket #44. (CVS 589)
drh [Fri, 24 May 2002 20:31:36 +0000 (20:31 +0000)]
Initial implementation of LEFT OUTER JOIN including the expanded SQL92 join
syntax. The basic functionality is there but there is still a lot of testing
to do. (CVS 587)
drh [Fri, 24 May 2002 16:14:15 +0000 (16:14 +0000)]
Add support for the full SQL join syntax. This is just a parser enhancement.
We now recognize all kinds of joins, but we don't actually do anything with
them yet. (CVS 586)
drh [Fri, 24 May 2002 02:04:32 +0000 (02:04 +0000)]
Split the IdList structure into IdList and SrcList. SrcList is used to
represent a FROM clause and IdList is used for everything else. This change
allows SrcList to grow to support outer joins without burdening the other
uses of IdList. (CVS 584)
drh [Thu, 23 May 2002 22:07:02 +0000 (22:07 +0000)]
Change the names of the PushList and PopList opcodes to ListPush and ListPop
so that they will appear together with the other List opcodes in the
documentation. (CVS 583)
drh [Thu, 23 May 2002 12:50:18 +0000 (12:50 +0000)]
Partial fix for ticket #49. The correct result is computed, but now we have
a memory leak. I'm not sure if the memory leak was pre-existing or a result
of this change. (CVS 581)
drh [Tue, 21 May 2002 13:02:24 +0000 (13:02 +0000)]
Modify the shell so that when it is doing a ".dump" it always uses single
quotes and not double quotes for quoting literal strings. This is for
portability to other databases that only support single quote string literals. (CVS 574)
drh [Fri, 10 May 2002 05:44:55 +0000 (05:44 +0000)]
Attempt to detect when two or more threads try to use the same database at
the same time and return an SQLITE_MISUSE error. Also return this error
if an attempt is made to use a closed database. (CVS 558)
drh [Wed, 8 May 2002 11:54:14 +0000 (11:54 +0000)]
Fix for tickets #32 and #33: Generate the names of the result set early, before
doing the flattening optimization or evaluating subqueries. Otherwise, the
result set column names are generated incorrectly or after they are needed. (CVS 553)
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)
Added the "encode.c" source file that contains two utility subroutines that
can be used to encode binary data for use in INSERT and UPDATE statements.
This is just an initial checking. The code has not yet been integrated into
the library. (CVS 545)
Fix for ticket #26: Document the fact that CREATE TABLE might not be
immediately visible to other processes that are holding the database open. (CVS 544)
Fix for ticket #22: In the code generator for compound SELECT statements, take
care not to generate column name headers if the output is an intermediate table.
Otherwise the column headers are not generated correctly if a compound SELECT
statement appears as an expression in part of the WHERE clause. (CVS 543)