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 068062F869 for ; Thu, 15 Nov 2018 07:28:02 -0500 (EST) 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 CHJjqPraRF5T for ; Thu, 15 Nov 2018 07:28:01 -0500 (EST) 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 BBA012AD83 for ; Thu, 15 Nov 2018 07:28:01 -0500 (EST) Subject: [tarantool-patches] Re: [PATCH v2 0/2] sql: proper check for index in sqlite3Insert() References: From: Vladislav Shpilevoy Message-ID: <1fc2f260-3b62-5a7f-5cb7-9ca765af4a79@tarantool.org> Date: Thu, 15 Nov 2018 15:27:58 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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, imeevma@tarantool.org, Nikita Pettik Nikita, please, review. On 15/11/2018 15:09, imeevma@tarantool.org wrote: > In case when different fibers try to "INSERT INTO table" and > "DROP TABLE table" at the same time it is possible to get > SEGMENTATION FAULT because INSERT tried to use nonexistent index. > > Patch 1 adds a check for index in given space and do some > refactoring. > > Patch 2 do some refactoring. > > Changes in v2: > - Check that index exists instead of do less work if it doesn't. > - Refactoring: reduced "struct Table" usage. > - Refactoring: removed space_column_default_expr(). > > https://github.com/tarantool/tarantool/issues/3780 > https://github.com/tarantool/tarantool/tree/imeevma/gh-3780-proper-index-check > > Mergen Imeev (1): > sql: proper check for index in sqlite3Insert() > > Vladislav Shpilevoy (1): > sql: remove space_column_default_expr() > > src/box/sql.c | 14 ---------- > src/box/sql.h | 11 -------- > src/box/sql/insert.c | 68 +++++++++++++++++++++++------------------------- > test/sql/errinj.result | 33 +++++++++++++++++++++++ > test/sql/errinj.test.lua | 12 +++++++++ > 5 files changed, 78 insertions(+), 60 deletions(-) >