From: Kirill Shcherbatov <kshcherbatov@tarantool.org> To: tarantool-patches@freelists.org, tarantool-patches@dev.tarantool.org, kostja.osipov@gmail.com, korablev@tarantool.org Subject: [Tarantool-patches] [PATCH v1 1/9] sql: remove redundant pointer in TriggerStep Date: Mon, 14 Oct 2019 19:03:16 +0300 [thread overview] Message-ID: <1a3490ae4b2f0c2f47530fe6258c65f4430c6504.1571068485.git.kshcherbatov@tarantool.org> (raw) In-Reply-To: <cover.1571068485.git.kshcherbatov@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
next prev parent reply other threads:[~2019-10-14 16:03 UTC|newest] Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-10-14 16:03 [Tarantool-patches] [PATCH v1 0/9] schema: rework _trigger space Kirill Shcherbatov 2019-10-14 16:03 ` Kirill Shcherbatov [this message] 2019-10-15 15:35 ` [Tarantool-patches] [tarantool-patches] [PATCH v1 1/9] sql: remove redundant pointer in TriggerStep Nikita Pettik 2019-10-14 16:03 ` [Tarantool-patches] [PATCH v1 2/9] box: rename struct trigger to lua_trigger Kirill Shcherbatov 2019-10-17 7:33 ` Konstantin Osipov 2019-10-14 16:03 ` [Tarantool-patches] [PATCH v1 3/9] box: introduce trigger_event_manipulation enum Kirill Shcherbatov 2019-10-17 7:35 ` Konstantin Osipov 2019-10-14 16:03 ` [Tarantool-patches] [PATCH v1 4/9] box: introduce trigger_action_timing enum Kirill Shcherbatov 2019-10-14 16:03 ` [Tarantool-patches] [PATCH v1 5/9] sql: use rlist to organize triggers in a list Kirill Shcherbatov 2019-10-17 7:36 ` Konstantin Osipov 2019-10-14 16:03 ` [Tarantool-patches] [PATCH v1 6/9] sql: rework CREATE TABLE rule in parser Kirill Shcherbatov 2019-10-14 16:03 ` [Tarantool-patches] [PATCH v1 7/9] sql: wrap all ASTs in sql_trigger_expr structure Kirill Shcherbatov 2019-10-14 16:03 ` [Tarantool-patches] [PATCH v1 8/9] sql: inherit sql_trigger from a new trigger class Kirill Shcherbatov 2019-10-17 7:38 ` Konstantin Osipov 2019-10-14 16:03 ` [Tarantool-patches] [PATCH v1 9/9] schema: rework _trigger system space Kirill Shcherbatov 2019-10-17 7:44 ` Konstantin Osipov 2019-10-15 21:34 ` [Tarantool-patches] [tarantool-patches] [PATCH v1 0/9] schema: rework _trigger space Nikita Pettik 2019-10-16 5:57 ` Konstantin Osipov 2019-10-16 5:58 ` Konstantin Osipov 2019-10-16 11:07 ` Nikita Pettik 2019-10-16 11:11 ` Konstantin Osipov 2019-10-16 12:18 ` Nikita Pettik 2019-10-16 12:32 ` Konstantin Osipov 2019-10-16 12:47 ` Nikita Pettik 2019-10-16 12:53 ` Konstantin Osipov 2019-10-16 13:13 ` Nikita Pettik 2019-10-16 14:18 ` Konstantin Osipov 2019-10-16 12:53 ` [Tarantool-patches] [tarantool-patches] " Kirill Shcherbatov 2019-10-16 13:31 ` Nikita Pettik 2019-10-16 13:47 ` Kirill Shcherbatov 2019-10-16 20:27 ` Vladislav Shpilevoy
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1a3490ae4b2f0c2f47530fe6258c65f4430c6504.1571068485.git.kshcherbatov@tarantool.org \ --to=kshcherbatov@tarantool.org \ --cc=korablev@tarantool.org \ --cc=kostja.osipov@gmail.com \ --cc=tarantool-patches@dev.tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='Re: [Tarantool-patches] [PATCH v1 1/9] sql: remove redundant pointer in TriggerStep' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox