[tarantool-patches] Re: [PATCH] sql: fix fk set null clause
Kirill Yukhin
kyukhin at tarantool.org
Fri Oct 26 08:47:41 MSK 2018
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
More information about the Tarantool-patches
mailing list