parser icon indicating copy to clipboard operation
parser copied to clipboard

Test_driver failed to process escaped char in string literal

Open milkice233 opened this issue 4 years ago • 0 comments

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do? If possible, provide a recipe for reproducing the error.

Add the following code into TestDMLStmt of parser_test.go

{`INSERT INTO foo VALUES ("1234\\")`, true, "INSERT INTO `foo` VALUES (_UTF8MB4'1234\\')"},
  1. What did you expect to see? The test should pass.

  2. What did you see instead? The test failed, parser failed to restore the ast.

  3. What version of TiDB SQL Parser are you using? The test-driver, and the problem is exactly from the test-driver. If we switch to github.com/pingcap/tidb/types/parser_driver then the problem got fixed.

milkice233 avatar Sep 29 '21 12:09 milkice233