Partial fix for ticket #96: Return SQLITE_MISUSE from sqlite_exec() if called
from a child process with an active transaction that was started in the parent. (CVS 675)
Turn of the reporting of datatypes in the 4th callback argument unless the
SHOW_DATATYPES pragma is ON. Eliminate the NULL pointer that used to separate
the beginning of datatypes from the end of column names so that the callback
can test to see whether or not datatypes are provided. This is an
incompatible changes, but since the prior behavior was never documented, we
will let it in. (CVS 670)
When reporting back the datatype of columns, use the text of the datatype
as it appears in the CREATE TABLE statement, if available. Also: removed
the ".reindex" command from the shell. (CVS 669)
In the BTree subsystem, when using pages from the freelist, attempt to select
pages close to related pages in order to keep data structures near each other
in the database file. This improves access speed in some circumstances. (CVS 667)
More rollback problems: Fix two more errors introduced by checking (410) that
can cause database corruption after a ROLLBACK. Also add new tests to make
sure everything is working this time. (CVS 663)
Fix for bug #94: Be sure to journal pages that are added to the freelist then
removed from the freelist and reused during the same transaction. (CVS 660)
Fix for ticket #92: Correct the sqliteExprCompare() function so that is takes
into account the iTable and iColumn fields of the Expr structure. Otherwise,
"min(a)" and "min(b)" will compare equal to each other in views. (CVS 658)
drh [Fri, 28 Jun 2002 01:02:38 +0000 (01:02 +0000)]
Fix for ticket #84: If the WHERE clause is too complex, issue an error message
and refuse to do the SELECT. The cutoff is a WHERE clause with 100 terms. (CVS 650)
drh [Wed, 26 Jun 2002 20:06:05 +0000 (20:06 +0000)]
In the TCL interface, the "sqlite" command now always returns the address
of the "sqlite*" pointer that sqlite_open() returns. It used to do this
only when compiled with the SQLITE_TEST macro defined. (CVS 648)
drh [Tue, 25 Jun 2002 14:43:57 +0000 (14:43 +0000)]
Bug fix: When the database file grows in size during a transaction, make sure
the last page of the file gets written to disk even if that page is on the
free list and contains no data. Otherwise the disk file will be too small
which can lead to database corruption in subsequent transactions. (CVS 643)
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)