#include <trigger_chain.h>
◆ Trigger_chain()
Trigger_chain::Trigger_chain |
( |
| ) |
|
|
default |
◆ ~Trigger_chain()
Trigger_chain::~Trigger_chain |
( |
| ) |
|
◆ add_tables_and_routines()
Iterate over the list of triggers and add tables and routines used by trigger to the set of elements used by statement.
- Parameters
-
[in] | thd | thread context |
[in,out] | prelocking_ctx | prelocking context of the statement |
[in] | table_list | Table_ref for the table |
◆ add_trigger() [1/2]
bool Trigger_chain::add_trigger |
( |
MEM_ROOT * |
mem_root, |
|
|
Trigger * |
new_trigger |
|
) |
| |
Add a new trigger into the list of triggers with the same ACTION/TIMING value combination.
This method is called when a trigger is loaded from Data Dictionary.
- Parameters
-
mem_root | memory root for allocations |
new_trigger | pointer to the Trigger to add into the list |
- Returns
- Operation status.
- Return values
-
false | Success. |
true | Failure. |
◆ add_trigger() [2/2]
Add a new trigger into the list of triggers with the same ACTION/TIMING value combination.
This method is called during handling of statement CREATE TRIGGER.
- Parameters
-
mem_root | memory root for allocations |
new_trigger | pointer to the Trigger to add into the list |
ordering_clause | trigger ordering clause (FOLLOWS/PRECEDES) |
referenced_trigger_name | trigger name referenced by clause FOLLOWS/PRECEDES in the CREATE TRIGGER statement |
- Returns
- Operation status.
- Return values
-
false | Success. |
true | Failure: either trigger not found or OOM. Set error in Diagnostic_area in case when trigger not found. |
◆ execute_triggers()
bool Trigger_chain::execute_triggers |
( |
THD * |
thd | ) |
|
Run every trigger in the list of triggers.
- Parameters
-
- Returns
- Result of trigger execution
- Return values
-
false | all triggers in the list were executed successfully. |
true | some trigger was failed. We stop triggers execution on the first failed trigger and don't attempt to finish the rest of triggers located after the failed one. |
◆ get_trigger_list()
- Returns
- a reference to the list of triggers with the same EVENT/ACTION_TIME assigned to the table.
◆ has_updated_trigger_fields()
bool Trigger_chain::has_updated_trigger_fields |
( |
const MY_BITMAP * |
used_fields | ) |
|
Iterate over the list of triggers and check whether some table's fields are used in any trigger.
- Parameters
-
[in] | used_fields | bitmap of fields to check |
- Returns
- Check result
- Return values
-
true | Some table fields are used in trigger |
false | None of table fields are used in trigger |
◆ mark_fields()
void Trigger_chain::mark_fields |
( |
TABLE * |
subject_table | ) |
|
Iterate over the list of triggers and mark fields of subject table which we read/set in every trigger.
- Parameters
-
[in] | subject_table | trigger subject table |
◆ m_triggers
List of triggers of this chain.
The documentation for this class was generated from the following files: