[Tarantool-patches] [PATCH v1 1/9] sql: remove redundant pointer in TriggerStep
Kirill Shcherbatov
kshcherbatov at tarantool.org
Mon Oct 14 19:03:16 MSK 2019
The trigger pointer in the sql_trigger structure is a dead code
now, so it could be deleted.
Needed for #4343
---
src/box/sql/fk_constraint.c | 1 -
src/box/sql/sqlInt.h | 2 --
src/box/sql/trigger.c | 1 -
3 files changed, 4 deletions(-)
diff --git a/src/box/sql/fk_constraint.c b/src/box/sql/fk_constraint.c
index 4717677f7..482220a95 100644
--- a/src/box/sql/fk_constraint.c
+++ b/src/box/sql/fk_constraint.c
@@ -895,7 +895,6 @@ fk_constraint_action_trigger(struct Parse *pParse, struct space_def *def,
step->op = TK_UPDATE;
}
- step->trigger = trigger;
if (is_update) {
fk->on_update_trigger = trigger;
trigger->op = TK_UPDATE;
diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h
index 35fc81dfb..1b6d92cb1 100644
--- a/src/box/sql/sqlInt.h
+++ b/src/box/sql/sqlInt.h
@@ -2366,8 +2366,6 @@ struct sql_trigger {
struct TriggerStep {
u8 op; /* One of TK_DELETE, TK_UPDATE, TK_INSERT, TK_SELECT */
u8 orconf; /* ON_CONFLICT_ACTION_ROLLBACK etc. */
- /** The trigger that this step is a part of */
- struct sql_trigger *trigger;
Select *pSelect; /* SELECT statement or RHS of INSERT INTO SELECT ... */
char *zTarget; /* Target table for DELETE, UPDATE, INSERT */
Expr *pWhere; /* The WHERE clause for DELETE or UPDATE steps */
diff --git a/src/box/sql/trigger.c b/src/box/sql/trigger.c
index d746ef893..0c387bc3b 100644
--- a/src/box/sql/trigger.c
+++ b/src/box/sql/trigger.c
@@ -170,7 +170,6 @@ sql_trigger_finish(struct Parse *parse, struct TriggerStep *step_list,
char *trigger_name = trigger->zName;
trigger->step_list = step_list;
while (step_list != NULL) {
- step_list->trigger = trigger;
step_list = step_list->pNext;
}
--
2.23.0
More information about the Tarantool-patches
mailing list