From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id A6A5243D67A for ; Mon, 14 Oct 2019 19:03:26 +0300 (MSK) From: Kirill Shcherbatov Date: Mon, 14 Oct 2019 19:03:16 +0300 Message-Id: <1a3490ae4b2f0c2f47530fe6258c65f4430c6504.1571068485.git.kshcherbatov@tarantool.org> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v1 1/9] sql: remove redundant pointer in TriggerStep List-Id: Tarantool development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@freelists.org, tarantool-patches@dev.tarantool.org, kostja.osipov@gmail.com, korablev@tarantool.org 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