Skip to content

Test_driver failed to process escaped char in string literal #1356

@milkice233

Description

@milkice233

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions