Commit Graph

43 Commits

Author SHA1 Message Date
drh
6876dccbfe The previous fix for ticket [d85fffd6ffe856092ed8da] in check-in
[0a514e62ad1ebe5c12da8dae] did not completely address the
probably in that it only worked for cases where the OP_SCopy that loaded
the register was the last instruction in the sequence for the expression, which
is not necessarily the case for expressions like CASE...END.  This revision
prevents the registered that will be recomputed from being cached in the first
place.

FossilOrigin-Name: 9fd0faf517993587d2f54212638545fc85fbbc84a031bcfae8c1e5894825d83b
2018-04-26 18:34:26 +00:00
drh
909066bba0 Ensure that new.* values of an UPDATE do not get clobbered after the
BEFORE triggers run when unmodified columns of the row being updated are
reloaded.  Fix for ticket [d85fffd6ffe856092ed8da]

FossilOrigin-Name: 0a514e62ad1ebe5c12da8daed429ae2f9d9910471d3c5cef3b6870bdadfefca1
2018-04-26 15:50:10 +00:00
drh
de7ca50dac Clarification of the behavior of a BEFORE UPDATE trigger when the trigger
changes the values of some of the columns used to compute new columns in
the UPDATE.

FossilOrigin-Name: 7bb23c2a3d37f0d5e5515b917860818906819d54a0066e1ba8e9792a82f7d279
2018-04-26 15:04:18 +00:00
dan
dde548cb16 Ensure that when the VM applies TEXT affinity to a value it discards any existing REAL or INTEGER value.
FossilOrigin-Name: f5d0ce80792d58ef424300f973f8876d835ed4ad
2015-05-19 19:44:25 +00:00
drh
433dccfb52 Rename SQLITE_CONSTRAINT_RAISE to SQLITE_CONSTRAINT_TRIGGER. Put the
extended constraint error codes in alphabetical order.  Add many test cases
for the extended constraint error codes.

FossilOrigin-Name: 3f67437536591a1b0742a25b983707933aaa16d5
2013-02-09 15:37:11 +00:00
mistachkin
3038cfe90a Corrections to test names to eliminate duplicates and follow naming conventions.
FossilOrigin-Name: 50679889c75cd3205253b1682abfbddc5ff09175
2012-10-07 05:34:39 +00:00
dan
41fb5cd103 Shared-cache mode fixes for views and virtual tables.
FossilOrigin-Name: 2b370dea704b59262c604af0efcef5660b194454
2012-10-04 19:33:00 +00:00
dan
2f56da3f26 Changes to various test scripts so that veryquick.test runs with OMIT_COMPOUND_SELECT defined.
FossilOrigin-Name: 76bb649ee2633226324130f5898622c348f93769
2012-02-13 10:00:35 +00:00
drh
7b113bab79 Add support for multiple rows of VALUES in an INSERT statement.
FossilOrigin-Name: eb3b6a0ceb8bfb9fd59ff5fec420f863a9b5c4e4
2012-01-28 15:22:22 +00:00
mistachkin
fda06befd5 Add retry logic for AV defense to winOpen. Also, refactor test suite to allow the key Tcl file operations (e.g. copy and delete) to be retried.
FossilOrigin-Name: 9007586fdabed8dbcc78581ea9821cfd1f9a4c8c
2011-08-02 00:57:34 +00:00
dan
165921a742 Changes to support recursive triggers.
FossilOrigin-Name: 9b9c19211593d5ff7b39254a29c284560a8bcedb
2009-08-28 18:53:45 +00:00
drh
b1819a0b95 Make explicit the restrictions on UPDATE, DELETE, and INSERT statement syntax
within triggers.  Ticket #3947. (CVS 6840)

