| 1 |
############################################################ |
| 2 |
# Purpose: WL#5223. Testing BGC options |
| 3 |
# Author: Serge Kozlov <[email protected]> |
| 4 |
# Purpose: Execute server code related to BGC options. |
| 5 |
# We do not test here the functionality of new |
| 6 |
# options because of it requires a complex |
| 7 |
# test with debug-sync and just make sure |
| 8 |
# that there is no crash/assertion when |
| 9 |
# that code executed. |
| 10 |
############################################################ |
| 11 |
--source include/not_group_replication_plugin.inc |
| 12 |
source include/master-slave.inc; |
| 13 |
|
| 14 |
# Settings |
| 15 |
let $loop_counter= 100; |
| 16 |
|
| 17 |
--disable_query_log |
| 18 |
# Create table |
| 19 |
echo # Create table; |
| 20 |
CREATE TABLE t (a INT NOT NULL, b VARCHAR(200), c TEXT, d DATETIME NOT NULL, e BIGINT NOT NULL, KEY(d,e)) ENGINE=InnoDB; |
| 21 |
|
| 22 |
# Create connections |
| 23 |
echo # Create connections; |
| 24 |
connect(conn_1,localhost,root,,); |
| 25 |
connect(conn_2,localhost,root,,); |
| 26 |
|
| 27 |
# Main test |
| 28 |
echo # Insert rows; |
| 29 |
disable_query_log; |
| 30 |
disable_result_log; |
| 31 |
while ($loop_counter) { |
| 32 |
connection conn_1; |
| 33 |
send INSERT INTO t VALUES (1, '', REPEAT('a', 1), NOW(), 1); |
| 34 |
connection conn_2; |
| 35 |
send INSERT INTO t VALUES (1, '', REPEAT('a', 1), NOW(), 1); |
| 36 |
connection conn_1; |
| 37 |
reap; |
| 38 |
connection conn_2; |
| 39 |
reap; |
| 40 |
dec $loop_counter; |
| 41 |
} |
| 42 |
enable_result_log; |
| 43 |
enable_query_log; |
| 44 |
|
| 45 |
# Results |
| 46 |
echo # Master results; |
| 47 |
connection master; |
| 48 |
SELECT COUNT(a) FROM t; |
| 49 |
--source include/sync_slave_sql_with_master.inc |
| 50 |
echo # Slave results; |
| 51 |
SELECT COUNT(a) FROM t; |
| 52 |
|
| 53 |
# Clean up |
| 54 |
echo # Clean up; |
| 55 |
connection master; |
| 56 |
DROP TABLE t; |
| 57 |
--source include/sync_slave_sql_with_master.inc |
| 58 |
source include/stop_slave.inc; |
| 59 |
|
| 60 |
--let $rpl_only_running_threads = 1; |
| 61 |
--source include/rpl_end.inc |
| 62 |
echo # End of tests; |