diff --git a/parser/ast/ddl.go b/parser/ast/ddl.go index aecffc69..f9ea31d6 100755 --- a/parser/ast/ddl.go +++ b/parser/ast/ddl.go @@ -823,7 +823,7 @@ func (n *DropTableStmt) Restore(ctx *format.RestoreCtx) error { ctx.WritePlain(", ") } if err := table.Restore(ctx); err != nil { - return errors.Annotate(err, "An error occurred while restore DropTableStmt.Tables "+string(index)) + return errors.Annotatef(err, "An error occurred while restore DropTableStmt.Tables[%d]", index) } } diff --git a/parser/lexer_test.go b/parser/lexer_test.go index d313bb4c..74341836 100644 --- a/parser/lexer_test.go +++ b/parser/lexer_test.go @@ -198,7 +198,7 @@ func (s *testLexerSuite) TestscanString(c *C) { {`' \n\tTest String'`, " \n\tTest String"}, {`'\x\B'`, "xB"}, {`'\0\'\"\b\n\r\t\\'`, "\000'\"\b\n\r\t\\"}, - {`'\Z'`, string(26)}, + {`'\Z'`, string(rune(26))}, {`'\%\_'`, `\%\_`}, {`'hello'`, "hello"}, {`'"hello"'`, `"hello"`},