Skip to content

Commit

Permalink
update: 优化year的审核提示
Browse files Browse the repository at this point in the history
  • Loading branch information
hanchuanchuan committed Jan 6, 2020
1 parent b2fbc10 commit 5f69418
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion parser/parser.go

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

3 changes: 2 additions & 1 deletion parser/parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
package parser

import (
"fmt"
"strings"

"github.com/hanchuanchuan/goInception/mysql"
Expand Down Expand Up @@ -7093,7 +7094,7 @@ DateAndTimeType:
x.Flen = $2.(int)
if x.Flen != types.UnspecifiedLength && x.Flen != 4 {
// yylex.AppendError(ErrInvalidYearColumnLength.GenWithStackByArgs())
yylex.AppendError(yylex.Errorf("Supports only YEAR or YEAR(4) column."))
yylex.AppendError(fmt.Errorf("Supports only YEAR or YEAR(4) column."))
return -1
}
$$ = x
Expand Down

0 comments on commit 5f69418

Please sign in to comment.