TiDB doesn't return an error on set @@SQL_MODE=NULL
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
### 1. Minimal reproduce step
```sql
set @@SQL_MODE=NULL;
```
### 2. What did you expect to see?
```sql
mysql> set @@SQL_MODE=NULL;
ERROR 1231 (42000): Variable 'sql_mode' can't be set to the value of 'NULL'
```
### 3. What did you see instead
```sql
tidb> set @@SQL_MODE=NULL;
Query OK, 0 rows affected (0.00 sec)
```
### 4. What is your TiDB version?
```
tidb_version(): Release Version: v5.5.0-alpha-210-g11f4ca802
Edition: Community
Git Commit Hash: 11f4ca802083ee38d5972730ba8f9b72395316fb
Git Branch: master
UTC Build Time: 2022-02-24 04:52:01
GoVersion: go1.17.2
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
1 row in set (0.02 sec)
```
Contributor guide
Assessment
This issue has not been assessed yet.