tidb_skip_isolation_level_check参数问题,设置之后不起作用

Bug 反馈
5.1问题,升级5.1之后发现的问题,通过设置set global tidb_skip_isolation_level_check=1;这个参数,更改后,退出登陆,后续也有重启过tidb,但仍然会出现。设置之后,使用普通账号登陆tidb,设置:SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
会报错ERROR 8048 (HY000): The isolation level ‘READ-UNCOMMITTED’ is not supported. Set tidb_skip_isolation_level_check=1 to skip this error
然而:我只要执行过:
show variables like ‘tidb_skip_isolation_level_check%’;
后续再执行:SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; 又可以了。
【 Bug 的影响】
如果客户端有设置了这个值,会一直报错无法兼容。
【可能的问题复现步骤】
[tidb@yilu-cdh-hadoop102 ~]$ mysql -uroot -p -P4000 -h127.0.0.1
Enter password:
ERROR 1045 (28000): Access denied for user ‘root’@‘127.0.0.1’ (using password: YES)
[tidb@yilu-cdh-hadoop102 ~]$ mysql -uroot -p -P4000 -h127.0.0.1
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 17
Server version: 5.7.25-TiDB-v5.1.0 TiDB Server (Apache License 2.0) Community Edition, MySQL 5.7 compatible

Copyright © 2009-2020 Percona LLC and/or its affiliates
Copyright © 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql> SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
ERROR 8048 (HY000): The isolation level ‘READ-UNCOMMITTED’ is not supported. Set tidb_skip_isolation_level_check=1 to skip this error
mysql> show variables like ‘tidb_skip_isolation_level_check%’;
±--------------------------------±------+
| Variable_name | Value |
±--------------------------------±------+
| tidb_skip_isolation_level_check | ON |
±--------------------------------±------+
1 row in set (0.03 sec)

mysql> SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql>

【看到的非预期行为】

【期望看到的行为】

【相关组件及具体版本】
在5.0.1上进行测试,则正常的:
mysql -uroot -p -P4000 -h127.0.0.1
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 312187
Server version: 5.7.25-TiDB-v5.0.1 TiDB Server (Apache License 2.0) Community Edition, MySQL 5.7 compatible

Copyright © 2009-2018 Percona LLC and/or its affiliates
Copyright © 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql> SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
Query OK, 0 rows affected (0.01 sec)

mysql> show variables like ‘tidb_skip_isolation_level_check%’;
±--------------------------------±------+
| Variable_name | Value |
±--------------------------------±------+
| tidb_skip_isolation_level_check | ON |
±--------------------------------±------+
1 row in set (0.66 sec)

【其他背景信息或者截图】
如集群拓扑,系统和内核版本,应用 app 信息等;如果问题跟 SQL 有关,请提供 SQL 语句和相关表的 Schema 信息;如果节点日志存在关键报错,请提供相关节点的日志内容或文件;如果一些业务敏感信息不便提供,请留下联系方式,我们与您私下沟通。

你好,问题已反馈 github https://github.com/pingcap/tidb/issues/26810 ,后续可以跟进修复进度

感谢你给我们提供可复现的【产品缺陷】
已帮你完成100积分&100经验值的加分~

此话题已在最后回复的 1 分钟后被自动关闭。不再允许新回复。