Commit Graph

632 Commits

Author SHA1 Message Date
drh bd790ee395 Fix a compiler warning. (CVS 604)
FossilOrigin-Name: 637ee587b5438c54ba2d8bd8fc15e584abb70946
2002-06-02 18:22:06 +00:00
drh 04738cb9ff Add the ability to parse FOREIGN KEYs. Foreign keys are still ignored,
but at least they now do not cause a syntax error. (CVS 603)

FossilOrigin-Name: 6fdcee3c99e994ef3ab83a0cc57344cdb16210df
2002-06-02 18:19:00 +00:00
drh e4de1feb3e Enhance the ORDER BY clause so that an integer term means to sort by the
corresponding column. (CVS 602)

FossilOrigin-Name: 7acbf84b492202d8b5a05276a95b475027eb5f58
2002-06-02 16:09:01 +00:00
drh 1288c9561d Multiplying NULL by zero gives NULL, not zero. I misread the test data
and coded it wrong.  This check-in fixes the problem. (CVS 601)

FossilOrigin-Name: df9cc852ad02dbec5558d3915a0303f7e7b79b2b
2002-06-01 21:41:10 +00:00
drh f570f011eb 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)

FossilOrigin-Name: da61aa1d238539dff9c43fd9f464d311e28d669f
2002-05-31 15:51:25 +00:00
drh 0f89253e21 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)

FossilOrigin-Name: 7a24336d50e72006b2cc0e4feb292b946e79d5f3
2002-05-30 12:27:03 +00:00
drh 461c281a2e Bug fix: bad code was generated for when the first operand of a CASE
was NULL. (CVS 598)

FossilOrigin-Name: 4debc8db929fdc201759ba211acdeadc4e30e8af
2002-05-30 02:35:11 +00:00
drh 739105c72c Built-in aggregate functions (MIN, SUM, AVG, etc) should ignore NULL entires. (CVS 597)
FossilOrigin-Name: 19ae12bef210ae5fe171f10833faa38d640c129f
2002-05-29 23:22:23 +00:00
drh f1756d2a79 Remove extra \ characters from temporary filenames under windows.
(Ticket #52) (CVS 596)

FossilOrigin-Name: ed11abc81e638c21ec1aa0445a6d59de91343095
2002-05-29 12:44:52 +00:00
danielk1977 993b173e55 Update trigger2.test to match checkin 591. Also fix ticket #51 (by documenting problem) (CVS 595)
FossilOrigin-Name: 5e74d0964b8fd99eda798e3737217aa499cc1726
2002-05-28 06:55:27 +00:00
drh d7489c3987 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)

FossilOrigin-Name: f8041f3d4d3350b4086cd6ba3e9006bdde8546a9
2002-05-27 12:24:48 +00:00
drh c754fa5486 Fix the "alias.*" bug found by Bernie Cosell and reported on the newsgroup. (CVS 593)
FossilOrigin-Name: f562d542304c0c1b18b0cee78b1ecc353327a02e
2002-05-27 03:25:51 +00:00
drh bb113518f9 Bug fixes and additional test cases for the distinct-NULL patch. (CVS 592)
FossilOrigin-Name: 0e268d0c0faa02c3f95e1567cf631b7a04bfbdf0
2002-05-27 01:04:51 +00:00
danielk1977 d702fccbce Require the INSTEAD OF syntax to create triggers on database views. (CVS 591)
FossilOrigin-Name: d9e48cd5180e2aae7672b9d54e18c37d0fe5258a
2002-05-26 23:24:40 +00:00
drh 8912d106e1 Change functions to handle NULLs correctly. Added the NULLIF() function. (CVS 590)
FossilOrigin-Name: 46ce1a9ab6e527958ebc757fa2175c488299cd84
2002-05-26 21:34:58 +00:00
drh f5905aa7be 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)

FossilOrigin-Name: 9051173742f1b0e15a809d12a0c9c98fd2c4614d
2002-05-26 20:54:33 +00:00
drh 195e6967fb Additional testing of LEFT OUTER JOIN. (CVS 588)
FossilOrigin-Name: d8d04c14f18d1feba89ccea0be70530a18248c51
2002-05-25 00:18:20 +00:00
drh ad2d8307ac 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)

