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 E87F5276DD for ; Mon, 6 Aug 2018 12:29:51 -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 ur6ylM44qXBq for ; Mon, 6 Aug 2018 12:29:51 -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 53029276DB for ; Mon, 6 Aug 2018 12:29:51 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: [tarantool-patches] Re: [PATCH v1 1/1] sql: fix segfault with check referencing new table From: "n.pettik" In-Reply-To: <9caa1c4097e37c7d2eed85d6d52ac3af724ccf34.1533571088.git.kshcherbatov@tarantool.org> Date: Mon, 6 Aug 2018 19:29:49 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: References: <9caa1c4097e37c7d2eed85d6d52ac3af724ccf34.1533571088.git.kshcherbatov@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: Kirill Shcherbatov > Starting with 9a54320 on tuple insertion in _space we Starting from. > make sql_checks_resolve_space_def_reference for checks Not make, but execute I guess.=20 > if any. During executing on_replace_dd_space trigger > box_space_id_by_name that takes a look to _space space > returnes not-nullable value, but the same time space Typos: at the same time, returns, non-nullable (but I guess not-null is likely to be more suitable). > object doesn't present in space chache and could not be Typos: isn't presented, cache, can=E2=80=99t be found by.=20 > found with space_by_id. > Before 1.10 path 0ecabde merged to 2.0 as a part of 13df2b1 Typo: patch, was merged. > box_space_id_by_name returned BOX_ID_NIL because of Used to return, due to. > "multi-engine transaction error" that is not rased in same Typo: is not raised. > situation now. >=20 > diff --git a/test/sql/checks.test.lua b/test/sql/checks.test.lua > index 7ff78fe..bbd6747 100644 > --- a/test/sql/checks.test.lua > +++ b/test/sql/checks.test.lua > @@ -43,4 +43,8 @@ format =3D {{name =3D 'X', type =3D 'unsigned'}} > t =3D {513, 1, 'test', 'memtx', 0, opts, format} > s =3D box.space._space:insert(t) >=20 > + It would be better if you put reference to issue here (sort of gh-xxxx: short description). > +box.sql.execute("CREATE TABLE w2 (s1 INT PRIMARY KEY, CHECK ((SELECT = COUNT(*) FROM w2) =3D 0));") > +box.sql.execute("DROP TABLE w2;") > + > test_run:cmd("clear filter") > --=20