diff options
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/item.cc b/sql/item.cc index 24efc1f106f..6e26c204c0b 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -5350,9 +5350,14 @@ void Item_insert_value::print(String *str) void Item_trigger_field::setup_field(THD *thd, TABLE *table, GRANT_INFO *table_grant_info) { + /* + There is no sense in marking fields used by trigger with current value + of THD::query_id since it is completely unrelated to the THD::query_id + value for statements which will invoke trigger. So instead we use + Table_triggers_list::mark_fields_used() method which is called during + execution of these statements. + */ bool save_set_query_id= thd->set_query_id; - - /* TODO: Think more about consequences of this step. */ thd->set_query_id= 0; /* Try to find field by its name and if it will be found |