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

mysqlhotcopy and transaction_registry table

    XMLWordPrintable

    Details

      Description

      See also (original report):
      http://bugs.debian.org/946671

      Using mysqlhotcopy, I received the error:

      DBD::mysql::db do failed: You can't use locks with log tables at /usr/bin/mysqlhotcopy line 545.

      (Your line number may differ: I use my "own" mysqlhotcopy, as per
      http://bugs.debian.org/735014 .)

      This seems related to the new transaction_registry table
      as suggested in
      https://mariadb.com/kb/en/library/mysqldump/
      that says:
      mysqldump in MariaDB 10.3 includes logic to cater for the
      mysql.transaction_registry table. ...

      My patch for this issue, below.

      Cheers, Paul

      --- /usr/bin/mysqlhotcopy.OLD   2017-12-26 09:11:27.000000000 +1100
      +++ /usr/bin/mysqlhotcopy       2019-12-13 21:10:34.225611502 +1100
      @@ -317,8 +317,24 @@
           ## keep in sync with mysqldump.
           if ($db =~ m/^mysql$/i)
           {
      +#####
      +#      @dbh_base_tables = grep 
      +#        { !/^(apply_status|schema|general_log|slow_log)$/ } @dbh_base_tables
      +#####
      +# PSz 13 Dec 2019
      +# Skip transaction_registry also.
      +# See also:
      +#   https://bugs.mysql.com/bug.php?id=43594
      +#   https://bugs.debian.org/574514
      +# and see
      +#   https://mariadb.com/kb/en/library/mysqldump/
      +# that says:
      +#   mysqldump in MariaDB 10.3 includes logic to cater for the mysql.transaction_registry table. ...
      +# but I guess they forgot about mysqlhotcopy.
      +#####
             @dbh_base_tables = grep 
      -        { !/^(apply_status|schema|general_log|slow_log)$/ } @dbh_base_tables
      +        { !/^(apply_status|schema|general_log|slow_log|transaction_registry)$/ } @dbh_base_tables
      +#####
           }
       
           ## generate regex for tables/files
      

      –
      Paul Szabo psz@maths.usyd.edu.au http://www.maths.usyd.edu.au/u/psz/
      School of Mathematics and Statistics University of Sydney Australia

        Attachments

          Activity

            People

            Assignee:
            midenok Aleksey Midenkov
            Reporter:
            psz Paul Szabo
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: