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)
Fix for ticket #21 (I think): Do not return an "out of memory" error if we
can not find the users home directory. Instead, just report that we could
not find the home directory. (CVS 540)
Fix for ticket #1: Implement the GLOB and LIKE operators as functions that
can be overridden. This way, a developer can change the LIKE operator to
be case sensitive, for example. (CVS 537)
Change shell.c so that it will compile under windows. Shorten the help
command somewhat. Add the state of ".header" to the output of ".show". (CVS 534)
General:
o Added global static chars mainPrompt and continuePrompt.
o Moved Argv0 declaration to head of file. Needed in do_meta_command,
previously found below that.
o Added struct previous_mode_data to support new .explain toggle
functionality.
o Added nullvalue, explainPrev and outfile members to
struct callback_data.
o Added modeDescr array for number/text translation ofdisplay modes.
o Modified zHelp to match new functionality.
callback():
o Added support for .nullvalue
do_meta_command():
o Output filename is now saved to callback struct. If using stdout,
then the string "stdout" is saved.
o Explain is now a toggle. When it is turned on, the current values of
mode, header and colWidth are saved if not already in explain mode.
When turned off, those values are restored.
o Allow .mode plurals columns and lines and dot command plural
.headers.
o Added processing for new keywords .quit, .nullvalue, .show, .prompt.
main():
o Added -init as an option to override .sqliterc.
o Added -nullvalue as a command line option.
o Processes .sqliterc.
main_init():
o Genesis. Moved some initialization code here from inside main() so
that it can be called initially by main and again if -init is
specified.
one_input_line():
o Now takes prompts from settable values.
process_sqliterc():
o Genesis. Read .sqliterc from user's home directory and pass it to
process_input(). File should contain meta commands for setups. (CVS 531)
Make the FROM clause on a SELECT optional. If omitted, the result of
the SELECT is a single row consisting of the values in the expression list. (CVS 520)