1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
|
# ==== Purpose ====
#
# When binlog is disabled, verify that GTID ownership is released
# for explicit prepared statements with specified GTID.
#
# ==== References ====
#
# Bug#20954452 GTID IS NOT RELEASED PROPERLY WHEN PS_PROTOCOL + GTID + BINLOG OFF COMBINATION
# Should be tested against "binlog disabled" server
--source include/not_log_bin.inc
# Clean gtid_executed so that test can execute after other tests
FLUSH LOGS;
RESET MASTER;
# Initial setup
connect (connection_for_table_check,127.0.0.1,root,,test,$MASTER_MYPORT);
--source include/gtid_utils.inc
let $master_uuid= `SELECT @@GLOBAL.SERVER_UUID`;
# Remember the current gtid_executed context
--connection connection_for_table_check
--source include/gtid_step_reset.inc
# Check-1: CREATE TABLE
--let $statement= CREATE TABLE t1( i INT) engine=INNODB
--source include/gtid_prepare_and_execute_stmt.inc
# Check-2: INSERT
--let $statement= INSERT INTO t1 VALUES (12)
--source include/gtid_prepare_and_execute_stmt.inc
# Check-3: INSERT SELECT
--let $statement= INSERT INTO t1 SELECT * FROM t1
--source include/gtid_prepare_and_execute_stmt.inc
# Check-4: UPDATE
--let $statement= UPDATE t1 SET i=13 WHERE i=12
--source include/gtid_prepare_and_execute_stmt.inc
# Check-5: DELETE
--let $statement= DELETE FROM t1
--source include/gtid_prepare_and_execute_stmt.inc
# Check-6: ALTER
--let $statement= ALTER TABLE t1 ADD COLUMN other_column INT
--source include/gtid_prepare_and_execute_stmt.inc
# Check-7: CREATE INDEX
--let $statement= CREATE INDEX t_index ON t1(i)
--source include/gtid_prepare_and_execute_stmt.inc
# Check-8: DROP INDEX
--let $statement= DROP INDEX t_index ON t1
--source include/gtid_prepare_and_execute_stmt.inc
# Check-9: RENAME TABLE
--let $statement= RENAME TABLE t1 TO t2
--source include/gtid_prepare_and_execute_stmt.inc
# Check-10: DROP TABLE
--let $statement= DROP TABLE t2
--source include/gtid_prepare_and_execute_stmt.inc
# Check-11: CREATE TEMPORARY TABLE
--let $statement= CREATE TEMPORARY TABLE t1(i INT)
--source include/gtid_prepare_and_execute_stmt.inc
# Check-12: DROP TEMPORARY TABLE
--let $statement= DROP TEMPORARY TABLE t1
--source include/gtid_prepare_and_execute_stmt.inc
# Check-13: CREATE VIEW
--let $statement= CREATE VIEW v1 as SELECT 1
--source include/gtid_prepare_and_execute_stmt.inc
# Check-14: DROP VIEW
--let $statement= DROP VIEW v1
--source include/gtid_prepare_and_execute_stmt.inc
# Check-15: CREATE USER
--let $statement= CREATE USER user1
--source include/gtid_prepare_and_execute_stmt.inc
# Check-16: ALTER USER
--let $statement= ALTER USER user1 IDENTIFIED BY \'passwd\'
--source include/gtid_prepare_and_execute_stmt.inc
# Check-17: GRANT
--let $statement= GRANT ALL ON *.* TO user1
--source include/gtid_prepare_and_execute_stmt.inc
# Check-18: REVOKE
--let $statement= REVOKE ALL PRIVILEGES ON *.* FROM user1
--source include/gtid_prepare_and_execute_stmt.inc
# Check-19: DROP USER
--let $statement= DROP USER user1
--source include/gtid_prepare_and_execute_stmt.inc
# Check-20: CREATE DATABASE
--let $statement= CREATE DATABASE db1
--source include/gtid_prepare_and_execute_stmt.inc
# Check-21: DROP DATABASE
--let $statement= DROP DATABASE db1
--source include/gtid_prepare_and_execute_stmt.inc
# Cleanup
--source include/gtid_utils_end.inc
|