FossilOrigin-Name: c8bf40df7be728b11bb633516d1988c6064a9d70
2009-07-03 15:37:27 +00:00
danielk1977
510f96590b Fix an assert() failure that can occur if the user attempts to set an into an integer primary key column to a text value in a table that has a BEFORE UPDATE trigger. (CVS 5787)
FossilOrigin-Name: c2cf9d60d6626844193b008a37e4417aa0a0f323
2008-10-09 18:48:30 +00:00
danielk1977
5a8f9374ab Fixes to the test suite (no code changes) so that quick.test runs with OMIT_ATTACH builds. #2706. (CVS 4480)
FossilOrigin-Name: 07c00fffe50e8380748f7ae02328531a75d64610
2007-10-09 08:29:32 +00:00
drh
60218d2a0e The FOR EACH STATEMENT clause in a trigger is now a syntax error. It used
to be silently ignored.  STATEMENT is no longer a keyword. (CVS 3821)

FossilOrigin-Name: 8e2559b4da6329d7c21925d0850f7f91a3731975
2007-04-06 11:26:00 +00:00
drh
fdd48a76a6 Add support for IF EXISTS on CREATE/DROP TRIGGER/VIEW. Ticket #1899. (CVS 3406)
FossilOrigin-Name: e4fe736cfbbdc081581911a01690576034877b72
2006-09-11 23:45:48 +00:00
drh
e4df0e7497 Properly record the names of triggers even if the name is quoted.
Ticket #1737. (CVS 3158)

FossilOrigin-Name: 4ba280ddd66d5cbf617263d6300b7582f65d47a9
2006-03-29 00:24:06 +00:00
danielk1977
3bdca9c9a5 Test suite fixes for builds that define OMIT symbols. (CVS 2962)
FossilOrigin-Name: 3a54a33dcb7e765ee3773397407e8929a8cfe1a9
2006-01-17 09:35:01 +00:00
drh
bb7ac00bf0 Improved error message when a #NNN parameter appears on user input.
Additional coverage testing. (CVS 2582)

FossilOrigin-Name: 3c00f5982ae61dfcd26c33ccdb81736628dbfce5
2005-08-12 22:58:53 +00:00
danielk1977
53c0f7480b Add the SQLITE_OMIT_TEMPDB compile time macro. (CVS 2427)
FossilOrigin-Name: c41d55443c2dd532147962b87f542fb7d37075fd
2005-03-29 03:10:59 +00:00
danielk1977
e61b9f4f3c Modify test scripts to work when SQLITE_OMIT_SUBQUERY (but no other OMIT macros) is defined. (CVS 2252)
FossilOrigin-Name: d4e19efcef68d834c55c7d496cdb3696d63a31a2
2005-01-21 04:25:47 +00:00
drh
1398ad3639 Continued refactoring of the name resolution logic and query optimizer. (CVS 2236)
FossilOrigin-Name: d8b2a7e09187564fe66a2b4bf0992c6a017146cf
2005-01-19 23:24:50 +00:00
danielk1977
27c774388a Ensure tests pass when SQLITE_OMIT_COMPOUND_SELECT is defined. (CVS 2138)
FossilOrigin-Name: 007be591b7829f9ff38e4b14ba5a5043796c2ff3
2004-11-22 13:35:41 +00:00
danielk1977
125254784d Fix a test-suite error made in check-in (2132) (CVS 2136)
FossilOrigin-Name: 48c7eb7fb9fbc2166aaa7dbdb7c7e92c68f8eff3
2004-11-22 10:20:13 +00:00
danielk1977
0fa8ddbdec Modify test suite to work when SQLITE_OMIT_VIEW is defined. (CVS 2132)
FossilOrigin-Name: 711e8d7695dfc74b3f1ee00591dcdda2cd7fc7d5
2004-11-22 08:43:32 +00:00
drh
b7f9164e98 Insert #ifdefs that can optionally remove features at compiletime resulting
in a database engine with a smaller footprint. (CVS 2034)

FossilOrigin-Name: be661acfa849bb0d5692797dd221f5a8a457f8ad
2004-10-31 02:22:47 +00:00
danielk1977
d008cfe305 Fix for #764. When reloading the schema, load the temp schema last. (CVS 1628)
FossilOrigin-Name: 1f43219a7402af7255743466731dba2afb31d12b
2004-06-19 02:22:10 +00:00
drh
ef4ac8f9df Change the name of the TCL command from "sqlite" to "sqlite3" so that both
SQLite version 2 and SQLite version 3 can be used by Tcl at the same time. (CVS 1626)

