add skip isolation level check variable#10065
Conversation
c2e06f3 to
1a101fd
Compare
|
/run-all-tests |
Codecov Report
@@ Coverage Diff @@
## master #10065 +/- ##
===========================================
Coverage ? 78.1129%
===========================================
Files ? 405
Lines ? 82044
Branches ? 0
===========================================
Hits ? 64087
Misses ? 13254
Partials ? 4703 |
|
/run-all-tests |
c594105 to
6740581
Compare
6740581 to
aa16017
Compare
|
/run-all-tests |
1 similar comment
|
/run-all-tests |
aa16017 to
9be5a55
Compare
|
@marsishandsome thank you for looking into this. I would like to suggest that we don't call it The MySQL-like name for this would be "ignore" or "skip". I would also prefer to have a purposeful name here, because it is a very specific feature being disabled which is unsafe (versus a generic name, which may be better if they are just general changes). So perhaps PTAL @kolbe |
|
@morgo Agreed. I guess the intention of |
514da01 to
470b0dd
Compare
| tk.MustExec("SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE") | ||
| tk.MustQuery("show warnings").Check(testkit.Rows( | ||
| "Warning 1105 The isolation level 'SERIALIZABLE' is not supported. Set tidb_skip_isolation_level_check=1 to skip this error", | ||
| "Warning 1105 The isolation level 'SERIALIZABLE' is not supported. Set tidb_skip_isolation_level_check=1 to skip this error")) |
There was a problem hiding this comment.
I would like to see just one warning here.
There was a problem hiding this comment.
I think we should debug it, why the warning was appended twice.
There was a problem hiding this comment.
SET TRANSACTION ISOLATION LEVEL will affect two internal variables:
- tx_isolation
- transaction_isolation
So the function ValidateSetSystemVar is called twice.
There was a problem hiding this comment.
Because the error message does not mention which variable was set now, it is easy to fix by wrapping an if around transaction_isolation.
| tk.MustExec("SET GLOBAL TRANSACTION ISOLATION LEVEL READ UNCOMMITTED") | ||
| tk.MustQuery("show warnings").Check(testkit.Rows( | ||
| "Warning 1105 The isolation level 'READ-UNCOMMITTED' is not supported. Set tidb_skip_isolation_level_check=1 to skip this error", | ||
| "Warning 1105 The isolation level 'READ-UNCOMMITTED' is not supported. Set tidb_skip_isolation_level_check=1 to skip this error")) |
|
/run-all-tests |
2 similar comments
|
/run-all-tests |
|
/run-all-tests |
What problem does this PR solve?
This patch (https://github.com/pingcap/tidb/pull/8625/files) breaks backward compatible.
When using tidb as hive's metastore, hive will set transaction isolation level to serializable, which will cause the following error:
What is changed and how it works?
This PR provide a variable
tidb_skip_isolation_level_check.If
tidb_skip_isolation_level_check == ON, tidb will not throw an error if hive callset session transaction isolation level serializable;.tidb_skip_isolation_level_check's default value isOFF.Check List
Tests
Related changes