提交 556ca28b 编写于 作者: S slguan

fix issue #156

上级 93f3d446
......@@ -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($$);}
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册