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 62A9722B92 for ; Wed, 27 Jun 2018 14:04:41 -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 Ts4u1kONqF9c for ; Wed, 27 Jun 2018 14:04:41 -0400 (EDT) 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 turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 2304C20F4B for ; Wed, 27 Jun 2018 14:04:41 -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> From: Kirill Shcherbatov Message-ID: <02c40c29-8dec-d4dd-c645-216e14bdd5f9@tarantool.org> Date: Wed, 27 Jun 2018 21:04:39 +0300 MIME-Version: 1.0 In-Reply-To: <44395AB5-7067-46A9-A785-A0707686DCD9@tarantool.org> Content-Type: text/plain; charset="utf-8" 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 Cc: Nikita Pettik > 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.