Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Fixed
-
11.1.1
-
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
- is caused by
-
MDEV-21921 Make transaction_isolation into a system variable
- Closed
- relates to
-
MDEV-29629 Session state tracking does not track variable changes via aliases
- Closed
-
MDEV-31751 SET @@tx_isolation=X behaves like SET TRANSACATION ISOLATION LEVEL X instead of SET SESSSION tx_isolation=X
- In Review
-
MDEV-15148 Protocol regression testing for the server
- Open