You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: set global tx_isolation=4 panic error #16686
set global tx_isolation = 4 panic报错,确认下=5时是否符合预期? tx_isolation取值范围时多少?
mysql> set global tx_isolation = 2;
Query OK, 0 rows affected (0.03 sec)
mysql> show global variables like 'tx_isolation';
+---------------+-----------------+
| Variable_name | Value |
+---------------+-----------------+
| tx_isolation | REPEATABLE-READ |
+---------------+-----------------+
1 row in set (0.00 sec)
mysql> set global tx_isolation = 3;
Query OK, 0 rows affected (0.02 sec)
mysql> show global variables like 'tx_isolation';
+---------------+--------------+
| Variable_name | Value |
+---------------+--------------+
| tx_isolation | SERIALIZABLE |
+---------------+--------------+
1 row in set (0.00 sec)
mysql> set global tx_isolation = 4;
ERROR 20101 (HY000): internal error: panic runtime error: index out of range [4] with length 4:
runtime.goPanicIndex
/Users/heni/go/pkg/mod/golang.org/[email protected]/src/runtime/panic.go:114
github.com/matrixorigin/matrixone/pkg/frontend.SystemVariableEnumType.Convert.func1
/Users/heni/test-envir/matrixone/pkg/frontend/variables.go:600
github.com/matrixorigin/matrixone/pkg/frontend.SystemVariableEnumType.Convert
/Users/heni/test-envir/matrixone/pkg/frontend/variables.go:631
github.com/matrixorigin/m
mysql> set global tx_isolation = 5;
ERROR 20101 (HY000): internal error: convert to the system variable enum type failed
Activity
ck89119 commentedon Jun 5, 2024
确认下=5时是否符合预期? 符合预期
tx_isolation取值范围时多少?0-3,分别对应"READ-UNCOMMITTED", "READ-COMMITTED", "REPEATABLE-READ", "SERIALIZABLE"
set global tx_isolation = 4 panic报错原因是合法值判断有问题。

ck89119 commentedon Jun 5, 2024
这是refactor之后的期望行为,set global只影响global级别,不会修改session级别的值,具体可参考文档:https://doc.weixin.qq.com/doc/w3_AVIAugbFALcLhtRyzyDQZqwLQ0OiE?scode=AJsA6gc3AA8iTL8CYi