FossilOrigin-Name: 99bd1f5b9a1a20bfeefe15c00d96a34a5f40923e
2002-05-24 20:31:36 +00:00
drh 01f3f25376 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)

FossilOrigin-Name: e238643efdbe1394c7ff85e34e486f7c6082b6cc
2002-05-24 16:14:15 +00:00
drh 2e392e2c53 Added tests for multi-column primary keys. (CVS 585)
FossilOrigin-Name: ffc49e56b13096b35e6cbb1a2f7d546843d4a91d
2002-05-24 02:14:50 +00:00
drh ad3cab52fe 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)

FossilOrigin-Name: a167b71d8c27e870bc3079c6132e483bffc83298
2002-05-24 02:04:32 +00:00
drh bd5a451d5d 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)

FossilOrigin-Name: c53b0b9283c5c34def87d58b03fd979d03dc0890
2002-05-23 22:07:02 +00:00
drh 0b4efed236 Fix for ticket #50. (CVS 582)
FossilOrigin-Name: 82b74a494ac7c751a13e67dcfa7fffb1b98ec808
2002-05-23 13:15:37 +00:00
drh 07d6e3a74c 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)

FossilOrigin-Name: 4d27ee411902a197cd72416ca9da9197d3f87f13
2002-05-23 12:50:18 +00:00
drh e4697f5e90 Fix some places where a malloc() failure would lead to a segfault. (CVS 580)
FossilOrigin-Name: 01ad352c3c82a86d9c94010cbc85d098b8fbc08a
2002-05-23 02:09:03 +00:00
drh 1873cd508a Do not allow triggers on the SQLITE_MASTER table. (CVS 579)
FossilOrigin-Name: 275ba356f351abcf9a079ac16b765c9443750f0e
2002-05-23 00:30:31 +00:00
drh 97fc3d060a Fix for ticket #46: Report an error if a CREATE TABLE contains two or more
columns with the same name. (CVS 578)

FossilOrigin-Name: ba1953abd04671232cf9e93ab3f962fedbbdc508
2002-05-22 21:27:03 +00:00
drh 2ce1a6ec60 Fix for ticket #47: Use a cast to avoid a warning about discarding a "const"
inside of hash.c. (CVS 577)

FossilOrigin-Name: 0c903461533fabca7815e8cccbd3b712bcd22ddc
2002-05-21 23:44:30 +00:00
drh 2398937b7f Double-quoted strings resolve to column names if possible. Single-quoted
strings continue to be interpreted as string literals. (CVS 576)

FossilOrigin-Name: 55e7d65496624c8e48673d8747f3123786bfedbc
2002-05-21 13:43:04 +00:00
drh 1d1f30555d Clean up some compiler warnings. (CVS 575)
FossilOrigin-Name: 3399b01219b9e75b93587b5634d199d9e6fb6e42
2002-05-21 13:18:25 +00:00
drh b05789ff2b 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)

FossilOrigin-Name: f795afd63f19ab61c2b3b96621cb6dda31ce0379
2002-05-21 13:02:24 +00:00
drh 79b0c95687 Fix for ticket #45: Allow an UPDATE statement to change the INTEGER PRIMARY KEY
to itself without triggering a constraint error. (CVS 573)

