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 154A925FEE for ; Mon, 11 Jun 2018 04:33:17 -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 8ATWb70gJ8WG for ; Mon, 11 Jun 2018 04:33:17 -0400 (EDT) Received: from smtp39.i.mail.ru (smtp39.i.mail.ru [94.100.177.99]) (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 45F9625FEC for ; Mon, 11 Jun 2018 04:33:16 -0400 (EDT) Date: Mon, 11 Jun 2018 10:56:38 +0300 From: Kirill Yukhin Subject: [tarantool-patches] Re: [PATCH] sql: remove unnecessary def rebuild in endTable() Message-ID: <20180611075638.r4ngkrvbe27lscvu@tarantool.org> References: <20180607112419.37623-1-korablev@tarantool.org> <6cd9fb15-8073-9398-57ef-cd9094181ca4@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <6cd9fb15-8073-9398-57ef-cd9094181ca4@tarantool.org> 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 Hello, On 07 июн 15:31, Vladislav Shpilevoy wrote: > Thanks for the patch! LGTM. > > On 07/06/2018 14:24, Nikita Pettik wrote: > > sqlite3EndTable() routine is called twice during table creation: firsly > > after initial parsing alongside with generating VDBE program; secondly - > > as a callback in order to add struct Table to internal table hash. > > sqlite3EndTable() contains call of sql_table_def_rebuild() which in > > turn copies space_def to malloc. However, it makes no sence to call > > rebuild during the first stage, since this sample of struct Table will > > be destroyed at the end of initial parsing and will be resurrected at > > the second stage from the scratch. I've checked the patch into 2.0 branch. -- Regards, Kirill Yukhin