mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
cd1a11ace3
While sql_bin_log=1(0) is meant to control binary logging for the current session so that the updates to do(not) get logged into the binary log to be replicated to the async MariaDB slave. The same should not affect galera replication. That is, the updates should always get replicated to other galera nodes regardless of sql_bin_log's value. Fixed by making sure that the updates are written to binlog cache irrespective of sql_bin_log. Added test cases.
70 lines
1.7 KiB
INI
70 lines
1.7 KiB
INI
#
|
|
# This file creates a setup with a 2-node Galera cluster (master) and one
|
|
# standalone MariaDB server, to be used as a slave.
|
|
#
|
|
|
|
# Use default setting for mysqld processes
|
|
!include include/default_mysqld.cnf
|
|
|
|
[mysqld]
|
|
log-bin=mysqld-bin
|
|
binlog-format=row
|
|
innodb-autoinc-lock-mode=2
|
|
default-storage-engine=innodb
|
|
|
|
[mysqld.1]
|
|
#galera_port=@OPT.port
|
|
#ist_port=@OPT.port
|
|
#sst_port=@OPT.port
|
|
|
|
server-id=1
|
|
log_slave_updates
|
|
|
|
wsrep-on=1
|
|
wsrep-provider=@ENV.WSREP_PROVIDER
|
|
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M'
|
|
wsrep_cluster_address=gcomm://
|
|
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
|
|
wsrep_node_address=127.0.0.1
|
|
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
|
|
# enforce read-committed characteristics across the cluster
|
|
wsrep-causal-reads=ON
|
|
wsrep-sync-wait=7
|
|
|
|
[mysqld.2]
|
|
#galera_port=@OPT.port
|
|
#ist_port=@OPT.port
|
|
#sst_port=@OPT.port
|
|
|
|
server-id=2
|
|
log_slave_updates
|
|
|
|
wsrep-on=1
|
|
wsrep_provider=@ENV.WSREP_PROVIDER
|
|
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M'
|
|
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
|
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
|
|
wsrep_node_address=127.0.0.1
|
|
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
|
|
# enforce read-committed characteristics across the cluster
|
|
wsrep-causal-reads=ON
|
|
wsrep-sync-wait=7
|
|
|
|
[mysqld.3]
|
|
server-id=3
|
|
|
|
[ENV]
|
|
NODE_MYPORT_1= @mysqld.1.port
|
|
NODE_MYSOCK_1= @mysqld.1.socket
|
|
|
|
NODE_MYPORT_2= @mysqld.2.port
|
|
NODE_MYSOCK_2= @mysqld.2.socket
|
|
|
|
NODE_MYPORT_3= @mysqld.3.port
|
|
NODE_MYSOCK_3= @mysqld.3.socket
|
|
|
|
NODE_GALERAPORT_1= @mysqld.1.#galera_port
|
|
NODE_GALERAPORT_2= @mysqld.2.#galera_port
|
|
|
|
NODE_SSTPORT_1= @mysqld.1.#sst_port
|
|
NODE_SSTPORT_2= @mysqld.2.#sst_port
|