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

Get last_gtid in OK packet.

    XMLWordPrintable

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

            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.