diff --git a/parser/parser.go b/parser/parser.go index b1624c543a69c..f08a8a5d77424 100644 --- a/parser/parser.go +++ b/parser/parser.go @@ -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: { diff --git a/parser/parser.y b/parser/parser.y index c2c8ade907007..7a695db838c44 100644 --- a/parser/parser.y +++ b/parser/parser.y @@ -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