[tarantool-patches] Re: [PATCH] sql: Remove 'BEGIN TRANSACTION'

  • From: "n.pettik" <korablev@xxxxxxxxxxxxx>
  • To: tarantool-patches@xxxxxxxxxxxxx
  • Date: Thu, 19 Jul 2018 17:03:35 +0300


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?
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.


Other related posts: