[Bug]: set global tx_isolation=4 panic error
heni02 opened this issue · comments
Is there an existing issue for the same bug?
- I have checked the existing issues.
Branch Name
main
Commit ID
Other Environment Information
- Hardware parameters:
- OS type:
- Others:
Actual Behavior
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/toolchain@v0.0.1-go1.22.3.darwin-arm64/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
Expected Behavior
No response
Steps to Reproduce
set global tx_isolation = 4;
Additional information
No response
另外一个问题:set global TIME_ZONE查询结果是system,但set session TIME_ZONE查询结果是修改后的值
SET global TIME_ZONE='+08:00';
select @@TIME_ZONE;
@@TIME_ZONE
SYSTEM
SET TIME_ZONE='+08:00';
select @@TIME_ZONE;
@@TIME_ZONE
+08:00
另外一个问题:set global TIME_ZONE查询结果是system,但set session TIME_ZONE查询结果是修改后的值 SET global TIME_ZONE='+08:00'; select @@TIME_ZONE; @@TIME_ZONE SYSTEM
SET TIME_ZONE='+08:00'; select @@TIME_ZONE; @@TIME_ZONE +08:00
这是refactor之后的期望行为,set global只影响global级别,不会修改session级别的值,具体可参考文档:https://doc.weixin.qq.com/doc/w3_AVIAugbFALcLhtRyzyDQZqwLQ0OiE?scode=AJsA6gc3AA8iTL8CYi
confirm,closed
commit:3e36439cf387571c341d8dc971f47acb9cc12dde
mysql> set global tx_isolation = 4;
ERROR 20101 (HY000): internal error: convert to the system variable enum type failed