pingcap / pingcap/tidb

plan replayer dump from SQL file can't handle `;` in the SQL

Open
#43,621 0 comments 0 reactions 1 assignee Claimed by @time-and-fate View on GitHub
component/statistics severity/moderate sig/planner type/bug
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Bug Report

Please answer these questions before submitting your issue. Thanks!

### 1. Minimal reproduce step (Required)

sqls.sql:
```
select * from t where a = ';';
select * from t where b > 1;
```
```sql
use test;
plan replayer dump explain analyze 'sqls.sql';
```

### 2. What did you expect to see? (Required)

plan replayer work correctly

### 3. What did you see instead (Required)

```
> plan replayer dump explain analyze 'sqls.sql';
ERROR 1105 (HY000): parse sql error, sql:select * from t where a = ', err:[parser:1064]You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 27 near "'"
```

### 4. What is your TiDB version? (Required)

master

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.