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 5f1f2fc0e443f098af24d21f7d1ec1a8166a4030 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 5f1f2fc0e443f098af24d21f7d1ec1a8166a4030

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.
This commit is contained in:
Dmitry Shulga 2023-07-19 17:45:39 +07:00
parent 9e48460bdb
commit 9f34225ec4
2 changed files with 0 additions and 10 deletions

View File

@ -323,15 +323,6 @@ public:
*/
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);

View File

@ -145,7 +145,6 @@ public:
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 */