Skip to content

[Bug]: set session transaction read only #10059

Closed

Description

@dengn

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Environment

- Version or commit-id (e.g. v0.1.0 or 8b23a93): 
- Hardware parameters:
- OS type:
- Others:

Actual Behavior

MO doesn't support set session transaction XXX . This is frequently used in SpringBoot applications, this will block the application to do anything.
image

MO may support this syntax without executing it.

mysql> set session transaction read only;ERROR 1064 (HY000): SQL parser error: You have an error in your SQL syntax; check the manual that corresponds to your MatrixOne server version for the right syntax to use. syntax error at line 1 column 28 near " read only";
mysql> set session transaction read write;ERROR 1064 (HY000): SQL parser error: You have an error in your SQL syntax; check the manual that corresponds to your MatrixOne server version for the right syntax to use. syntax error at line 1 column 28 near " read write";

Expected Behavior

No response

Steps to Reproduce

No response

Additional information

No response

Activity

  1. added
    kind/bug
    severity/s0
    on Jun 15, 2023
  2. added this to the V0.8.0 milestone on Jun 15, 2023
  3. sukki37 commented on Jun 15, 2023

    @sukki37
    Contributor

    This issue is more like a feature rather than a bug. @domingozhang Could you please take a look? Would it be more appropriate to propose a corresponding feature issue instead?

  4. domingozhang commented on Jun 15, 2023

    @domingozhang
    Contributor

    will raise a new feature for read only session

  5. daviszhen commented on Jun 15, 2023

    @daviszhen
    Contributor

    还没看

  6. dengn commented on Jun 19, 2023

    @dengn
    ContributorAuthor

    this is a blocking issue.
    it happens frequently with springboot applications:

    mysql> SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
    ERROR 1064 (HY000): SQL parser error: You have an error in your SQL syntax; check the manual that corresponds to your MatrixOne server version for the right syntax to use. syntax error at line 1 column 33 near " ISOLATION LEVEL SERIALIZABLE";
    
  7. daviszhen commented on Jun 19, 2023

    @daviszhen
    Contributor

    后续会加上

  8. daviszhen commented on Jun 21, 2023

    @daviszhen
    Contributor

    it was fixed.

  9. dengn commented on Jun 23, 2023

    @dengn
    ContributorAuthor

    Fixed.

    
    mysql> set session transaction read only
        -> ;
    Query OK, 0 rows affected (0.00 sec)
    
    mysql> set session transaction read write;
    Query OK, 0 rows affected (0.00 sec)
    
    mysql> SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
    Query OK, 0 rows affected (0.00 sec)
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugseverity/s0

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions