You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Logging these together, since they're both session related, although they may be addressed separately. Both these issues are problematic for more advanced MySQL drivers (e.g. the MySQL JDBC driver), since they can use these signals to determine things like: whether a commit statement can be elided because the session is already in autocommit mode.
autocommit:
vtgate does not reflect the status of the autocommit system variable properly when it's been changed, e.g.:
mysql> select @@autocommit;
+--------------+
| @@autocommit |
+--------------+
| 1 |
+--------------+
1 row in set (0.00 sec)
mysql> set autocommit=0;
Query OK, 0 rows affected (0.00 sec)
mysql> select @@autocommit;
+--------------+
| @@autocommit |
+--------------+
| 1 |
+--------------+
1 row in set (0.00 sec)
However, it does recognize that a transaction has started, since it will reject a follow-up statement if the transaction timeout (default 30 secs in OLTP mode) has expired.
SERVER_STATUS_IN_TRANS and SERVER_STATUS_AUTOCOMMIT flags:
Even when in a transaction, a result will be returned to the client via vtgate without the SERVER_STATUS_IN_TRANS flag set . This can be seen in a network dump (screenshot attached) as the "In transaction" field.
The SERVER_STATUS_AUTOCOMMIT flag is also always just returned as 0, regardless of the status of autocommit.
The text was updated successfully, but these errors were encountered:
aquarapid
added a commit
to planetscale/vitess
that referenced
this issue
Jul 29, 2020
Logging these together, since they're both session related, although they may be addressed separately. Both these issues are problematic for more advanced MySQL drivers (e.g. the MySQL JDBC driver), since they can use these signals to determine things like: whether a commit statement can be elided because the session is already in autocommit mode.
autocommit:
However, it does recognize that a transaction has started, since it will reject a follow-up statement if the transaction timeout (default 30 secs in OLTP mode) has expired.
SERVER_STATUS_IN_TRANS and SERVER_STATUS_AUTOCOMMIT flags:
The text was updated successfully, but these errors were encountered: