Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-31746

Problems with tx_isolation after MDEV-21921

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • 11.1.1
    • 11.1.1
    • Variables
    • None

    Description

      MDEV-21921 breaks almost all connectors, that read and track tx_isolation value - probably all except only C/C,. We can fix connectors to live with it, that is pretty easy fix. But if it breaks connectors it can also break applications. C/C applications for example.

      tx_isolation isn't full alias of tranasaction_isolation - client can't set it and can't track it. It's a bit too radical and/or to fast deprecation to my taste.

      If we try to set it directly, we don't get an error, we get warning about deprecation, but the value is not changed.

      MariaDB [test]> select @@tx_isolation;
      +----------------+
      | @@tx_isolation |
      +----------------+
      | READ-COMMITTED |
      +----------------+
      1 row in set (0.000 sec)
       
      MariaDB [test]> set @@tx_isolation='REPEATABLE-READ';
      Query OK, 0 rows affected, 1 warning (0.000 sec)
       
      MariaDB [test]> show warnings;
      +---------+------+----------------------------------------------------------------------------------------------------------------------+
      | Level   | Code | Message                                                                                                              |
      +---------+------+----------------------------------------------------------------------------------------------------------------------+
      | Warning | 1287 | '@@tx_isolation' is deprecated and will be removed in a future release. Please use '@@transaction_isolation' instead |
      +---------+------+----------------------------------------------------------------------------------------------------------------------+
      1 row in set (0.000 sec)
       
      MariaDB [test]> select @@tx_isolation;
      +----------------+
      | @@tx_isolation |
      +----------------+
      | READ-COMMITTED |
      +----------------+
      1 row in set (0.000 sec)
      

      So, the query hasn't really succeeded, but we don't get the error

      If we attempt to track tx_isolation, the result is even worse - no error, no warning, the value is set, but the variable is not tracked.

      Server version: 11.1.1-MariaDB mariadb.org binary distribution
       
      Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
       
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
       
      MariaDB [test]> SET session_track_system_variables='tx_isolation';
      Query OK, 0 rows affected (0.000 sec)
       
      MariaDB [test]> show variables like "%track%";
      +--------------------------------+--------------+
      | Variable_name                  | Value        |
      +--------------------------------+--------------+
      | session_track_schema           | ON           |
      | session_track_state_change     | OFF          |
      | session_track_system_variables | tx_isolation |
      | session_track_transaction_info | OFF          |
      +--------------------------------+--------------+
      4 rows in set (0.001 sec)
      

      We verified that with various connectors, that the variable is not actually tracked.
      So, the very least that should be done is bringing some consistency - remove tx_isolation from session_track_system_variables and return warning about its deprecation the way it's done with setting of the tx_isolation.

      But I think we should consider something more than that up to making it work as before, but with warnings of deprecation. Nobody reads warnings, so maybe something in between would be better - make tracking of tx_isolation work, but leave setting of it not working(it's probably not the blessed way of changing of isolation level anyway). Maybe even make it return error- it makes more sense for me.

      Attachments

        Issue Links

          Activity

            Transition Time In Source Status Execution Times
            Daniel Black made transition -
            In Progress Needs Feedback
            2h 3m 1
            Daniel Black made transition -
            Needs Feedback Open
            7h 7m 1
            Daniel Black made transition -
            Open In Progress
            1d 51m 2
            Daniel Black made transition -
            In Progress In Review
            9s 1
            Sergei Golubchik made transition -
            In Review Stalled
            5h 57m 1
            Daniel Black made transition -
            Stalled In Review
            5d 11h 9m 1
            Sergei Golubchik made transition -
            In Review In Testing
            7d 15h 56m 1
            Sergei Golubchik made transition -
            In Testing Closed
            6d 15h 58m 1

            People

              serg Sergei Golubchik
              Lawrin Lawrin Novitsky
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.