Commit 9f34225e authored by Dmitry Shulga's avatar Dmitry Shulga

MDEV-5816: Stored programs: validation of stored program statements

This is the prerequisite patch to remove the data member
sp_head::m_trg_table_fields and the method is_fields_updated_in_trigger
that used it but is not called anywhere in the source code.

The commit 5f1f2fc0 introduced the
data member sp_head::m_trg_table_fields and the method
Table_triggers_list::is_fields_updated_in_trigger() that used this data member.

The method Table_triggers_list::is_fields_updated_in_trigger() was invoked
by the method partition_info::can_prune_insert() also introduced by
the same commit 5f1f2fc0

The method partition_info::can_prune_insert() is not called anywhere
in the code and later these  methods were removed from the source code
but the data member sp_head::m_trg_table_fields wasn't.
So, remove the data member sp_head::m_trg_table_fields and declaration of
the method is_fields_updated_in_trigger() for purpose of code cleaning up.
parent 9e48460b
......@@ -323,15 +323,6 @@ class sp_head :private Query_arena,
*/
Security_context m_security_ctx;
/**
List of all items (Item_trigger_field objects) representing fields in
old/new version of row in trigger. We use this list for checking whenever
all such fields are valid at trigger creation time and for binding these
fields to TABLE object at table open (although for latter pointer to table
being opened is probably enough).
*/
SQL_I_List<Item_trigger_field> m_trg_table_fields;
protected:
sp_head(MEM_ROOT *mem_root, sp_package *parent, const Sp_handler *handler,
enum_sp_aggregate_type agg_type);
......
......@@ -145,7 +145,6 @@ class Trigger :public Sql_alloc
trg_action_time_type action_time;
uint action_order;
bool is_fields_updated_in_trigger(MY_BITMAP *used_fields);
void get_trigger_info(LEX_CSTRING *stmt, LEX_CSTRING *body,
LEX_STRING *definer);
/* Functions executed over each active trigger */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment