Details

    Description

      Hi,

      the GTID of the last transaction is exposed via the last_gtid session variable ([1]). This needs a round-trip to the server, which could be unwanted in some situations.

      [1]: https://mariadb.com/kb/en/mariadb/gtid/#last_gtid

      Upstream MySQL implements a way to get the GTID of the last transaction at the protocol level in the OK packet. ([2], [3] and [4]). I think this would be a good feature in MariaDB Server.

      [2]: https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_session_track_gtids

      [3]: https://dev.mysql.com/doc/refman/5.7/en/mysql-session-track-get-first.html

      [4]: https://dev.mysql.com/doc/refman/5.7/en/mysql-session-track-get-next.html

      Please also consider this improvement on the upstream implementation: Request transaction GTID in OK packet on COMMIT (without needing a round-trip) - [5].

      [5]: https://bugs.mysql.com/bug.php?id=84748

      Many thanks,

      JFG

      Attachments

        Issue Links

          Activity

            jeanfrancois.gagne Jean-François Gagné created issue -
            wlad Vladislav Vaintroub added a comment - - edited

            Out of curiosity, about the the round trips. There is batching via semicolon "UPDATE... ;SELECT @@session_var" and also MariaDB specific BEGIN NOT ATOMIC, that does not need semicolon batching to be enabled. Would not work for some reason?

            wlad Vladislav Vaintroub added a comment - - edited Out of curiosity, about the the round trips. There is batching via semicolon "UPDATE... ;SELECT @@session_var" and also MariaDB specific BEGIN NOT ATOMIC, that does not need semicolon batching to be enabled. Would not work for some reason?

            Thanks for looking into that Vladislav.
            I am not familiar with batching: will this work in all cases (all drivers: Java Perl, ..., including with prepare statement) ?

            jeanfrancois.gagne Jean-François Gagné added a comment - Thanks for looking into that Vladislav. I am not familiar with batching: will this work in all cases (all drivers: Java Perl, ..., including with prepare statement) ?

            "semicolon" batching , i.e commands separated by ";" , might require some special parameters to enable, and the way to enable it could be driver specific.
            e.g allowMultiQueries=true in JDBC. Server-side prepared statements I believe are not supported, client-side prepared statements will work in JDBC, not sure about anything else.

            BEGIN NOT ATOMIC should work just fine in 10.1 not requiring special parameters for enabling it. I'm unsure how prepared statements work with it. I did not read anything about not supporting, but did not try either.

            wlad Vladislav Vaintroub added a comment - "semicolon" batching , i.e commands separated by ";" , might require some special parameters to enable, and the way to enable it could be driver specific. e.g allowMultiQueries=true in JDBC. Server-side prepared statements I believe are not supported, client-side prepared statements will work in JDBC, not sure about anything else. BEGIN NOT ATOMIC should work just fine in 10.1 not requiring special parameters for enabling it. I'm unsure how prepared statements work with it. I did not read anything about not supporting, but did not try either.

            It shouldn't be difficult to report gtid in the session tracker framework.
            In fact, there is even a reserved value SESSION_GTIDS_TRACKER for this.

            serg Sergei Golubchik added a comment - It shouldn't be difficult to report gtid in the session tracker framework. In fact, there is even a reserved value SESSION_GTIDS_TRACKER for this.
            serg Sergei Golubchik made changes -
            Field Original Value New Value
            Fix Version/s 10.3 [ 22126 ]
            rcannao René Cannaò added a comment - Bump via https://jira.mariadb.org/browse/CONC-302
            markus makela markus makela added a comment -

            Blocks MXS-199.

            markus makela markus makela added a comment - Blocks MXS-199 .
            markus makela markus makela made changes -
            Priority Minor [ 4 ] Major [ 3 ]
            markus makela markus makela made changes -
            Priority Major [ 3 ] Minor [ 4 ]
            sanja Oleksandr Byelkin made changes -
            Priority Minor [ 4 ] Critical [ 2 ]
            sanja Oleksandr Byelkin added a comment - - edited

            I risen priority because it block other tasks

            sanja Oleksandr Byelkin added a comment - - edited I risen priority because it block other tasks
            cvicentiu Vicențiu Ciorbaru made changes -
            Assignee Vicentiu Ciorbaru [ cvicentiu ]
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -
            Assignee Vicentiu Ciorbaru [ cvicentiu ] Oleksandr Byelkin [ sanja ]
            johan.wikman Johan Wikman made changes -
            sanja Oleksandr Byelkin made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            sanja Oleksandr Byelkin made changes -
            sanja Oleksandr Byelkin made changes -
            Status In Progress [ 3 ] Stalled [ 10000 ]

            functionality will be implemeted in MDEV-15477
            https://jira.mariadb.org/browse/MDEV-15477

            sanja Oleksandr Byelkin added a comment - functionality will be implemeted in MDEV-15477 https://jira.mariadb.org/browse/MDEV-15477
            sanja Oleksandr Byelkin made changes -
            Fix Version/s 10.3.6 [ 23003 ]
            Fix Version/s 10.3 [ 22126 ]
            Resolution Duplicate [ 3 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            markus makela markus makela added a comment - - edited

            Is MDEV-15477 fixed in 10.3.6? What does the fix version of 10.3.6 mean for this issue?

            markus makela markus makela added a comment - - edited Is MDEV-15477 fixed in 10.3.6? What does the fix version of 10.3.6 mean for this issue?
            wagnerbianchi Wagner Bianchi (Inactive) made changes -
            Comment [ I don't see this fix mentioned on https://mariadb.com/kb/en/library/mariadb-1036-changelog/. Was it really fixed or added? ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 79457 ] MariaDB v4 [ 133115 ]

            People

              sanja Oleksandr Byelkin
              jeanfrancois.gagne Jean-François Gagné
              Votes:
              3 Vote for this issue
              Watchers:
              12 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.