[MDEV-7868] multisource replication - replicate_do_db doubled from config file Created: 2015-03-29  Updated: 2015-10-23  Resolved: 2015-06-01

Status: Closed
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.0.17
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Daniel Black Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: None
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  



 Comments   
Comment by Elena Stepanova [ 2015-03-30 ]

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
...

Comment by Daniel Black [ 2015-03-31 ]

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/

Comment by Elena Stepanova [ 2015-03-31 ]

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?

Comment by Elena Stepanova [ 2015-06-01 ]

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

Generated at Thu Feb 08 07:22:53 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.