aboutsummaryrefslogtreecommitdiff
path: root/src/trigger.c
Commit message (Collapse)AuthorAge
...
* When running the RETURNING trigger, if it is tagged as a DELETE trigger,drh2021-01-30
| | | | | do not use it as INSERT or UPDATE. FossilOrigin-Name: 3c7a6e04ddde34961d8e9d0443913e572a80853cf14a8263cec19523c39ca744
* Test cases added. RETURNING works with UPSERT as does PG.drh2021-01-30
| | | FossilOrigin-Name: f5698f96e27c9b8669ec6016bb9920ef7580c4146eb61d628a0f62be5135ce94
* Better handling of errors in RETURNING due to corrupt database files.drh2021-01-29
| | | FossilOrigin-Name: 6aa2a058d136d0b24d94c5cbe1ce447eb435c1a1c7cdce5e435f1548bb3f05e7
* Allow "*" wildcards in the RETURNING clause.drh2021-01-29
| | | FossilOrigin-Name: b0e3ae303db2a035583a05848ab7977e612d7e40c77e31ea9e0166de443c901f
* Working prototype.drh2021-01-29
| | | FossilOrigin-Name: b7ef4dc21f187ff4ff679e823782535188c3814aa6ce720b3a01c6d3ba4ef9f5
* Performance optimization (and size reduction) in sqlite3TriggerList() for thedrh2021-01-29
| | | | | common case where there are no TEMP triggers. FossilOrigin-Name: 0defaf730bdc82212a5d3feeb2e16f16423b1691b0aaa7da1787eb82ea39ae9e
* Add a linked list of ParseCleanup objects to the end of a Parse object anddrh2021-01-11
| | | | | | | use that list as a place to put other sub-objects that need to be deallocated. Have a single such list for infrequently used sub-objects is more efficient than doing an a separate check for each kind of sub-object. FossilOrigin-Name: affa2b7b316941b8a6c4d0d1ff212c81a593faf1d05d129e14d2b70d73a25c59
* Suppress errors associated with TEMP triggers that reference objects indrh2020-11-05
| | | | | | | | non-TEMP databases. This is a continuation of the fix for ticket #3810 shown in check-in [ba1afc040171810d] from [/timeline?c=trunk:200908061743|2009-08-06], based on a bug report in [forum:/forumpost/157dc791df|forum post 157dc791df] FossilOrigin-Name: 991ca9b26bacd8f6b64498057fe28f2068466a220f372fd365b6685f583f0e92
* Fix a double-free of the FROM clause of an UPDATE inside of triggers.drh2020-07-16
| | | FossilOrigin-Name: 706c8da2f6d9299f0ad3b3c93332b38071e8e88b4d1660c1841309919b64fd18
* Support UPDATE...FROM statements in trigger programs.dan2020-07-14
| | | FossilOrigin-Name: 4f6d8d0ebf40029218a1d3b05ea657c0c5953b01c6f0b6a628465aa44c67e7f3
* Further refactoring of the schema table name.drh2020-06-19
| | | FossilOrigin-Name: 9536fa0ae0c1ae6e2e98d2fa11e5acda7f3c9b8ca5061b6f7f8cae63a11d936b
* Provide "sqlite_schema" as an alternative name to the table that holds thedrh2020-06-15
| | | | | database schema. FossilOrigin-Name: 61782a7ae3c25cf59d7a676cb295eb024d17c46e532ae78c6fe871a91d712fa9
* Consolidate some code on this branch.dan2020-03-21
| | | FossilOrigin-Name: a85c63daa640e02fdfd891a05a1a09e848c9621a5dd6e112338451008623ecbb
* Allow "main" to be used to refer to the main database even after ↵dan2020-03-20
| | | | | SQLITE_DBCONFIG_MAINDBNAME has been used to assign another alias. FossilOrigin-Name: 75c85ca32f9ae4a28fd8f8ff2f7639599413d22af706e9799a0e76cc560d14eb
* Change the name of the Expr.a.zName field to zEName, so that it has a namedrh2019-12-12
| | | | | | that is distinct from other fields and variables and is hence easier to grep for. FossilOrigin-Name: d3783357f8fa76c42a86f12b214522f0388c37773c36ab8c5ce0623abbc4436a
* Avoid a crash that could occur when a database containing a table with a ↵dan2019-12-03
| | | | | temp trigger that has the same name as a temp table is detached. FossilOrigin-Name: c4cb9708d48ead10ee9543f86878be8382cd6e850950d5384c95254bac4a8d6e
* Add support for "ORDER BY ... NULLS FIRST" and "ORDER BY ... NULLS LAST". ↵dan2019-08-27
|\ | | | | | | | | Use this to fix ticket [f8a7060e]. FossilOrigin-Name: 94085fb3e756bc984237b74b6e29c68462ad860870c64dcb5124feaeec387660
| * Prevent NULLS FIRST/LAST from being used in CREATE INDEX and other statements.dan2019-08-19
| | | | | | FossilOrigin-Name: bb9767a287097a615aeb4abdba689b10e1a1c36c016c8e55905b508075e62c86
* | If a TEMP TRIGGER references an auxiliary schema, and that auxiliary schemadrh2019-08-27
|/ | | | | | is detached, move the trigger to reference the TEMP schema before completing the detach, so that the trigger does not hold a dangling schema pointer. FossilOrigin-Name: 069c2f4c61f06211a8981abc412afcc1536ece13380b13a70aa99123f8f527cd
* Validate the type, name, and tbl_name fields of the sqlite_master table whendrh2019-08-12
| | | | | loading the schema, unless writable_schema is engaged. FossilOrigin-Name: 724f4df9ccc2b683f7091a3f7a8c20ee210f44d7a610cd1b4c49da1c274add08
* Add new assert() statements in an attempt to help static analyzers avoiddrh2019-07-16
| | | | | false-positives. FossilOrigin-Name: 9e66458592d40fbd96ea5f21339573110ca1cfe328238a020c9420a87d35dd72
* Revamp the SrcList allocator routines to be methods of Parse instead ofdrh2019-01-17
| | | | | | being methods of the "sqlite3" object, so that they can leave better error messages when the SrcList object grows too large. FossilOrigin-Name: df08d472b090b212fb77ce2aae0e1ffe79ae5db4b1accf55e6fdb18e8b0a7098
* A new implementation of sqlite3VdbeMakeLabel() is faster and makes fewerdrh2018-12-29
| | | | | | | | | memory allocations by deferring memory allocation until sqlite3VdbeResolveLabel() is called, at which point the code generator has a better idea of how big the relocation table needs to be. The sqlite3VdbeMakeLabel() routine now takes a Parse* parameter instead of Vdbe*. FossilOrigin-Name: 4a0929ac76d8aa5dd65eac3b83d6bbf41e505e01d175ca0fb2b19ba02d439415
* Add new sqlite3_prepare_v3() flag SQLITE_PREPARE_NO_VTAB, for preparingdan2018-12-21
| | | | | | | statements that are not allowed to use any virtual tables. Use this to prevent circular references in triggers on virtual table shadow tables from causing resource leaks. FossilOrigin-Name: 25666e3d03950caf753295cdb55df162e07dbcf6840b05875c6e0b127c469ecb
* Extend RENAME TABLE to edit triggers and views. Still buggy.dan2018-08-29
| | | FossilOrigin-Name: 01308bae3acf33f78b5bb90892085eab340df093aafc17e6ccf6a7d6cf324897
* (no comment)dan2018-08-15
| | | FossilOrigin-Name: e272dc2b1c0edab59a40f32c77c81a3e636937280524161eff5669cb0046ad84
* Edit the WHEN and UPDATE OF clauses of trigger programs as part of ALTER TABLEdan2018-08-13
| | | | | RENAME COLUMN. FossilOrigin-Name: 5fdb6b0aafba727139e1937ef5950e4434a77f95a10fc46f8010ca2de3922326
* Add new testcase() macros and fix a bug that was revealed when trying todrh2018-04-18
| | | | | cover all the new test cases. FossilOrigin-Name: 266a99f7c068aadbd08157d1d495a428109ad7a32d872f8026e8db0f89c40f91
* Add support for the "excluded.*" names in the UPDATE clause of an upsert.drh2018-04-16
| | | FossilOrigin-Name: 0203f34faae07fbea0bff2d23b81fb37df8854cded4cdadac5a034132a096b6d
* Add the Upsert object for holding upsert clause information.drh2018-04-12
| | | FossilOrigin-Name: d83eaed539b274c2abd650d07522f491865d4917acbb64d05d01b3ba5c3cd446
* More complete parsing of UPSERT, including UPSERT within a trigger.drh2018-04-07
| | | | | | The sqlite3Insert() logic to actually perform the UPSERT is not yet implemented, however. FossilOrigin-Name: 5cc2a5a315a2f26b392811de45b3dc352873a173c2c6c65f37ce2e5f88a71cd2
* Omit all sqlite3_trace() output from the triggers associated withdrh2017-12-27
| | | | | foreign key constraints. FossilOrigin-Name: fda08e3d10cc850664a356efdafcfc68187053849e1b00991b0b35d892a6776b
* Show the text of individual statements within a trigger, as theydrh2017-12-27
| | | | | execute, as comments in the output from sqlite3_trace() and sqlite3_trace_v2(). FossilOrigin-Name: fe3d2b97d8945e6a9636472f77bcdc92cc5dda8b3e6e3a4fcbdd0a212ea5b9aa
* Fix an assertion fault found by OSSFuzz.dan2017-11-28
| | | FossilOrigin-Name: 75d699877fa7d06d30285ecf008fbedfdf68cc7965bb328c96f5a931d1f13f04
* In the parse tree, combine LIMIT and OFFSET into a single expression rooteddrh2017-11-14
| | | | | | on a TK_LIMIT node, for a small code size reduction and performance increase, and a reduction in code complexity. FossilOrigin-Name: 3925facd942c9df663f9b29b1e6f94f6be14af8c2b99eb691bfc836b4c220826
* Omit some extra code from non-SQLITE_ENABLE_UPDATE_DELETE_LIMIT builds.dan2017-11-10
| | | FossilOrigin-Name: 72be33f9c84de3ec4afc40549482417456ca82c1d16b473dc034b144055271e5
* Add the new sqlite3.mDbFlags field. Factor out bits of sqlite3.flags thatdrh2017-07-26
| | | | | do not interact with PRAGMA statements into sqlite3.mDbFlags. FossilOrigin-Name: 3808a00f06d372cc531da039d97bd974e4a6576a30cf63bf562f83f186b313b3
* Add a testcase() to confirm that an OOM on sqlite3DbStrNDup() is handleddrh2017-06-08
| | | | | correctly in trigger.c. FossilOrigin-Name: 343e55992f503efa662e49bb0f3c0d798defd0a11f2ee1c36968902fa7e06823
* All temp.sqlite_master to be used as an alias for sqlite_temp_master.drh2016-12-16
| | | FossilOrigin-Name: 8d646905b830d5bb29092e103ac5cb499b3c7e5a
* Revise the implementation of OP_Once so that it is smaller, faster, and usesdrh2016-09-18
| | | | | | less memory. This also fixes an obscure bug introduced 3 days ago by check-in [5990a1bdb4a073]. FossilOrigin-Name: 6bf5ba10d28f1b0a32aa9a560ae3143a1235eadb
* Fix SQLITE_OMIT_AUTHORIZATION so that it compiles cleanly.drh2016-09-16
| | | FossilOrigin-Name: a3e3b3e1c57178ccd38fc7375ec1de8e8ae45372
* Rename the Db.zName field to Db.zDbSName to make it more descriptive and todrh2016-08-18
| | | | | | distinguish it from all of the other "zName" variables scattered throughout the code. FossilOrigin-Name: 92a22f01343a898455fd61c3b8e7d7c954f5b569
* Improvements to the way that OOM errors are processed.drh2016-02-05
| | | FossilOrigin-Name: c3ef03478a5788c855b3aef385d43ae7f494f440
* Add the sqlite3TokenInit() utility function.drh2016-01-22
| | | FossilOrigin-Name: 7323175337b7ba85ac932ca892b28860f6a5b688
* Use sqlite3VdbeAddOp4() rather than a separate sqlite3VdbeChangeP4() call, fordrh2016-01-16
| | | | | a slightly smaller and faster binary. FossilOrigin-Name: a4258cd4613c55acacb5c7b61faa3de7eb0759d2
* Simplification of the DROP TRIGGER logic using sqlite3NestedParse() insteaddrh2015-12-09
| | | | | | of hand-coded VDBE code. This is a manual cherry-pick of the key change from check-in [c80bbf14b365d]. FossilOrigin-Name: 8021b4c8139ba56d6b1e2e26aeec4f9bf77f37c9
* Ensure that tables names are dequoted exactly once by the trigger logic.dan2015-04-21
| | | FossilOrigin-Name: 9d887b92f8086961e045f8acb9ee7a443796d411
* Fix some identifier name de-quoting issues in the foreign key and trigger logic.drh2015-04-21
| | | FossilOrigin-Name: 59e92bd9521f1e8315a9a7e7fd3d63b0c75eaf0e
* Remove unnecessary parser error count increments. Let the sqlite3ErrorMsg()drh2015-04-17
| | | | | take care of doing that. FossilOrigin-Name: 3f3b0f683af2fbee83811536f6bef770ff919385
* Make sure errors in coding triggers are propagated back up to the parser.drh2015-04-16
| | | FossilOrigin-Name: 928f973ca9adc7933015b2fb6b6fcb8e3154cb9c