FossilOrigin-Name: d705d051bed2b92b6c3bbcc75fe5b056633b9c31
2004-06-19 00:16:31 +00:00
danielk1977
ef2cb63e9e Allow CREATE and DROP TRIGGER on attached databases. (CVS 1488)
FossilOrigin-Name: 4060a37d0baaa60c50f2dde4a1ab344133fcabbb
2004-05-29 02:37:19 +00:00
drh
a1f9b5ee0b The sqlite_exec() function is now implemented using sqlite_compile() and
sqlite_step().  This opens up lots of opportunity to remove old code. (CVS 1240)

FossilOrigin-Name: 9771ad1e811e02e10bb738550fbea447749083c5
2004-02-14 16:31:02 +00:00
drh
3054efee07 All REPLACE INTO syntax inside of triggers. Ticket #610. (CVS 1231)
FossilOrigin-Name: a6b862a9db6d409a53cc13e7008b27d4848b5509
2004-02-12 17:28:13 +00:00
drh
191c0323c0 Allow quoted trigger names. Ticket #468. (CVS 1109)
FossilOrigin-Name: 54aa0fb236d17b53b194a667d68c71007c8e7687
2003-10-03 00:13:38 +00:00
drh
9b1b01bb76 Do not delete tables with the same name when dropping triggers.
Ticket #430. (CVS 1074)

FossilOrigin-Name: ef58f163b08d13f8e9b69459bd83e0bf9d5b404b
2003-08-16 12:37:51 +00:00
drh
ed717fe3b2 Enhance the "PRAGMA integrity_check" command to verify that all indices are
correctly constructed.  New calls to integrity_check are made in the test
suite. These changes are intended to prevent any future problems such
as seen in ticket #334. (CVS 1024)

FossilOrigin-Name: c9734c27074d2039a1896a8c6965c08d03711b13
2003-06-15 23:42:24 +00:00
drh
f26e09c87f Tighter binding of views, triggers, and indices to their respective
databases.  Ticket #323.  Much more testing needs to be done to the
sqliteFix...() routines in attach.c. (CVS 990)

FossilOrigin-Name: 7202d4f1a8853368954a967b7ccca9d8a6645a2e
2003-05-31 16:21:12 +00:00
drh
79a519c047 Prevent an infinite loop when deleting a table that has a TEMP trigger. (CVS 984)
FossilOrigin-Name: c8c823b068916711857fa67db10fb479999b55c2
2003-05-17 19:04:03 +00:00
drh
f0f258b11b Add support for TEMPORARY triggers. Such triggers can write temporary or
permanent tables. (CVS 926)

FossilOrigin-Name: 58ddd587b0f5d565ae3b0ba3a1fa5c20d459f3fc
2003-04-21 18:48:45 +00:00
drh
0be9df076a Fix a memory leak in triggers and update tests to show the latest error
message text. (CVS 886)

FossilOrigin-Name: b90d9de32d10a71fe81f5bfd0cf57faae8c5c3b4
2003-03-30 00:19:49 +00:00
drh
41a3bd0a01 Rename all tests so that the first part of the test name corresponds to the
file that contains that test.  This makes it much easier to find a particular
test after it fail. (CVS 749)

FossilOrigin-Name: 6cb80ae10af60863cc25c22a6442ba1d43b7409c
2002-09-14 12:04:56 +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
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
1873cd508a Do not allow triggers on the SQLITE_MASTER table. (CVS 579)
FossilOrigin-Name: 275ba356f351abcf9a079ac16b765c9443750f0e
2002-05-23 00:30:31 +00:00
danielk1977
c3f9bad209 Added FOR EACH ROW triggers functionality (CVS 562)
FossilOrigin-Name: 794bf67b6b36fce8854d5daff12f21dbb943240c
2002-05-15 08:30:12 +00:00