Skip to content

[Bug]: set global tx_isolation=4 panic error #16686

Closed

Description

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

main

Commit ID

52b7c7b

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/[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

Expected Behavior

No response

Steps to Reproduce

set global tx_isolation = 4;

Additional information

No response

Activity

  1. ghost added
    kind/bug
    on Jun 5, 2024
  2. ghost added
    severity/s0
    on Jun 5, 2024
  3. ghost added this to the 1.3.0 milestone on Jun 5, 2024
  4. ghost assigned on Jun 5, 2024
  5. ck89119 commented on Jun 5, 2024

    @ck89119
    Contributor

    确认下=5时是否符合预期? 符合预期
    tx_isolation取值范围时多少?0-3,分别对应"READ-UNCOMMITTED", "READ-COMMITTED", "REPEATABLE-READ", "SERIALIZABLE"

    set global tx_isolation = 4 panic报错原因是合法值判断有问题。
    image

  6. ck89119 commented on Jun 5, 2024

    @ck89119
    Contributor

    另外一个问题: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

  7. assigned and unassigned on Jun 6, 2024
  8. ghost closed this as completedon Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugphase/testingseverity/s0

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions