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 B4C2E27874 for ; Wed, 18 Jul 2018 20:24:16 -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 CylAjSYX1Mzb for ; Wed, 18 Jul 2018 20:24:16 -0400 (EDT) Received: from smtp36.i.mail.ru (smtp36.i.mail.ru [94.100.177.96]) (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 707092441A for ; Wed, 18 Jul 2018 20:24:16 -0400 (EDT) From: "n.pettik" Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_3EC11D58-63D3-4FE1-B29B-5C170A2203DE" Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: [tarantool-patches] Re: [PATCH] sql: Remove 'BEGIN TRANSACTION' Date: Thu, 19 Jul 2018 03:24:08 +0300 In-Reply-To: References: <1530787337-18302-1-git-send-email-hollow653@gmail.com> 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: "N. Tatunov" --Apple-Mail=_3EC11D58-63D3-4FE1-B29B-5C170A2203DE Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > diff --git a/extra/lempar.c b/extra/lempar.c > index 00fd79c..d043e39 100644 > --- a/extra/lempar.c > +++ b/extra/lempar.c > @@ -336,8 +336,8 @@ void *ParseAlloc(void *(*mallocProc)(YYMALLOCARGTYPE)){ > if( pParser ){ > #ifdef YYTRACKMAXSTACKDEPTH > pParser->yyhwm = 0; > - pParser->is_fallback_failed = false; > #endif > + pParser->is_fallback_failed = false; Could you please explain this code movement? > +++ b/test/sql-tap/start-transaction.test.lua > @@ -0,0 +1,266 @@ > +#!/usr/bin/env tarantool > +test = require("sqltester") > +test:plan(21) > + > +test:do_catchsql_test( > + "start-transaction-1.0", > + [[ > + CREATE TABLE IF NOT EXISTS t(id int PRIMARY KEY); > + DELETE FROM t; > + BEGIN; > + INSERT INTO t VALUES (1); > + INSERT INTO t VALUES (2); > + COMMIT; > + ]], { > + -- > + 1, "near \"BEGIN\": syntax error" > + -- > + }) > + > +test:do_execsql_test( > + "start-transaction-1.1", > + [[ > + SELECT * FROM t; > + ]], { > + -- > + > + -- > + }) > + > +test:do_catchsql_test( > + "start-transaction-1.2", > + [[ > + CREATE TABLE IF NOT EXISTS t(id int primary key); > + delete from t; We write SQL queries in upper-case. Fix it in other places too. --Apple-Mail=_3EC11D58-63D3-4FE1-B29B-5C170A2203DE Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

diff --git = a/extra/lempar.c b/extra/lempar.c
index = 00fd79c..d043e39 100644
--- = a/extra/lempar.c
+++ b/extra/lempar.c
@@ -336,8 +336,8 @@ void *ParseAlloc(void = *(*mallocProc)(YYMALLOCARGTYPE)){
   if( = pParser ){
 #ifdef = YYTRACKMAXSTACKDEPTH
    =  pParser->yyhwm =3D 0;
-    = pParser->is_fallback_failed =3D false;
 #endif
+    = pParser->is_fallback_failed =3D = false;

Could you please explain this code = movement?

+++ = b/test/sql-tap/start-transaction.test.lua
@@ -0,0 = +1,266 @@
+#!/usr/bin/env tarantool
+test =3D require("sqltester")
+test:plan(21)
+
+test:do_catchsql_test(
+ = "start-transaction-1.0",
+ [[
+ = CREATE TABLE IF NOT EXISTS t(id int PRIMARY KEY);
+ = DELETE FROM t;
+ BEGIN;
+ = INSERT INTO t VALUES (1);
+ = INSERT INTO t VALUES (2);
+ = COMMIT;
+ ]], {
+ -- = <start-transaction-1.0>
+ 1, "near = \"BEGIN\": syntax error"
+ -- = <start-transaction-1.0>
+ })
+
+test:do_execsql_test(
+ = "start-transaction-1.1",
+ [[
+ = SELECT * FROM t;
+ ]], {
+ -- = <start-transaction-1.1>
+
+ = -- <start-transaction-1.1>
+ })
+
+test:do_catchsql_test(
+ = "start-transaction-1.2",
+ [[
+ = CREATE TABLE IF NOT EXISTS t(id int primary key);
+ = delete from t;

We write SQL queries in upper-case. Fix it in = other places too.

= --Apple-Mail=_3EC11D58-63D3-4FE1-B29B-5C170A2203DE--