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 AAA1F26230 for ; Mon, 16 Jul 2018 08:28:02 -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 NIJXkYwKqiCD for ; Mon, 16 Jul 2018 08:28:02 -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 0F30125E7A for ; Mon, 16 Jul 2018 08:28:00 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v1 1/2] sql: restrict nullable action definitions References: <3155108e339f80906e3d4a3bd3a0885ed08e8ffc.1531413185.git.kshcherbatov@tarantool.org> <7c6f7d73-5b64-0076-38a4-41f8c0a5ebc4@tarantool.org> From: Kirill Shcherbatov Message-ID: <8e0147b6-9b28-39a1-c7e4-2fd50c05d6b3@tarantool.org> Date: Mon, 16 Jul 2018 15:27:58 +0300 MIME-Version: 1.0 In-Reply-To: <7c6f7d73-5b64-0076-38a4-41f8c0a5ebc4@tarantool.org> Content-Type: text/plain; charset=utf-8 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, Vladislav Shpilevoy > 1. No, is_primkey still is not removed. I see it in struct Column. I've removed is_primkey and struct Column at all in separate commit that would be sent next this letter. >> +ccons ::= NULL onconf(R). { >> + sqlite3AddNotNull(pParse, ON_CONFLICT_ACTION_NONE); >> + /* Trigger nullability mismatch error if required. */ >> + if (R != ON_CONFLICT_ACTION_DEFAULT) > > 2. Why do you need this check? >>> 4. This test does not work, it fails on syntax, but must fail on action. >>Ok, I've hacked to make it work this way. sqlite3AddNotNull would rise and error on rewriting on_conflict; ON_CONFLICT_ACTION_DEFAULT is returned when no ON CONFLICT action is specified. > 3. Why sqlite3AddNotNull is called when NULL is allowed? > Please, rename the function or split it or something. Renamed to sql_column_nullable_action_add as separate commit.