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 371862D45D for ; Fri, 26 Oct 2018 01:47:45 -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 vez1Za2mxQ7B for ; Fri, 26 Oct 2018 01:47:45 -0400 (EDT) Received: from smtp55.i.mail.ru (smtp55.i.mail.ru [217.69.128.35]) (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 6E9CB2D428 for ; Fri, 26 Oct 2018 01:47:44 -0400 (EDT) Date: Fri, 26 Oct 2018 08:47:41 +0300 From: Kirill Yukhin Subject: [tarantool-patches] Re: [PATCH] sql: fix fk set null clause Message-ID: <20181026054741.jikmu7uvxga7v6ua@tarantool.org> References: <20181009123750.3330-1-avkhatskevich@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20181009123750.3330-1-avkhatskevich@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: korablev@tarantool.org Hello, On 09 Oct 15:37, AKhatskevich wrote: > After changing behavior of the `IS` operator (#b3a3ddb571), > `SET NULL` was rewritten to use `EQ` instead. Which do not respect > NULLs. > > This commit fixes the null related behavior by emitting logical > constructions equivalent for this case to old `IS`. > Those constructions are not equal to the old `EQ` in common case. > Before: > `oldval` old_is `newval` > Now: > `oldval` is_null or (`newval` is_not_null and `oldval` eq `newval`) > > Closes #3645 > --- > Issue: https://github.com/tarantool/tarantool/issues/3645 > Branch: https://github.com/tarantool/tarantool/tree/kh/gh-3642-set-null > > src/box/sql/fkey.c | 49 ++++++++++++++------ > test/sql-tap/gh3645-set-null.test.lua | 84 +++++++++++++++++++++++++++++++++++ > 2 files changed, 119 insertions(+), 14 deletions(-) > create mode 100755 test/sql-tap/gh3645-set-null.test.lua I've pushed the patch to 2.1 branch. -- Regards, Kirill Yukhin