From 082d30d1ce32706f8a452cf8d83529457d61f2fd Mon Sep 17 00:00:00 2001 From: qw4990 Date: Tue, 8 Aug 2023 15:46:31 +0800 Subject: [PATCH] fixup --- parser/lexer.go | 2 +- parser/parser_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/parser/lexer.go b/parser/lexer.go index 526ed2eb74ede..dcfae1d1f5f54 100644 --- a/parser/lexer.go +++ b/parser/lexer.go @@ -101,7 +101,7 @@ func (s *Scanner) reset(sql string) { s.stmtStartPos = 0 s.inBangComment = false s.lastKeyword = 0 - s.identifierDot = true + s.identifierDot = false } func (s *Scanner) stmtText() string { diff --git a/parser/parser_test.go b/parser/parser_test.go index 8e6184ca316b9..3857cba90f60a 100644 --- a/parser/parser_test.go +++ b/parser/parser_test.go @@ -7398,7 +7398,7 @@ func TestIssue45898(t *testing.T) { restoreCtx := NewRestoreCtx(DefaultRestoreFlags, &sb) sb.Reset() stmts[0].Restore(restoreCtx) - require.Equal(t, sb.String(), "SELECT COUNT(1) FROM `t`") + require.Equal(t, "SELECT COUNT(1) FROM `t`", sb.String()) } func TestMultiStmt(t *testing.T) {