Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set variable tidb_skip_isolation_level_check seems not work as expected #26810

Closed
pcqz opened this issue Aug 3, 2021 · 9 comments
Closed

Set variable tidb_skip_isolation_level_check seems not work as expected #26810

pcqz opened this issue Aug 3, 2021 · 9 comments
Labels
severity/moderate sig/transaction SIG:Transaction type/bug The issue is confirmed as a bug.

Comments

@pcqz
Copy link

pcqz commented Aug 3, 2021

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Set variable tidb_skip_isolation_level_check to on and exit

mysql> set global tidb_skip_isolation_level_check=1;
Query OK, 0 rows affected (0.09 sec)
mysql> select @@tidb_skip_isolation_level_check;
+-----------------------------------+
| @@tidb_skip_isolation_level_check |
+-----------------------------------+
|                                 1 |
+-----------------------------------+
1 row in set (0.00 sec)
mysql> exit
Bye

Login in to mysql and set unsupported isolation level

mysql> set tx_isolation='serializable';
ERROR 8048 (HY000): The isolation level 'SERIALIZABLE' is not supported. Set tidb_skip_isolation_level_check=1 to skip this error
mysql> select @@tidb_skip_isolation_level_check;
+-----------------------------------+
| @@tidb_skip_isolation_level_check |
+-----------------------------------+
|                                 1 |
+-----------------------------------+
1 row in set (0.00 sec)

mysql> set tx_isolation='serializable';
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> show warnings;
+---------+------+---------------------------------------------------------------------------------------------------------------+
| Level   | Code | Message                                                                                                       |
+---------+------+---------------------------------------------------------------------------------------------------------------+
| Warning | 8048 | The isolation level 'SERIALIZABLE' is not supported. Set tidb_skip_isolation_level_check=1 to skip this error |
+---------+------+---------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

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

After this variable is enabled, if setting unsupported tx_isolation, no error is reported.

3. What did you see instead (Required)

Need to query the variable first and set unsupported tx_isolation.

4. What is your TiDB version? (Required)

v5.1.0

@pcqz pcqz added the type/bug The issue is confirmed as a bug. label Aug 3, 2021
@youngwookim
Copy link

Works on 5.0.3 version but 5.1 and 5.2 version do not work as expected. Any alternatives to avoid this bug for now?

@fzhan
Copy link

fzhan commented Sep 6, 2021

Using tidb-operator to set this variable but doesn't seems to be effective:

set global tidb_skip_isolation_level_check='on';
show VARIABLES where Variable_name = 'tidb_skip_isolation_level_check'; 

Results in

set global tidb_skip_isolation_level_check='on'
> OK
> Time: 0.05s

But
|tidb_skip_isolation_level_check | Off|

@morgo
Copy link
Contributor

morgo commented Oct 22, 2021

I believe this will be fixed in #28953

/cc @sunxiaoguang

@sunxiaoguang
Copy link
Contributor

sunxiaoguang commented Oct 23, 2021

Hi @youngwookim , sorry that I wasn't able to push this fix to 5.1 and 5.2 releases during last bug triage. Will try integrating these two fixes in the coming releases.

@youngwookim
Copy link

youngwookim commented Oct 23, 2021

@sunxiaoguang, No problem & thanks for your effort!

@zyguan
Copy link
Contributor

zyguan commented Dec 24, 2021

So what's the progress of #28953 ? Can we close this issue if it won't be merged?

@sunxiaoguang
Copy link
Contributor

So what's the progress of #28953 ? Can we close this issue if it won't be merged?

Waiting for triage for next 5.1 and 5.2 release

@zyguan
Copy link
Contributor

zyguan commented Dec 30, 2021

Close the issue because #28953 & #28957 are already waiting for triage.

@github-actions
Copy link

Please check whether the issue should be labeled with 'affects-x.y' or 'fixes-x.y.z', and then remove 'needs-more-info' label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/moderate sig/transaction SIG:Transaction type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

7 participants