[parser] parser: sequence order option parse warning (#791)

This commit is contained in:
Arenatlx
2020-04-03 00:41:49 -05:00
committed by Ti Chi Robot
parent 02e3e4fb03
commit 2a7d4fa913
2 changed files with 13 additions and 1 deletions

View File

@ -18060,14 +18060,20 @@ yynewstate:
case 2062:
{
parser.yyVAL.item = &ast.SequenceOption{Tp: ast.SequenceOrder}
yylex.AppendError(yylex.Errorf("TiDB Sequence doesn't support ORDER option, ORDER will be parsed but ignored."))
parser.lastErrorAsWarn()
}
case 2063:
{
parser.yyVAL.item = &ast.SequenceOption{Tp: ast.SequenceNoOrder}
yylex.AppendError(yylex.Errorf("TiDB Sequence doesn't support ORDER option, NOORDER will be parsed but ignored."))
parser.lastErrorAsWarn()
}
case 2064:
{
parser.yyVAL.item = &ast.SequenceOption{Tp: ast.SequenceNoOrder}
yylex.AppendError(yylex.Errorf("TiDB Sequence doesn't support ORDER option, NO ORDER will be parsed but ignored."))
parser.lastErrorAsWarn()
}
case 2065:
{

View File

@ -11481,14 +11481,20 @@ SequenceOption:
| "ORDER"
{
$$ = &ast.SequenceOption{Tp: ast.SequenceOrder}
yylex.AppendError(yylex.Errorf("TiDB Sequence doesn't support ORDER option, ORDER will be parsed but ignored."))
parser.lastErrorAsWarn()
}
| "NOORDER"
{
$$ = &ast.SequenceOption{Tp: ast.SequenceNoOrder}
yylex.AppendError(yylex.Errorf("TiDB Sequence doesn't support ORDER option, NOORDER will be parsed but ignored."))
parser.lastErrorAsWarn()
}
| "NO" "ORDER"
{
$$ = &ast.SequenceOption{Tp: ast.SequenceNoOrder}
yylex.AppendError(yylex.Errorf("TiDB Sequence doesn't support ORDER option, NO ORDER will be parsed but ignored."))
parser.lastErrorAsWarn()
}
SignedNum:
@ -11515,7 +11521,7 @@ DropSequenceStmt:
}
}
/********************************************************************
/*******************************************************************
* Index Advisor Statement
*
* INDEX ADVISE