Create table with encryption option show wrong warning
- 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)
```sql
MySQL [test]> CREATE TABLE mytable (id INT, data VARCHAR(255)) ENCRYPTION='Y';
Query OK, 0 rows affected, 1 warning (0.53 sec)
MySQL [test]> show warnings;
+---------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Level | Code | Message |
+---------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Warning | 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 63 near ""The ENCRYPTION clause is parsed but ignored by all storage engines. |
+---------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
```
### 2. What did you expect to see? (Required)
```sql
MySQL [test]> CREATE TABLE mytable (id INT, data VARCHAR(255)) ENCRYPTION='Y';
Query OK, 0 rows affected, 1 warning (0.53 sec)
MySQL [test]> show warnings;
+---------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Level | Code | Message |
+---------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Warning | 1064 | The ENCRYPTION clause is parsed but ignored by all storage engines. |
+---------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
```
### 3. What did you see instead (Required)
```sql
MySQL [test]> show warnings;
+---------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Level | Code | Message |
+---------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Warning | 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 63 near ""The ENCRYPTION clause is parsed but ignored by all storage engines. |
+---------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
```
### 4. What is your TiDB version? (Required)
v8.5.1
Contributor guide
Assessment
This issue has not been assessed yet.