[tarantool-patches] Re: [PATCH] sql: raise err on CHECK + ON CONFLICT REPLACE

Kirill Yukhin kyukhin at tarantool.org
Fri Feb 8 17:22:22 MSK 2019


Hello,

On 04 Feb 20:05, Ivan Koptelov wrote:
>    On 04/02/2019 18:28, n.pettik wrote:
> 
> 
> On 4 Feb 2019, at 17:44, Ivan Koptelov [1]<ivan.koptelov at tarantool.org> wrote:
> 
> Adds error raise in case of CHECK constraint declared with ON
> CONFLICT REPLACE action. Before the patch such option was
> forbidden, but if a user tried to create space with such constraint,
> this attempt failed silently.
> 
> 
> What is more, now all on conflict actions are ignored for check
> constraints. So lets simply fix parser to disallow this clause.
> It is quite easy: all you need is to remove onconf rule after CHECK
> keyword:
> 
>    319  tcons ::= CHECK LP expr(E) RP onconf.
>    320                                   {sql_add_check_constraint(pParse,&E);}
> 
>    Thank you for the idea, done.
>    --
>  src/box/sql/parse.y         |  2 +-
>  test/sql-tap/check.test.lua | 37 ++++++++++++++++++++++++++++++++++++-
>  2 files changed, 37 insertions(+), 2 deletions(-)

I've checked your patch into 2.1 branch.

--
Regards, Kirill Yukhin




More information about the Tarantool-patches mailing list