SET SESSION TRANSACTION READ ONLY return error
- 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>SET SESSION TRANSACTION READ ONLY;
(1235, 'function READ ONLY has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions')
```
### 2. What did you expect to see? (Required)
```sql
mysql>SET SESSION TRANSACTION READ ONLY;
Query OK, 0 rows affected
```
### 3. What did you see instead (Required)
Execute error.
### 4. What is your TiDB version? (Required)
```sql
***************************[ 1. row ]***************************
tidb_version() | Release Version: v6.1.0-alpha-398-g0703a64f76
Edition: Community
Git Commit Hash: 0703a64f76baf8f79126ee45780310737f55df0b
Git Branch: master
UTC Build Time: 2022-05-13 05:38:58
GoVersion: go1.18
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
```
#### Reason
Since we not support read-only transcation now, so https://github.com/pingcap/tidb/pull/23818 protect read only noop via tidb_enable_noop_functions. But it breaks the compatibility with MySQL.
Contributor guide
Assessment
This issue has not been assessed yet.