This commit is contained in:
slguan 2019-08-22 16:11:53 +08:00
parent 93f3d4462d
commit 556ca28bee
2 changed files with 6 additions and 4 deletions

View File

@ -408,7 +408,7 @@ limit_opt(A) ::= LIMIT signed(X). {A.limit = X; A.offset = 0;}
limit_opt(A) ::= LIMIT signed(X) OFFSET signed(Y).
{A.limit = X; A.offset = Y;}
limit_opt(A) ::= LIMIT signed(X) COMMA signed(Y).
{A.limit = X; A.offset = Y;}
{A.limit = Y; A.offset = X;}
%type slimit_opt {SLimitVal}
slimit_opt(A) ::= . {A.limit = -1; A.offset = 0;}
@ -416,7 +416,7 @@ slimit_opt(A) ::= SLIMIT signed(X). {A.limit = X; A.offset = 0;}
slimit_opt(A) ::= SLIMIT signed(X) SOFFSET signed(Y).
{A.limit = X; A.offset = Y;}
slimit_opt(A) ::= SLIMIT signed(X) COMMA signed(Y).
{A.limit = X; A.offset = Y;}
{A.limit = Y; A.offset = X;}
%type where_opt {tSQLExpr*}
%destructor where_opt {tSQLExprDestroy($$);}

View File

@ -1892,11 +1892,13 @@ static void yy_reduce(
{yygotominor.yy294.limit = yymsp[0].minor.yy189; yygotominor.yy294.offset = 0;}
break;
case 122: /* limit_opt ::= LIMIT signed OFFSET signed */
case 123: /* limit_opt ::= LIMIT signed COMMA signed */ yytestcase(yyruleno==123);
case 126: /* slimit_opt ::= SLIMIT signed SOFFSET signed */ yytestcase(yyruleno==126);
case 127: /* slimit_opt ::= SLIMIT signed COMMA signed */ yytestcase(yyruleno==127);
{yygotominor.yy294.limit = yymsp[-2].minor.yy189; yygotominor.yy294.offset = yymsp[0].minor.yy189;}
break;
case 123: /* limit_opt ::= LIMIT signed COMMA signed */
case 127: /* slimit_opt ::= SLIMIT signed COMMA signed */ yytestcase(yyruleno==127);
{yygotominor.yy294.limit = yymsp[0].minor.yy189; yygotominor.yy294.offset = yymsp[-2].minor.yy189;}
break;
case 130: /* expr ::= LP expr RP */
{yygotominor.yy370 = yymsp[-1].minor.yy370; }
break;