diff options
author | Dmitry Shulga <dmitry.shulga@mariadb.com> | 2023-03-16 18:11:37 +0700 |
---|---|---|
committer | Dmitry Shulga <dmitry.shulga@mariadb.com> | 2023-03-16 18:40:32 +0700 |
commit | 525a9af15202abd4a88ad52286be6bb87c5393bd (patch) | |
tree | 14c8dc046214a806ddf6ef602afbd45bf43d3e41 | |
parent | 21d47e68eccf622017fcd2aa511e9718ffeaba55 (diff) | |
download | mariadb-git-525a9af15202abd4a88ad52286be6bb87c5393bd.tar.gz |
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.
-rw-r--r-- | sql/sp_head.h | 9 | ||||
-rw-r--r-- | sql/sql_trigger.h | 1 |
2 files changed, 0 insertions, 10 deletions
diff --git a/sql/sp_head.h b/sql/sp_head.h index 1f53520adfe..3e44fa13d14 100644 --- a/sql/sp_head.h +++ b/sql/sp_head.h @@ -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); diff --git a/sql/sql_trigger.h b/sql/sql_trigger.h index 774dca7cba1..a1b8a42f28d 100644 --- a/sql/sql_trigger.h +++ b/sql/sql_trigger.h @@ -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 */ |