From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id E128F2625B for ; Thu, 28 Jun 2018 15:17:40 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fpwFq3k91VxD for ; Thu, 28 Jun 2018 15:17:40 -0400 (EDT) Received: from smtp60.i.mail.ru (smtp60.i.mail.ru [217.69.128.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 9ECB824D90 for ; Thu, 28 Jun 2018 15:17:40 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v4 8/8] sql: remove global sql_trigger hash References: <81986d1f9307191bd3d3e37514dc32fadb7e6970.1530029141.git.kshcherbatov@tarantool.org> <1d6bcf87b16c4b7c64eb82d3da43adfabede0a7e.1530029141.git.kshcherbatov@tarantool.org> <44395AB5-7067-46A9-A785-A0707686DCD9@tarantool.org> <02c40c29-8dec-d4dd-c645-216e14bdd5f9@tarantool.org> From: Vladislav Shpilevoy Message-ID: <3e413ef3-4c4f-0337-32eb-b7d901248e9e@tarantool.org> Date: Thu, 28 Jun 2018 22:17:36 +0300 MIME-Version: 1.0 In-Reply-To: <02c40c29-8dec-d4dd-c645-216e14bdd5f9@tarantool.org> Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org, Kirill Shcherbatov Cc: Nikita Pettik Hello. Thanks for the patch! I have pushed my review fixes as a separate commit for this patch and for "sql: refactor trigger API functions". On 27/06/2018 21:04, Kirill Shcherbatov wrote: >> Typo: ‘contains’. >> It is better to say: ‘we can avoid storing AST pointers in HASH’. > Ok, tnx: > sql: remove global sql_trigger hash > > As new _trigger format contains space_id, we can avoid > storing AST pointers in HASH. Requested AST could be found > by name in appropriate space. > > Part of #3273. > >> Personally I would squash this commit with ’sql: move Triggers to server’, >> but it is up to you. > I'd like to keep it as is. > >> You can fit index_id and name_src in one line. > - int index_id, > - const char *name_src, > + int index_id,const char *name_src, > >> And add arg names to prototype. > -void vdbe_code_drop_trigger(Parse *, SrcList *, int); > +void > +vdbe_code_drop_trigger(struct Parse *parser, struct SrcList *name, int no_err); > >> I don’t see such flag. > - * present is raise_if_not_exists flag is set) in specified space. > + * present - configure with cond_opcodeq) in specified space. >> Lets drop ‘_ptr’ suffix. >> Lets call it with ’sql_’ prefix - this function is invoked from parser >> (see for instance sql_drop_table(), sql_drop_index() etc). > -vdbe_code_drop_trigger(struct Parse *parser, struct SrcList *name, int no_err) > +sql_drop_trigger(struct Parse *parser, struct SrcList *name, int no_err) > > -vdbe_code_drop_trigger_ptr(struct Parse *parser, const char *trigger_name) > +vdbe_code_drop_trigger(struct Parse *parser, const char *trigger_name) > >> Redundant diff. > dropped. >