config root man

Current Path : /home/usr.opt/mysql57/mysql-test/suite/group_replication/r/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : /home/usr.opt/mysql57/mysql-test/suite/group_replication/r/gr_transaction_limit.result

## 0. Start 3 servers with GR
include/group_replication.inc [rpl_server_count=3]
Warnings:
Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
Note	####	Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
[connection server1]

[connection server2]
set session sql_log_bin=0;
call mtr.add_suppression("Run function 'before_commit' in plugin 'group_replication' failed");
call mtr.add_suppression("Error on session .*. Transaction of size .* exceeds specified limit 16. To increase the limit please adjust group_replication_transaction_size_limit option.");
call mtr.add_suppression("Error on session .*. Transaction of size .* exceeds specified limit 1600. To increase the limit please adjust group_replication_transaction_size_limit option.");
set session sql_log_bin=1;

[connection server3]
set session sql_log_bin=0;
call mtr.add_suppression("Run function 'before_commit' in plugin 'group_replication' failed");
call mtr.add_suppression("Error on session .*. Transaction of size .* exceeds specified limit 1600. To increase the limit please adjust group_replication_transaction_size_limit option.");
set session sql_log_bin=1;

include/rpl_gr_wait_for_number_of_members.inc

## 1. Connect to server 1, create a table (t1)
##    Table t1 will be used later in step 3
[connection server1]
CREATE TABLE t1 (a INT PRIMARY KEY);
include/rpl_sync.inc

## 2.1 Create table t2 on server 1 and t3 on server 2.
[connection server1]
CREATE TABLE t2 (a INT PRIMARY KEY);
include/rpl_sync.inc

[connection server2]
CREATE TABLE t3 (a INT PRIMARY KEY);
include/rpl_sync.inc

## 2.2 Validate tables t2 and t3 are created on each server.
[connection server1]
include/assert.inc ['Check table t2 exist on server 1']
include/assert.inc ['Check table t3 exist on server 1']

[connection server2]
include/assert.inc ['Check table t2 exist on server 2']
include/assert.inc ['Check table t3 exist on server 2']

[connection server3]
include/assert.inc ['Check table t2 exist on server 3']
include/assert.inc ['Check table t3 exist on server 3']

## 2.3 Drop table t2 on server 1 and table t3 on server 2.
[connection server1]
DROP TABLE t2;
include/rpl_sync.inc

[connection server2]
DROP TABLE t3;
include/rpl_sync.inc

## 2.4 Validate tables t2 and t3 are dropped on each server.
[connection server1]
include/assert.inc ['Check table t2 dropped on server 1']
include/assert.inc ['Check table t3 dropped on server 1']

[connection server2]
include/assert.inc ['Check table t2 dropped on server 2']
include/assert.inc ['Check table t3 dropped on server 2']

[connection server3]
include/assert.inc ['Check table t2 dropped on server 3']
include/assert.inc ['Check table t3 dropped on server 3']

## 2.5 Create table using select statement, table should not be created
##     CREATE TABLE .. SELECT is not allowed in GR
##     since it does not support GTID
[connection server1]
CREATE TABLE t4 AS SELECT * FROM t1;
ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT.

[connection server1]
include/assert.inc ['Table t4 does not exist on server 1']

[connection server2]
include/assert.inc ['Table t4 does not exist on server 2']

[connection server3]
include/assert.inc ['Table t4 does not exist on server 3']

## 3.1 Insert some data in table t1 on server 2,
##     transaction should be rolledback
[connection server2]
INSERT INTO t1 VALUES (10);
ERROR HY000: Error on observer while running replication hook 'before_commit'.
include/rpl_sync.inc

[connection server1]
include/assert.inc ['Checking the number of records in table t1']

[connection server2]
include/assert.inc ['Checking the number of records in table t1']

[connection server3]
include/assert.inc ['Checking the number of records in table t1']

## 3.2 Insert some data in table t1 on server 1, data should be inserted
[connection server1]
INSERT INTO t1 VALUES (10);
include/rpl_sync.inc

[connection server1]
include/assert.inc ['Checking the number of records in table t1']

[connection server2]
include/assert.inc ['Checking the number of records in table t1']

[connection server3]
include/assert.inc ['Checking the number of records in table t1']

## 3.3 Insert some data in table t1 on server 3, data should be inserted
[connection server3]
INSERT INTO t1 VALUES (20);
include/rpl_sync.inc

[connection server1]
include/assert.inc ['Checking the number of records in table t1']

[connection server2]
include/assert.inc ['Checking the number of records in table t1']

[connection server3]
include/assert.inc ['Checking the number of records in table t1']

DELETE FROM t1;
include/rpl_sync.inc

## 3.4 Insert large sample data in table t1 on server 3,
##     transaction should be rolledback
[connection server3]
BEGIN;
COMMIT;
ERROR HY000: Error on observer while running replication hook 'before_commit'.
include/rpl_sync.inc

[connection server1]
include/assert.inc ['Checking the number of records in table t1']

[connection server2]
include/assert.inc ['Checking the number of records in table t1']

[connection server3]
include/assert.inc ['Checking the number of records in table t1']

## 3.5 Insert large sample data in table t1 on server 1,
##     data should be inserted
[connection server1]
BEGIN;
COMMIT;
include/rpl_sync.inc

[connection server1]
include/assert.inc ['Checking the number of records in table t1']

[connection server2]
include/assert.inc ['Checking the number of records in table t1']

[connection server3]
include/assert.inc ['Checking the number of records in table t1']

## 3.6 Delete all data from table t1 on server 2,
##     transaction should be rolledback
[connection server2]
SET @group_replication_transaction_size_limit_save= @@GLOBAL.group_replication_transaction_size_limit;
SET GLOBAL group_replication_transaction_size_limit= 1600;
DELETE FROM t1;
ERROR HY000: Error on observer while running replication hook 'before_commit'.
include/rpl_sync.inc
SET GLOBAL group_replication_transaction_size_limit= @group_replication_transaction_size_limit_save;

[connection server1]
include/assert.inc ['Checking the number of records in table t1']

[connection server2]
include/assert.inc ['Checking the number of records in table t1']

[connection server3]
include/assert.inc ['Checking the number of records in table t1']

## 3.7 Delete all data from table t1 on server 3,
##     transaction should be rolledback
[connection server3]
SET @group_replication_transaction_size_limit_save= @@GLOBAL.group_replication_transaction_size_limit;
SET GLOBAL group_replication_transaction_size_limit= 1600;
DELETE FROM t1;
ERROR HY000: Error on observer while running replication hook 'before_commit'.
include/rpl_sync.inc
SET GLOBAL group_replication_transaction_size_limit= @group_replication_transaction_size_limit_save;

[connection server1]
include/assert.inc ['Checking the number of records in table t1']

[connection server2]
include/assert.inc ['Checking the number of records in table t1']

[connection server3]
include/assert.inc ['Checking the number of records in table t1']

## 3.8 Delete all data from table t1 on server 1, table will be empty
[connection server1]
DELETE FROM t1;
include/rpl_sync.inc

## 4. Validate that server1, server2 and server 3 has same set of data
include/diff_tables.inc [server1:test.t1, server2:test.t1, server3:test.t1]

## 5. Clean-up
DROP TABLE t1;
include/group_replication_end.inc

Man Man