MINI MINI MANI MO

Path : /opt/mysql/mysql-test/suite/binlog/t/
File Upload :
Current File : //opt/mysql/mysql-test/suite/binlog/t/binlog_wait_for_executed_gtid_set_interrupted.test

# WL#7796 - WAIT_FOR_GTID_EXECUTED
#
# This test checks that a concurrent client can kill the waiting thread and
# generate the ER_QUERY_INTERRUPTED error.

--source include/have_log_bin.inc
--source include/have_gtid.inc

--let $master_uuid= query_get_value(SELECT @@SERVER_UUID, @@SERVER_UUID, 1)
RESET MASTER;
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);

--connect(con1,127.0.0.1,root,,test,$MASTER_MYPORT,)
--connect(con2,127.0.0.1,root,,test,$MASTER_MYPORT,)

--connection con1

--let $connection_id= `SELECT CONNECTION_ID()`

--send
--replace_result $master_uuid MASTER_UUID
--eval SELECT WAIT_FOR_EXECUTED_GTID_SET('$master_uuid:4', 100)

--connection default
DROP TABLE t1;

--connection con2
--replace_result $connection_id CONNECTION_ID
--eval KILL QUERY $connection_id

--connection con1
--error ER_QUERY_INTERRUPTED
--reap

OHA YOOOO