summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Shulga <dmitry.shulga@mariadb.com>2022-12-20 15:08:11 +0700
committerDmitry Shulga <dmitry.shulga@mariadb.com>2022-12-20 15:08:11 +0700
commit72614b7074d3d171b4310ce5d7ab7e0b4ea68b41 (patch)
treedeb268da72b3de1409fb43a316302706e9b0f1c0
parent584f57a2299e69e56667297a4e31ece8e1bc6d87 (diff)
downloadmariadb-git-72614b7074d3d171b4310ce5d7ab7e0b4ea68b41.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 But the method partition_info::can_prune_insert() is not called anywhere in the code. Later, the aforementioned 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.h9
-rw-r--r--sql/sql_trigger.h1
2 files changed, 0 insertions, 10 deletions
diff --git a/sql/sp_head.h b/sql/sp_head.h
index 281b9118d63..457d0019028 100644
--- a/sql/sp_head.h
+++ b/sql/sp_head.h
@@ -324,15 +324,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 */