Commit 75afa93e authored by Nirbhay Choubey's avatar Nirbhay Choubey

Fix galera.galera_as_slave_nonprim test.

parent 0d8eb20c
#
# This .cnf file creates a setup with 1 standard MySQL server, followed by a 2-node Galera cluster
# This .cnf file creates a setup with 1 standard MariaDB server, followed by a 3-node Galera cluster
#
# Use default setting for mysqld processes
!include include/default_mysqld.cnf
[mysqld]
log-slave-updates
log-bin=mysqld-bin
log-bin
binlog-format=row
[mysqld.1]
server-id=1
[mysqld.2]
server-id=2
wsrep_provider=@ENV.WSREP_PROVIDER
wsrep_cluster_address='gcomm://'
wsrep_provider_options='base_port=@mysqld.2.#galera_port;evs.install_timeout = PT15S; evs.max_install_timeouts=1;'
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
# enforce read-committed characteristics across the cluster
wsrep_causal_reads=ON
wsrep_sync_wait = 7
log-slave-updates
innodb-autoinc-lock-mode=2
default-storage-engine=innodb
wsrep-provider=@ENV.WSREP_PROVIDER
wsrep_node_address=127.0.0.1
wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port
wsrep-cluster-address=gcomm://
wsrep_provider_options='base_port=@mysqld.2.#galera_port;evs.install_timeout = PT15S;evs.max_install_timeouts=1;gcache.size=10M'
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
# Required for Galera
innodb_autoinc_lock_mode=2
innodb_flush_log_at_trx_commit=2
# enforce read-committed characteristics across the cluster
wsrep-causal-reads=ON
wsrep-sync-wait=7
server-id=2
[mysqld.3]
wsrep_provider=@ENV.WSREP_PROVIDER
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.2.#galera_port'
wsrep_provider_options='base_port=@mysqld.3.#galera_port;evs.install_timeout = PT15S; evs.max_install_timeouts = 1;'
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
# enforce read-committed characteristics across the cluster
wsrep_causal_reads=ON
wsrep_sync_wait = 7
log-slave-updates
innodb-autoinc-lock-mode=2
default-storage-engine=innodb
wsrep-provider=@ENV.WSREP_PROVIDER
wsrep_node_address=127.0.0.1
wsrep_sst_receive_address=127.0.0.2:@mysqld.3.#sst_port
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.2.#galera_port'
wsrep_provider_options='base_port=@mysqld.3.#galera_port;evs.install_timeout=PT15S;evs.max_install_timeouts=1;gcache.size=10M'
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
# Required for Galera
innodb_autoinc_lock_mode=2
innodb_flush_log_at_trx_commit=2
# enforce read-committed characteristics across the cluster
wsrep-causal-reads=ON
wsrep-sync-wait=7
server-id=3
[mysqld.4]
wsrep_provider=@ENV.WSREP_PROVIDER
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.2.#galera_port'
wsrep_provider_options='base_port=@mysqld.4.#galera_port;evs.install_timeout = PT15S; evs.max_install_timeouts = 1;'
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
# enforce read-committed characteristics across the cluster
wsrep_causal_reads=ON
wsrep_sync_wait = 7
log-slave-updates
innodb-autoinc-lock-mode=2
default-storage-engine=innodb
wsrep-provider=@ENV.WSREP_PROVIDER
wsrep_node_address=127.0.0.1
wsrep_sst_receive_address=127.0.0.2:@mysqld.4.#sst_port
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.2.#galera_port'
wsrep_provider_options='base_port=@mysqld.4.#galera_port;evs.install_timeout=PT15S;evs.max_install_timeouts=1;gcache.size=10M'
wsrep_node_incoming_address=127.0.0.1:@mysqld.4.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.4.#sst_port'
# Required for Galera
innodb_autoinc_lock_mode=2
innodb_flush_log_at_trx_commit=2
# enforce read-committed characteristics across the cluster
wsrep-causal-reads=ON
wsrep-sync-wait=7
server-id=4
[ENV]
NODE_MYPORT_1= @mysqld.1.port
......@@ -79,8 +85,8 @@ NODE_MYSOCK_2= @mysqld.2.socket
NODE_MYPORT_3= @mysqld.3.port
NODE_MYSOCK_3= @mysqld.3.socket
NODE_MYPORT_3= @mysqld.4.port
NODE_MYSOCK_3= @mysqld.4.socket
NODE_MYPORT_4= @mysqld.4.port
NODE_MYSOCK_4= @mysqld.4.socket
NODE_GALERAPORT_2= @mysqld.2.#galera_port
NODE_GALERAPORT_3= @mysqld.3.#galera_port
......
START SLAVE USER='root';
Warnings:
Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure.
START SLAVE;
SET SESSION wsrep_sync_wait = 0;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
......
......@@ -6,7 +6,6 @@
#
--source include/have_innodb.inc
--source include/have_log_bin.inc
--source include/big_test.inc
# Step #1. Establish replication
......@@ -18,9 +17,9 @@
--connection node_2
--disable_query_log
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_1;
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_1, MASTER_USER='root';
--enable_query_log
START SLAVE USER='root';
START SLAVE;
SET SESSION wsrep_sync_wait = 0;
--connection node_1
......@@ -64,7 +63,7 @@ SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
--source include/wait_condition.inc
--connection node_2
--source include/galera_wait_ready.inc
--source include/wait_until_ready.inc
--source include/wait_until_connected_again.inc
START SLAVE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment