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 DC65027BCE for ; Thu, 19 Jul 2018 10:03:37 -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 3Poi-nsYizbx for ; Thu, 19 Jul 2018 10:03:37 -0400 (EDT) Received: from smtp63.i.mail.ru (smtp63.i.mail.ru [217.69.128.43]) (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 95B0527BC1 for ; Thu, 19 Jul 2018 10:03:37 -0400 (EDT) From: "n.pettik" Message-Id: <40A96246-8FFD-4E6F-9FEC-5309A19D9DB8@tarantool.org> Content-Type: multipart/alternative; boundary="Apple-Mail=_83CDBFE5-6821-4C13-9D00-4906DC6013B2" 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 17:03:35 +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=_83CDBFE5-6821-4C13-9D00-4906DC6013B2 Content-Transfer-Encoding: quoted-printable 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 =3D 0; >> - pParser->is_fallback_failed =3D false; >> #endif >> + pParser->is_fallback_failed =3D false; >=20 > Could you please explain this code movement? > To be more accurate it's just variable initialization that was in = wrong place. > Moreover in most cases (almost always) after allocating memory for = this > variable there was non-zero value ('true', basically), that was = causing > "keyword 'BEGIN' is reserved" error message if we use "BEGIN" instead > of "START TRANSACTION", after the patch changes are applied. Ok, thx for explanation. Now patch LGTM. --Apple-Mail=_83CDBFE5-6821-4C13-9D00-4906DC6013B2 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?
To be more = accurate it's just variable initialization that was in wrong = place.
Moreover in most cases (almost always) after = allocating memory for this
variable there was = non-zero value ('true', basically), that was causing
"keyword 'BEGIN' is reserved" error message if we use "BEGIN" = instead
of "START TRANSACTION", after the patch = changes are applied.

Ok, thx for explanation. Now patch LGTM.


= --Apple-Mail=_83CDBFE5-6821-4C13-9D00-4906DC6013B2--