aboutsummaryrefslogtreecommitdiff
path: root/src/trigger.c
Commit message (Collapse)AuthorAge
...
* Fix an issue with RETURNING from UPSERT.drh2021-02-04
| | | FossilOrigin-Name: 757b74ba0fd64634a365bd73955181191767ad8816a33a362e32ece250299a51
* Snapshot. New design appears to work on a simple test case.drh2021-02-04
| | | FossilOrigin-Name: 8a65fbeecf3597e30853c5f0ccd9b8b46c508854fa521e58e0db279deebca7d4
* Preliminary changes for a new implementation of RETURNING that captures alldrh2021-02-04
| | | | | | | results in a buffer and plays them all back after the DML statement completes. This avoids problems with interleaved DML statements. This particular check-in is a non-functional work in progress. FossilOrigin-Name: 04b77d63216ce11b4e797946953bcde504fc005807c7a5ac757fbf47d78698dc
* Modify the SQLITE_DBCONFIG_ENABLE_TRIGGER setting so that it only disablesdrh2021-02-03
| | | | | | | | main-schema triggers and allows TEMP trigger to continue operating. This is safe, since only the application (not an attacker) can add TEMP triggers. It will also all us to disengage SQLITE_DBCONFIG_ENABLE_TRIGGER on Fossil databases since Fossil has no main-schema triggers but does use TEMP triggers. FossilOrigin-Name: a10c5a2503ff2998f6ee40f721aab8c9579052e535dc141bd57d10551eaea387
* Do not allow aggregates in a RETURNING clause. Fix a memory leak thatdrh2021-02-02
| | | | | occurs when window functions are used in a RETURNING clause. FossilOrigin-Name: 2e9bd94b9ad37c7e4123b7324f2fe42d3609a65af449eb8a0064057647709a73
* Report an error if RETURNING is used for DELETE or UPDATE of a virtual table.drh2021-02-02
| | | FossilOrigin-Name: bd5dee8425327fde0429043ce325b910f1b7951988d9a448a8eeeb713a46bc81
* Allow the RETURNING trigger to exist for virtual tables.drh2021-02-02
| | | FossilOrigin-Name: 2f244ab4a2ba2bdb608cf44ef02e00738ad58c10a76d9e4222dc843a17103d92
* Modify RETURNING so that it does not return changes implemented bydrh2021-02-01
| | | | | cascading foreign keys or by triggers. FossilOrigin-Name: 6e62470a737cbde7f3fdcd027b98eb0b3dd11d063c63501d3c18448e93f5959f
* Mark an unreachable branch as ALWAYS().drh2021-01-31
| | | FossilOrigin-Name: cb8b797a64f65fca01c5faaeb30cbe4a53b56b81e696d1b62a90362d7ef8f924
* When setting the number of result columns in a RETURNING trigger, be suredrh2021-01-31
| | | | | | to set that value in the top-level bytecode program, not in the immediate caller of the trigger. FossilOrigin-Name: 1f1ce7ceb9807d22efea496f33908040ee196a31cd192f27ec0fb3e23afb729c
* Improved comments on the new code.drh2021-01-30
| | | FossilOrigin-Name: a38f0c1d7c1d7635732ac370d8fbc7e6a2005378e4621da7bc4f51a2f99912d1
* Fix a memory deallocation problem that comes up when doing a RETURNING querydrh2021-01-30
| | | | | | on a corrupt database. I think I fixed this before, but it got unfixed with stale editor content. FossilOrigin-Name: 02b1415efb7d9849499afe4e9dbf7e470484bf144d6ca3d28fdc38fc0ac10afa
* Another attempt to get trigger selection correct for RETURNING triggers.drh2021-01-30
| | | FossilOrigin-Name: 1b8ed52275a54800df90682d694b482f55f26c6c4a420659f9a3b7bfc61e8abe
* 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