FossilOrigin-Name: 592da1346872e1373bd13525d05d0f33c1056709
2002-05-21 12:56:43 +00:00
drh c977f7f596 Additional code cleanup resulting from a review of the new trigger code. (CVS 572)
FossilOrigin-Name: 37dbdd551e88440933066133ec9cc1e10b03fc1a
2002-05-21 11:38:11 +00:00
danielk1977 f29ce55958 Style fixes to triggers code in various *.c files (partial fix to ticket #39) (CVS 571)
FossilOrigin-Name: 8a4195c7466962291a296e8f53034ea8cb25005f
2002-05-19 23:43:12 +00:00
danielk1977 633ed08d95 Stylistic changes to src/trigger.c (partial fix to ticket #39). Also more comments. (CVS 570)
FossilOrigin-Name: b1d72cb5847a9f5f08e40b36ad117b5493232ea7
2002-05-17 00:05:58 +00:00
danielk1977 d99bc930f7 Fix for ticket #42: Added comments to structs Trigger, TriggerStep and TriggerStack. (CVS 569)
FossilOrigin-Name: 9ec8a2b139ce38312284d7b4eb61221b1e1e3052
2002-05-16 00:13:12 +00:00
drh b6b2de0c35 Fix a typo in the c_interface.html documentation file. (CVS 568)
FossilOrigin-Name: 454879fa400f8c67456a483e69342bf48e3a02a4
2002-05-15 23:26:22 +00:00
drh ce9079c8f2 Fix for ticket #41: Better handling of CREATE TRIGGER in the sqlite_complete()
function. (CVS 567)

FossilOrigin-Name: f45c4b767a6b1451787836060235ff7499dea0de
2002-05-15 14:17:44 +00:00
drh dc3794561f Beginning to clean up the trigger code. Still lots of work to do. (CVS 566)
FossilOrigin-Name: b10346818b25940c6dc85e94de8e36d20954161c
2002-05-15 12:45:43 +00:00
drh 9adf9ac4e4 Remove all tabs from the beginning of source code lines. Replace tabs with
the appropriate number of spaces. (CVS 565)

FossilOrigin-Name: 690f9a163173c4c7af7e8e92e942cee4184c7974
2002-05-15 11:44:13 +00:00
drh 5b87fa2a57 In the "lang.html" documentation file, put the CREATE TRIGGER and DROP TRIGGER
sections in alphabetical order. (CVS 564)

FossilOrigin-Name: d1d8642b57bd0765ade730248012d58b0859c12c
2002-05-15 11:43:16 +00:00
danielk1977 b38f58b51a Add the Makefile.in that was forgotten with checkin #562 (CVS 563)
FossilOrigin-Name: 29b8330ca6bfe32c499a045189683100f2b15246
2002-05-15 08:43:10 +00:00
danielk1977 c3f9bad209 Added FOR EACH ROW triggers functionality (CVS 562)
FossilOrigin-Name: 794bf67b6b36fce8854d5daff12f21dbb943240c
2002-05-15 08:30:12 +00:00
drh 9456bcc975 Version 2.4.12 (CVS 561)
FossilOrigin-Name: 06cdaf1c80f7bc25fc555c7c8a35258faed2d2e9
2002-05-10 14:41:54 +00:00
drh 4d908a3b43 Update the misuse.test script so that it will work under Windows. Changes
to the speed testing script to support version 2.4.12. (CVS 560)

FossilOrigin-Name: 232b7ef2c8207eb6d2564a641446267d3dec97af
2002-05-10 14:37:30 +00:00
drh c22bd47d55 Improvements to the SQLITE_MISUSE detection logic. Also added test cases
for this logic, including the new test file "misuse.test". (CVS 559)

FossilOrigin-Name: f42907ce457e012592f8c043dc6c915e87258b35
2002-05-10 13:14:07 +00:00
drh 247be43d60 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)

FossilOrigin-Name: a05fabd2df1cb38c555a7b2f31b0ca687db500c2
2002-05-10 05:44:55 +00:00
drh d5feede1ff Fix for ticket #35: Ignore any ORDER BY clause on a subquery in a FROM clause. (CVS 557)
FossilOrigin-Name: 1b0ee944c9af10078aba628e85d79f8682afa2b6
2002-05-08 21:46:14 +00:00
drh 0f18b450ad Fix for ticket #34: VIEWs ignore their ORDER BY clause. (CVS 556)
FossilOrigin-Name: 5f22d21571acedbd6348b61445a7c408cde8d229
2002-05-08 21:30:15 +00:00
drh 891da435d6 Version 2.4.11 (CVS 555)
FossilOrigin-Name: b13151794b42109a59ed34e6b9bce6ce90de537b
2002-05-08 12:03:50 +00:00