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

mariadb-hotcopy requires '--port' set for operation since 10.11

Details

    Description

      As I described here on Zulip,
      I keep hitting this problem with MariaDB 10.11 on Fedora / RHEL.

      mysql <<< "CREATE DATABASE db1; USE db1; CREATE TABLE test_table1 (f1 INT, f2 INT) ENGINE=MyISAM; INSERT INTO test_table1 VALUES (111, 222);"
       
      mysql -D db1 -e "SELECT * FROM test_table1;"
       
      mysql -D brand_new_db1
       
      mysqlhotcopy db1 brand_new_db1
      

      returns:

      ERROR 1049 (42000): Unknown database 'brand_new_db1'
      Argument "" isn't numeric in subroutine entry at /usr/lib64/perl5/vendor_perl/DBD/MariaDB.pm line 140.
      DBI connect(';host=;port=;mariadb_read_default_group=mysqlhotcopy','',...) failed: Connection error: port is not valid number at /usr/bin/mysqlhotcopy line 222.
      

      It only works in MariaDB 10.11 when --port is specified. (but without --host, which contradicts this)
      In MariaDB 10.5 it works without the need to specify the port.

      Sergei Golubchik said in the Zulip coversation it is likely a bug, not an expected change, so I'm reporting it as such.

      Attachments

        Issue Links

          Activity

            to quote more from Zulip,
            likely caused by

            commit 82f27ea5a49
            Author: Anel Husakovic <anel@mariadb.org>
            Date:   Thu Jan 11 12:54:16 2024 +0100
             
                MDEV-33187: Make mariadb-hotcopy compatible with DBI:MariaDB
            

            with the change

            -$dsn .= ";port=$opt{port}" if $opt{port};
            +  if ($opt{host} ne "localhost")
            +  {
            +    $dsn .= ";port=". $opt{port};
            +  }
            

            serg Sergei Golubchik added a comment - to quote more from Zulip, likely caused by commit 82f27ea5a49 Author: Anel Husakovic <anel@mariadb.org> Date: Thu Jan 11 12:54:16 2024 +0100   MDEV-33187: Make mariadb-hotcopy compatible with DBI:MariaDB with the change -$dsn .= ";port=$opt{port}" if $opt{port}; + if ($opt{host} ne "localhost") + { + $dsn .= ";port=". $opt{port}; + }

            Thanks for the report.

            elenst Elena Stepanova added a comment - Thanks for the report.

            People

              serg Sergei Golubchik
              mschorm Michal Schorm
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.