mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-5816: Stored programs: validation of stored program statements
This is the prerequisite patch to move the data member LEX::trg_table_fields to the class sp_head and rename it as m_trg_table_fields. This data member is used for handling OLD/NEW pseudo-rows inside a trigger body and in order to be able to re-parse a trigger body the data member must be moved from the struct LEX to the class sp_head.
This commit is contained in:
@@ -939,7 +939,7 @@ bool Table_triggers_list::create_trigger(THD *thd, TABLE_LIST *tables,
|
||||
*/
|
||||
old_field= new_field= table->field;
|
||||
|
||||
for (trg_field= lex->trg_table_fields.first;
|
||||
for (trg_field= lex->sphead->m_trg_table_fields.first;
|
||||
trg_field; trg_field= trg_field->next_trg_field)
|
||||
{
|
||||
/*
|
||||
@@ -1797,7 +1797,7 @@ bool Table_triggers_list::check_n_load(THD *thd, const LEX_CSTRING *db,
|
||||
in old/new versions of row in trigger into lists containing all such
|
||||
objects for the trigger_list with same action and timing.
|
||||
*/
|
||||
trigger->trigger_fields= lex.trg_table_fields.first;
|
||||
trigger->trigger_fields= sp->m_trg_table_fields.first;
|
||||
/*
|
||||
Also let us bind these objects to Field objects in table being
|
||||
opened.
|
||||
@@ -1807,7 +1807,7 @@ bool Table_triggers_list::check_n_load(THD *thd, const LEX_CSTRING *db,
|
||||
SELECT)...
|
||||
Anyway some things can be checked only during trigger execution.
|
||||
*/
|
||||
for (Item_trigger_field *trg_field= lex.trg_table_fields.first;
|
||||
for (Item_trigger_field *trg_field= sp->m_trg_table_fields.first;
|
||||
trg_field;
|
||||
trg_field= trg_field->next_trg_field)
|
||||
{
|
||||
|
Reference in New Issue
Block a user