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

multisource replication - replicate_do_db doubled from config file

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not a Bug
    • Affects Version/s: 10.0.17
    • Fix Version/s: N/A
    • Component/s: Replication
    • Labels:
    • Environment:
      x86_64, rhel6, 5.5 master , 10.0.17 slave

      Description

      two multisource replication connections exist and the replicate-do-db value is duplicated

      on slave:

      config file:
      replicate-do-db=X_20150210
      
      select @@replicate_do_db;
      +---------------------------------+
      | @@replicate_do_db               |
      +---------------------------------+
      | X_20150210,X_20150210 |
      
      > show slave '5.5' status\G
      *************************** 1. row ***************************
                     Slave_IO_State: Waiting for master to send event
                        Master_Host: localhost
                        Master_User: repl
                        Master_Port: 3306 
                      Connect_Retry: 60  
                    Master_Log_File: tulwaurt005-mysql-bin.000710 
                Read_Master_Log_Pos: 368431778 
                     Relay_Log_File: tulwaurt005-relay-bin-5@002e5.000015  
                      Relay_Log_Pos: 50253691  
              Relay_Master_Log_File: tulwaurt005-mysql-bin.000710  
                   Slave_IO_Running: Yes 
                  Slave_SQL_Running: Yes 
                    Replicate_Do_DB: X_20150210,X_20150210  
      

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment -

            It's an obvious question, but still – are you sure you don't have the option also in some other section of the cnf, or in a different cnf, or on a command line? You know that the values get concatenated, so it would look exactly like that. I got the very same duplication initially, but then I realized that I had it both in the cnf file and on the command line. Once I removed it from the command line, no duplication:

            $ cat 1.cnf
            [mysqld]
            replicate-do-db=X_20150210
            
            MariaDB [test]> show slave '5.5' status \G
            *************************** 1. row ***************************
            ...
                          Replicate_Do_DB: X_20150210
            ...
            
            MariaDB [test]> show slave '10.0' status \G
            *************************** 1. row ***************************
            ...
                          Replicate_Do_DB: X_20150210
            ...
            
            Show
            elenst Elena Stepanova added a comment - It's an obvious question, but still – are you sure you don't have the option also in some other section of the cnf, or in a different cnf, or on a command line? You know that the values get concatenated, so it would look exactly like that. I got the very same duplication initially, but then I realized that I had it both in the cnf file and on the command line. Once I removed it from the command line, no duplication: $ cat 1.cnf [mysqld] replicate-do-db=X_20150210 MariaDB [test]> show slave '5.5' status \G *************************** 1. row *************************** ... Replicate_Do_DB: X_20150210 ... MariaDB [test]> show slave '10.0' status \G *************************** 1. row *************************** ... Replicate_Do_DB: X_20150210 ...
            Hide
            danblack Daniel Black added a comment -

            This is how the init script initialised ran mysqld:

            $ cat /proc/6591/cmdline  |tr "\0" ' '
            /opt/mariadb-10/sbin/mysqld --basedir=/opt/mariadb-10 --datadir=/u01/mariadb-10 --plugin-dir=/opt/mariadb-10/lib64/mysql/plugin/ --user=mysql --log-error=/var/lib/mariadb/mysqld-10.log --open-files-limit=32768 --pid-file=/var/run/mysqld/mysqld-10.pid --socket=/var/lib/mariadb/mysql-10.sock --port=3310 
            
            $ grep dir= /etc/init.d/mysql
            #   basedir=<path-to-mysql-installation-directory>
            basedir=/opt/mariadb-10
            datadir=/u01/mariadb-10
            
            $ more /opt/mariadb-10/my.cnf 
            
            # The following options will be passed to all MySQL clients
            [client]
            port                    = 3310
            socket                  = /var/lib/mariadb/mysql-10.sock
            
            
            [mysqladmin]
            port                    = 3310
            socket                  = /var/lib/mariadb/mysql-10.sock
            
            # The MySQL server
            [mysqld]
            
            plugin_dir = /opt/mariadb-10/lib64/mysql/plugin/
            
            port                    = 3310
            socket                  = /var/lib/mariadb/mysql-10.sock
            
            slow_query_log_file     = /var/lib/mariadb/slow_query_log-10.log
            pid-file                = /var/run/mysqld/mysqld-10.pid
            
            # Server settings
            datadir                 = /u01/mariadb-10
            
            # Point the following paths to different dedicated disks
            tmpdir                  = /u01tmp/mariadb-10/tmp
            
            # The safe_mysqld script
            [safe_mysqld]
            log-error               = /var/lib/mariadb/mysqld-10.log
            
            !includedir /etc/my.cnf.d/
            
            grep -r do- /etc/my*
            /etc/my.cnf.d/testonly.cnf:replicate-do-db=X_20150210
            
            more /etc/my.cnf.d/testonly.cnf 
            
            [mysqld]
            
            userstat = 1
            
            [mariadb-10.0]
            
            query_response_time_stats=1
            
            # added while  replicating 5.5->10 in separate slave connection
            skip-slave-start=1
            slave-skip-errors=1062,1146
            replicate-do-db=X_20150210
            
            [galera]
            
            # GALERA SPECIFIC OPTIONS
            
            wsrep_cluster_name = X_test
            wsrep_cluster_address= gcomm://239.255.101.1
            

            not sure if its used however /etc/my.cnf has

            !includedir /etc/my.cnf.d/
            
            Show
            danblack Daniel Black added a comment - This is how the init script initialised ran mysqld: $ cat /proc/6591/cmdline |tr "\0" ' ' /opt/mariadb-10/sbin/mysqld --basedir=/opt/mariadb-10 --datadir=/u01/mariadb-10 --plugin-dir=/opt/mariadb-10/lib64/mysql/plugin/ --user=mysql --log-error=/var/lib/mariadb/mysqld-10.log --open-files-limit=32768 --pid-file=/var/run/mysqld/mysqld-10.pid --socket=/var/lib/mariadb/mysql-10.sock --port=3310 $ grep dir= /etc/init.d/mysql # basedir=<path-to-mysql-installation-directory> basedir=/opt/mariadb-10 datadir=/u01/mariadb-10 $ more /opt/mariadb-10/my.cnf # The following options will be passed to all MySQL clients [client] port = 3310 socket = /var/lib/mariadb/mysql-10.sock [mysqladmin] port = 3310 socket = /var/lib/mariadb/mysql-10.sock # The MySQL server [mysqld] plugin_dir = /opt/mariadb-10/lib64/mysql/plugin/ port = 3310 socket = /var/lib/mariadb/mysql-10.sock slow_query_log_file = /var/lib/mariadb/slow_query_log-10.log pid-file = /var/run/mysqld/mysqld-10.pid # Server settings datadir = /u01/mariadb-10 # Point the following paths to different dedicated disks tmpdir = /u01tmp/mariadb-10/tmp # The safe_mysqld script [safe_mysqld] log-error = /var/lib/mariadb/mysqld-10.log !includedir /etc/my.cnf.d/ grep -r do- /etc/my* /etc/my.cnf.d/testonly.cnf:replicate-do-db=X_20150210 more /etc/my.cnf.d/testonly.cnf [mysqld] userstat = 1 [mariadb-10.0] query_response_time_stats=1 # added while replicating 5.5->10 in separate slave connection skip-slave-start=1 slave-skip-errors=1062,1146 replicate-do-db=X_20150210 [galera] # GALERA SPECIFIC OPTIONS wsrep_cluster_name = X_test wsrep_cluster_address= gcomm://239.255.101.1 not sure if its used however /etc/my.cnf has !includedir /etc/my.cnf.d/
            Hide
            elenst Elena Stepanova added a comment -

            not sure if its used however /etc/my.cnf has

            Yes, it's used, and so your /etc/my.cnf.d/testonly.cnf is included twice, hence the double value. At least that's my theory.
            Can you comment that line in /etc/my.cnf (or anyhow else get rid of it), and try again?

            Show
            elenst Elena Stepanova added a comment - not sure if its used however /etc/my.cnf has Yes, it's used, and so your /etc/my.cnf.d/testonly.cnf is included twice, hence the double value. At least that's my theory. Can you comment that line in /etc/my.cnf (or anyhow else get rid of it), and try again?
            Hide
            elenst Elena Stepanova added a comment -

            I assume the above explains the mystery. If not, please let us know.

            Show
            elenst Elena Stepanova added a comment - I assume the above explains the mystery. If not, please let us know.

              People

              • Assignee:
                Unassigned
                Reporter:
                danblack Daniel Black
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: