Skip to content

Commit

Permalink
[parser] parser: sequence order option parse warning (pingcap#791)
Browse files Browse the repository at this point in the history
  • Loading branch information
AilinKid authored and ti-chi-bot committed Oct 9, 2021
1 parent 02e3e4f commit 2a7d4fa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions parser/parser.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion parser/parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -11515,7 +11521,7 @@ DropSequenceStmt:
}
}

/********************************************************************
/*******************************************************************
* Index Advisor Statement
*
* INDEX ADVISE
Expand Down

0 comments on commit 2a7d4fa

Please sign in to comment.