1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-02 17:02:34 +03:00

19158 Commits

Author SHA1 Message Date
drh
0c36cbe0c2 Fix for ticket #100: Correctly handle ON and USING clauses of JOINs within
a VIEW. (CVS 679)

FossilOrigin-Name: 93710f7ed7e1baa6acbf4bc32982e046f61ffa44
2002-07-16 02:05:43 +00:00
drh
704027f16d Fix a syntax error in the tclsqlite.c file. (CVS 678)
FossilOrigin-Name: 47997d7f3ad2dd486a00dc13b7a8c48bb4751e5d
2002-07-15 20:58:47 +00:00
drh
ad16844f35 Fix for ticket #102: Honor the ORDER BY clause in subqueries. (CVS 677)
FossilOrigin-Name: 7e918c8b0df5120e3630811f164defb8c9fedd6d
2002-07-15 18:55:24 +00:00
drh
7f953e2052 Fix for ticket #64: Better error reporting in the shell. (CVS 676)
FossilOrigin-Name: e1842e04c4f47e1ce79575b5c787a164add5d559
2002-07-13 17:33:45 +00:00
drh
70562cd342 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)

FossilOrigin-Name: 72a609ec6492e7d740b6e6184fa14a5e6b04a5dc
2002-07-13 17:23:21 +00:00
drh
485b39b401 Fix for ticket #95: Do not allow automatically created indices (associated
with UNIQUE or PRIMARY KEY constraints) to be dropped. (CVS 671)

FossilOrigin-Name: 0603eb74e6aca48f62bd95cb6c236b9e559af850
2002-07-13 03:11:52 +00:00
drh
5080aaa7ab 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)

FossilOrigin-Name: b98727246d5fcc1b097b577be498a77e954c5dc4
2002-07-11 12:18:16 +00:00
drh
fa173a764a 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)

FossilOrigin-Name: ff8b6f4ee8099a7170cb786b8ead9a3e42ab5869
2002-07-10 21:26:00 +00:00
drh
6276c1cbf0 Add support for TEMPORARY views. The code is here but it is mostly untested. (CVS 668)
FossilOrigin-Name: 87cd10c1f638db5d1f47bc12669f150485415b3e
2002-07-08 22:03:32 +00:00
drh
bea00b9a2b 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)

FossilOrigin-Name: fd7e41f0eed80fb1c7e18eb84834ec3cea74a649
2002-07-08 10:59:50 +00:00
drh
6b30867ff6 Make the BTree balance() routine a little faster by reusing database
pages locally rather than freeing and reallocating them. (CVS 666)

FossilOrigin-Name: 3c2dea4310af491d6cb09856d4bc5236d6dc44ac
2002-07-08 02:16:37 +00:00
drh
5e5377fb80 Fix for Win32: The %p format on Win32 does not prepend a "0x" as it should. (CVS 665)
FossilOrigin-Name: ee86704daf184307fe98b5631f22ceb3d701afce
2002-07-07 17:12:36 +00:00
drh
193a6b4142 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)

FossilOrigin-Name: f6e24d5ccbcfcf5863ffbd65860dafa2f5663e99
2002-07-07 16:52:46 +00:00
drh
0de8c11292 Prepare for the 2.5.5 release. (CVS 661)
FossilOrigin-Name: 00f83c2576f4a9689720d344788f66219c1f6827
2002-07-06 16:32:14 +00:00
drh
8e298f92f6 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)

FossilOrigin-Name: db178646a01483d59e6f9af302e9bbe394956d93
2002-07-06 16:28:47 +00:00
drh
38640e15af All the code is now in place for SQLite to distinguish between NUMERIC and
TEXT datatypes.  Still need to turn on the new code and test it. (CVS 659)

FossilOrigin-Name: b4737a16c997a6c139d616211fb6bc4b0fae181c
2002-07-05 21:42:36 +00:00
drh
2f2c01e51d 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)

FossilOrigin-Name: 85793a4f03250166c21007cab3525709592d0866
2002-07-02 13:05:04 +00:00
drh
5ad1a6c8c4 Fix for tickets #90 and #89: Make the AS keyword optional again. (CVS 654)
FossilOrigin-Name: 1f8a73b1c3833e3924196458d4c1ecca90f63662
2002-07-01 12:27:09 +00:00
drh
6cbe1f1bc4 Added additional tests. No new errors found. (CVS 653)
FossilOrigin-Name: 8924a7f5bab790ab552332d6359028d0d1825e4a
2002-07-01 00:31:36 +00:00
drh
a9f9d1c08b Add a few more tests and fix a few bugs that the tests uncovered. (CVS 652)
FossilOrigin-Name: 91c0db66c86facb21b5b522afadd83d91a488256
2002-06-29 02:20:08 +00:00
drh
3b167c7583 Additional test cases added. The following bug fixed: A segfault was occurring
if a VIEW consisted of a join with a USING clause. (CVS 651)

FossilOrigin-Name: 96515b813eb57e1f48c28d357d1f38639b2fdcfa
2002-06-28 12:18:47 +00:00
drh
83dcb1ad37 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)

FossilOrigin-Name: c07e493b62125e85eaea36b6945f1e146e2792b8
2002-06-28 01:02:38 +00:00
drh
06b2718a5f 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)

FossilOrigin-Name: 9ca6368525fe81fe9c78c6911f4d23009ce858d5
2002-06-26 20:06:05 +00:00
drh
b13632063d The datatype of the i-th column in the result set is given by the
azColName(argc+1+i) parameter to the callback. (CVS 647)

FossilOrigin-Name: bdb006b809feb0f29342eb5138c0884d34e95599
2002-06-26 02:45:03 +00:00
drh
411995dc0d Add the sqlite_open_aux_file() API. (CVS 646)
FossilOrigin-Name: 332164d6455658ca633a1dc49811d9fb0fd4b01c
2002-06-25 19:31:18 +00:00
drh
8124a30f82 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)

