From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> To: Kirill Shcherbatov <kshcherbatov@tarantool.org>, tarantool-patches@freelists.org Subject: [tarantool-patches] Re: [PATCH v3 09/10] sql: move Triggers to server Date: Mon, 18 Jun 2018 18:42:53 +0300 [thread overview] Message-ID: <0f277954-4d97-2896-7e4f-a3d78b87c4d1@tarantool.org> (raw) In-Reply-To: <eec464e1-0f11-1db8-f47f-7d0b3b330768@tarantool.org> Hello. Thanks for the fixes! See 3 comments below. On 15/06/2018 19:21, Kirill Shcherbatov wrote: >> 1. When you rollback insertion, that means you have no old_trigger. >> So sql_trigger_name(old_trigger) crashes. Please, add a test >> and fix the problem. > No, there is no problem. Maybe "old_trigger" is a little confusing name, but on_rollback->data = new_trigger; for insert and it is not NULL. > New ErrInjection test validates this case. > > --- a/test/sql/errinj.test.lua > +++ b/test/sql/errinj.test.lua > @@ -44,3 +44,18 @@ errinj.set("ERRINJ_IPROTO_TX_DELAY", false) > > box.sql.execute('DROP TABLE test') > box.schema.user.revoke('guest', 'read,write,execute', 'universe') > + > + 1. Please, start a sentence with capital letter and finish with dot. 2. Put here link to the issue of the form: -- -- gh-####: description. -- 3. I have pushed some fixes in a separate commit. Please, look and squash. After the patch will be LGTM. > +-- test crash on error.injection > +box.sql.execute("CREATE TABLE t1(id INTEGER PRIMARY KEY, a INTEGER);"); > +box.sql.execute("CREATE TABLE t2(id INTEGER PRIMARY KEY, a INTEGER);"); > +box.error.injection.set("ERRINJ_WAL_IO", true) > +box.sql.execute("CREATE TRIGGER t1t INSERT ON t1 BEGIN INSERT INTO t2 VALUES (1, 1); END;") > +box.sql.execute("CREATE INDEX t1a ON t1(a);") > +box.error.injection.set("ERRINJ_WAL_IO", false) > +box.sql.execute("CREATE TRIGGER t1t INSERT ON t1 BEGIN INSERT INTO t2 VALUES (1, 1); END;") > +box.sql.execute("INSERT INTO t1 VALUES (3, 3);") > +box.sql.execute("SELECT * from t1"); > +box.sql.execute("SELECT * from t2"); > +box.sql.execute("DROP TABLE t1;") > +box.sql.execute("DROP TABLE t2;") > >
next prev parent reply other threads:[~2018-06-18 15:42 UTC|newest] Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-06-14 17:32 [tarantool-patches] [PATCH v3 00/10] sql: remove " Kirill Shcherbatov 2018-06-14 17:32 ` [tarantool-patches] [PATCH v3 01/10] box: move db->pShchema init to sql_init Kirill Shcherbatov 2018-06-14 17:32 ` [tarantool-patches] [PATCH v3 10/10] sql: VDBE tests for trigger existence Kirill Shcherbatov 2018-06-14 19:27 ` [tarantool-patches] " Vladislav Shpilevoy 2018-06-15 16:21 ` Kirill Shcherbatov 2018-06-18 15:42 ` Vladislav Shpilevoy 2018-06-18 19:22 ` Kirill Shcherbatov 2018-06-19 10:24 ` Vladislav Shpilevoy 2018-06-19 15:12 ` Kirill Shcherbatov 2018-06-19 15:23 ` Vladislav Shpilevoy 2018-06-20 6:38 ` Kirill Shcherbatov 2018-06-20 8:10 ` Vladislav Shpilevoy 2018-06-20 8:24 ` Kirill Shcherbatov 2018-06-14 17:32 ` [tarantool-patches] [PATCH v3 02/10] sql: fix leak on CREATE TABLE and resolve self ref Kirill Shcherbatov 2018-06-14 22:46 ` [tarantool-patches] " n.pettik 2018-06-15 9:25 ` Vladislav Shpilevoy 2018-06-14 17:32 ` [tarantool-patches] [PATCH v3 03/10] sql: fix sql len in tarantoolSqlite3RenameTrigger Kirill Shcherbatov 2018-06-14 17:32 ` [tarantool-patches] [PATCH v3 04/10] box: port schema_find_id to C Kirill Shcherbatov 2018-06-14 19:27 ` [tarantool-patches] " Vladislav Shpilevoy 2018-06-14 22:46 ` n.pettik 2018-06-15 9:25 ` Vladislav Shpilevoy 2018-06-14 17:32 ` [tarantool-patches] [PATCH v3 05/10] sql: refactor sql_expr_compile to return AST Kirill Shcherbatov 2018-06-14 19:27 ` [tarantool-patches] " Vladislav Shpilevoy 2018-06-15 16:21 ` Kirill Shcherbatov 2018-06-14 17:32 ` [tarantool-patches] [PATCH v3 06/10] sql: move sqlite3DeleteTrigger to sql.h Kirill Shcherbatov 2018-06-14 19:27 ` [tarantool-patches] " Vladislav Shpilevoy 2018-06-14 17:32 ` [tarantool-patches] [PATCH v3 07/10] box: sort error codes in misc.test Kirill Shcherbatov 2018-06-14 17:32 ` [tarantool-patches] [PATCH v3 08/10] sql: new _trigger space format with space_id Kirill Shcherbatov 2018-06-14 19:27 ` [tarantool-patches] " Vladislav Shpilevoy 2018-06-15 16:21 ` Kirill Shcherbatov 2018-06-14 17:32 ` [tarantool-patches] [PATCH v3 09/10] sql: move Triggers to server Kirill Shcherbatov 2018-06-14 19:27 ` [tarantool-patches] " Vladislav Shpilevoy 2018-06-15 16:21 ` Kirill Shcherbatov 2018-06-18 15:42 ` Vladislav Shpilevoy [this message] 2018-06-18 19:22 ` Kirill Shcherbatov 2018-06-14 17:34 ` [tarantool-patches] Re: [PATCH v3 00/10] sql: remove " Kirill Shcherbatov 2018-06-20 8:35 ` Vladislav Shpilevoy 2018-06-28 15:47 ` n.pettik
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=0f277954-4d97-2896-7e4f-a3d78b87c4d1@tarantool.org \ --to=v.shpilevoy@tarantool.org \ --cc=kshcherbatov@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='[tarantool-patches] Re: [PATCH v3 09/10] sql: move Triggers to server' \ /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