FossilOrigin-Name: 36fc0add660f9f3676783765d37280aa874caecb
2002-06-25 14:43:57 +00:00
drh
2150432e7c Enhance the INTEGRITY_CHECK pragma to test the auxiliary database file in
addition to the main database file. (CVS 642)

FossilOrigin-Name: 52eba4de301121f254174b74042015bf6069ef11
2002-06-25 13:16:02 +00:00
drh
e0bc4048a0 Added support for the "sqlite_temp_master" table. Increased the version
number to 2.5.2. (CVS 640)

FossilOrigin-Name: 9c1432bf7485258e485bd652e3acdaeabbfe8850
2002-06-25 01:09:11 +00:00
drh
1cc093c2b5 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)

FossilOrigin-Name: 8b6574cfa86daaae910f8f3ee3c4723a21fb9e53
2002-06-24 22:01:57 +00:00
drh
bf5cd97ed7 Fix a VDBE stack leak in LEFT OUTER JOIN. Fix a bug in the code generator
for JOIN ... USING(...). (CVS 638)

FossilOrigin-Name: d861489e1f7dffd1105c271fe8597f73e5b1703c
2002-06-24 12:20:23 +00:00
drh
f46f905a1e An optimization: avoid the use of an intermediate table on UNION ALL if there
is no ORDER BY clause. (CVS 637)

FossilOrigin-Name: 8aa73ce61268a50d353d9a5c878461290195525f
2002-06-22 02:33:38 +00:00
drh
d11d382c99 Fix for bugs #77 and #80: Rework the LIMIT mechanism to be reentrant and to
clean up the VDBE stack properly. (CVS 636)

FossilOrigin-Name: 9d5523107937e3700c76666fb058694babdd672c
2002-06-21 23:01:49 +00:00
drh
7aa128dbc5 Fix for ticket #76: Fix a database corruption that might occur when
dropping tables or indices. (CVS 635)

FossilOrigin-Name: 7936b0325024c81ed8d4bab192d7350d045ec999
2002-06-21 13:09:16 +00:00
drh
bb3a6dbd2e Fix for ticket #78: Avoid an assertion failure when sqlite_close() to be
called in the middle of a transaction. (CVS 634)

FossilOrigin-Name: 2532792a5875f9cc0f7d8eaf90dd49d1f6025ca3
2002-06-21 11:55:48 +00:00
drh
c9b84a1fb1 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)

FossilOrigin-Name: cbbc858d973c2d515c6a2464981316549a241b73
2002-06-20 11:36:48 +00:00
drh
c926afbc2d 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)

FossilOrigin-Name: 43c5aff5d078bce9292683cd40311e0dcc81ac14
2002-06-20 03:38:26 +00:00
drh
27a32783ab Fix for ticket #75: Autoincrement INTEGER PRIMARY KEY fields on an INSERT
even if the data is coming from a SELECT statement. (CVS 630)

FossilOrigin-Name: d599f75b659809a6e5eee09b0e9e6e90bde5af1e
2002-06-19 20:32:43 +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
8e2ca029a3 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)

FossilOrigin-Name: 05783a9db585c1ead42135252dca97d2bc6e2118
2002-06-17 17:07:19 +00:00
drh
e0140fc13a Expose an additional internal API routine (sqliteInitCallback()) for
use by private code. (CVS 624)

FossilOrigin-Name: cd74495f995803eeb5c2b900d536deb52e5584eb
2002-06-16 18:21:44 +00:00
chw
0cfcf3fbd1 Added %Q format specifier: like %q but automatic enclosing in
single quotes, NULL pointers replaced by NULL w/o single-quotes. (CVS 621)

FossilOrigin-Name: b9c7ecc2f9d8d7d57c51dc4ba0aaa520e89eb31f
2002-06-16 04:55:48 +00:00
chw
f220b24fc6 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)

FossilOrigin-Name: 8bc711571d752a81957007be22ed8a3c6877f676
2002-06-16 04:54:28 +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
c27a1ce4bd Improvements to comments. No code changes. (CVS 618)
FossilOrigin-Name: 7e10e60bb78b680bb822908a0b7763f8f5e3ee5a
2002-06-14 20:58:45 +00:00
drh
c67980bedc Fix for bug #72: Make sure the file descriptors are properly closed if
sqliteInit() fails for any reason. (CVS 617)

FossilOrigin-Name: e67ac0fec51788aca0429d04310f86c9c1cf9d13
2002-06-14 20:54:14 +00:00
6f34903e85 Add RAISE() function, which allows more advanced flow-control in trigger programs (ticket #55) (CVS 614)
FossilOrigin-Name: d4a2fb10067203a0d49317db747759872e62927e
2002-06-11 02:25:40 +00:00
drh
28f4b6885b Fix the spelling of sqliteRegisterBuiltinFunctions(). (CVS 613)
FossilOrigin-Name: 74d297d97e66452acc5c21048ee8ddf2a90c846f
2002-06-09 10:14:18 +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
d9e3093038 Fix for ticket #65: If an integer value is too big to be represented as a
32-bit integer, then treat it as a string. (CVS 611)

FossilOrigin-Name: ad9624798edbd6d0c4652fed3d74fe87498844ff
2002-06-09 01:16:01 +00:00
drh
d99f70680f Add optimizations for the IN operator in WHERE clauses. This is a partial
implementation of enhancement #63.  Still need to add test cases. (CVS 610)

FossilOrigin-Name: 8481e841ebdeabe07bf780246bda1aa053eb60b7
2002-06-08 23:25:08 +00:00