config root man

Current Path : /home/usr.opt/mysql57/mysql-test/t/

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/t/no_binlog_gtid_mode_on.test

###############################################################################
# BUG#20748570 BOOL HA_TRX_INFO::IS_TRX_READ_WRITE() CONST: ASSERTION
# `IS_STARTED()' FAILED.
# Problem: Server is hitting the above mentioned assert when
# commiting statements under GTID_MODE is ON + binlog disabled + autocommit
# enabled combination.
#
# Bug#20954452  GTID IS NOT RELEASED PROPERLY WHEN PS_PROTOCOL + GTID + BINLOG OFF COMBINATION
#
# When a statement was executed using the PS protocol, i.e., using
# COM_STMT_PREPARE + COM_STMT_EXECUTE rather than COM_QUERY, then
# it would not release GTID ownership. The reason was that
# update_gtids_impl was not called for COM_STMT_EXECUTE. After
# fixing the bug it is called. This affected most DML and DDL,
# although before this the mysqltest client tool would only use the
# PS protocol for DML and CREATE TABLE. Since the server supports it,
# this patch updates mysqltest to use the PS protocol for most DDL.
#
# Steps to reproduce:
#   i) SET SESSION GTID_NEXT='UUID:GNO'
#  ii) Execute a statement
# iii) See that an entry is added in 'gtid_executed' table.
#  iv) Execute above three steps for all different types of statements
###############################################################################

# Test is not required to run against embedded server
--source include/not_embedded.inc
# Should be tested against "binlog disabled" server
--source include/not_log_bin.inc

# Clean gtid_executed so that test can execute after other tests
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
--connection default
--replace_result $master_uuid MASTER_UUID
--eval SET SESSION GTID_NEXT='$master_uuid:1'
CREATE TABLE t1( i INT) engine=INNODB;

--connection connection_for_table_check
--source include/gtid_step_assert.inc
--replace_result $master_uuid MASTER_UUID
SELECT GTID_EXECUTED_FROM_TABLE();

# Check-2: INSERT
--connection default
--replace_result $master_uuid MASTER_UUID
--eval SET SESSION GTID_NEXT='$master_uuid:2'
INSERT INTO t1 VALUES (12);

--connection connection_for_table_check
--source include/gtid_step_assert.inc
--replace_result $master_uuid MASTER_UUID
SELECT GTID_EXECUTED_FROM_TABLE();

# Check-3: INSERT SELECT
--connection default
--replace_result $master_uuid MASTER_UUID
--eval SET SESSION GTID_NEXT='$master_uuid:3'
INSERT INTO t1 SELECT * FROM t1;

--connection connection_for_table_check
--source include/gtid_step_assert.inc
--replace_result $master_uuid MASTER_UUID
SELECT GTID_EXECUTED_FROM_TABLE();

# Check-4: UPDATE
--connection default
--replace_result $master_uuid MASTER_UUID
--eval SET SESSION GTID_NEXT='$master_uuid:4'
UPDATE t1 SET i=13 WHERE i=12;

--connection connection_for_table_check
--source include/gtid_step_assert.inc
--replace_result $master_uuid MASTER_UUID
SELECT GTID_EXECUTED_FROM_TABLE();

# Check-5: DELETE
--connection default
--replace_result $master_uuid MASTER_UUID
--eval SET SESSION GTID_NEXT='$master_uuid:5'
DELETE FROM t1;

--connection connection_for_table_check
--source include/gtid_step_assert.inc
--replace_result $master_uuid MASTER_UUID
SELECT GTID_EXECUTED_FROM_TABLE();

# Check-6: ALTER
--connection default
--replace_result $master_uuid MASTER_UUID
--eval SET SESSION GTID_NEXT='$master_uuid:6'
ALTER TABLE t1 ADD COLUMN other_column INT;

--connection connection_for_table_check
--source include/gtid_step_assert.inc
--replace_result $master_uuid MASTER_UUID
SELECT GTID_EXECUTED_FROM_TABLE();

# Check-7: CREATE INDEX
--connection default
--replace_result $master_uuid MASTER_UUID
--eval SET SESSION GTID_NEXT='$master_uuid:7'
CREATE INDEX t_index ON t1(i);

--connection connection_for_table_check
--source include/gtid_step_assert.inc
--replace_result $master_uuid MASTER_UUID
SELECT GTID_EXECUTED_FROM_TABLE();

# Check-8: DROP INDEX
--connection default
--replace_result $master_uuid MASTER_UUID
--eval SET SESSION GTID_NEXT='$master_uuid:8'
DROP INDEX t_index ON t1;

--connection connection_for_table_check
--source include/gtid_step_assert.inc
--replace_result $master_uuid MASTER_UUID
SELECT GTID_EXECUTED_FROM_TABLE();

# Check-9: RENAME TABLE
--connection default
--replace_result $master_uuid MASTER_UUID
--eval SET SESSION GTID_NEXT='$master_uuid:9'
RENAME TABLE t1 TO t2;

--connection connection_for_table_check
--source include/gtid_step_assert.inc
--replace_result $master_uuid MASTER_UUID
SELECT GTID_EXECUTED_FROM_TABLE();

# Check-10: DROP TABLE
--connection default
--replace_result $master_uuid MASTER_UUID
--eval SET SESSION GTID_NEXT='$master_uuid:10'
DROP TABLE t2;

--connection connection_for_table_check
--source include/gtid_step_assert.inc
--replace_result $master_uuid MASTER_UUID
SELECT GTID_EXECUTED_FROM_TABLE();

# Check-11: CREATE TEMPORARY TABLE
--connection default
--replace_result $master_uuid MASTER_UUID
--eval SET SESSION GTID_NEXT='$master_uuid:11'
CREATE TEMPORARY TABLE t1(i INT);

--connection connection_for_table_check
--source include/gtid_step_assert.inc
--replace_result $master_uuid MASTER_UUID
SELECT GTID_EXECUTED_FROM_TABLE();

# Check-12: DROP TEMPORARY TABLE
--connection default
--replace_result $master_uuid MASTER_UUID
--eval SET SESSION GTID_NEXT='$master_uuid:12'
DROP TEMPORARY TABLE t1;

--connection connection_for_table_check
--source include/gtid_step_assert.inc
--replace_result $master_uuid MASTER_UUID
SELECT GTID_EXECUTED_FROM_TABLE();

# Check-13: CREATE VIEW
--connection default
--replace_result $master_uuid MASTER_UUID
--eval SET SESSION GTID_NEXT='$master_uuid:13'
CREATE VIEW v1 as SELECT 1;

--connection connection_for_table_check
--source include/gtid_step_assert.inc
--replace_result $master_uuid MASTER_UUID
SELECT GTID_EXECUTED_FROM_TABLE();

# Check-14: DROP VIEW
--connection default
--replace_result $master_uuid MASTER_UUID
--eval SET SESSION GTID_NEXT='$master_uuid:14'
DROP VIEW v1;

--connection connection_for_table_check
--source include/gtid_step_assert.inc
--replace_result $master_uuid MASTER_UUID
SELECT GTID_EXECUTED_FROM_TABLE();

# Check-15: CREATE USER
--connection default
--replace_result $master_uuid MASTER_UUID
--eval SET SESSION GTID_NEXT='$master_uuid:15'
CREATE USER user1;

--connection connection_for_table_check
--source include/gtid_step_assert.inc
--replace_result $master_uuid MASTER_UUID
SELECT GTID_EXECUTED_FROM_TABLE();

# Check-16: ALTER USER
--connection default
--replace_result $master_uuid MASTER_UUID
--eval SET SESSION GTID_NEXT='$master_uuid:16'
ALTER USER user1 IDENTIFIED BY 'passwd';

--connection connection_for_table_check
--source include/gtid_step_assert.inc
--replace_result $master_uuid MASTER_UUID
SELECT GTID_EXECUTED_FROM_TABLE();

# Check-17: GRANT
--connection default
--replace_result $master_uuid MASTER_UUID
--eval SET SESSION GTID_NEXT='$master_uuid:17'
GRANT ALL ON *.* TO user1;

--connection connection_for_table_check
--source include/gtid_step_assert.inc
--replace_result $master_uuid MASTER_UUID
SELECT GTID_EXECUTED_FROM_TABLE();

# Check-18: REVOKE
--connection default
--replace_result $master_uuid MASTER_UUID
--eval SET SESSION GTID_NEXT='$master_uuid:18'
REVOKE ALL PRIVILEGES ON *.* FROM user1;

--connection connection_for_table_check
--source include/gtid_step_assert.inc
--replace_result $master_uuid MASTER_UUID
SELECT GTID_EXECUTED_FROM_TABLE();

# Check-19: DROP USER
--connection default
--replace_result $master_uuid MASTER_UUID
--eval SET SESSION GTID_NEXT='$master_uuid:19'
DROP USER user1;

--connection connection_for_table_check
--source include/gtid_step_assert.inc
--replace_result $master_uuid MASTER_UUID
SELECT GTID_EXECUTED_FROM_TABLE();

# Check-20: CREATE DATABASE
--connection default
--replace_result $master_uuid MASTER_UUID
--eval SET SESSION GTID_NEXT='$master_uuid:20'
CREATE DATABASE db1;

--connection connection_for_table_check
--source include/gtid_step_assert.inc
--replace_result $master_uuid MASTER_UUID
SELECT GTID_EXECUTED_FROM_TABLE();

# Check-21: ALTER DATABASE
--connection default
--replace_result $master_uuid MASTER_UUID
--eval SET SESSION GTID_NEXT='$master_uuid:21'
ALTER DATABASE db1 DEFAULT CHARACTER SET utf8;

--connection connection_for_table_check
--source include/gtid_step_assert.inc
--replace_result $master_uuid MASTER_UUID
SELECT GTID_EXECUTED_FROM_TABLE();

# Check-22: DROP DATABASE
--connection default
--replace_result $master_uuid MASTER_UUID
--eval SET SESSION GTID_NEXT='$master_uuid:22'
DROP DATABASE db1;

--connection connection_for_table_check
--source include/gtid_step_assert.inc
--replace_result $master_uuid MASTER_UUID
SELECT GTID_EXECUTED_FROM_TABLE();


--echo #
--echo # Bug #21459999  "ASSERTION FAILURE WHEN PREVIOUSLY UNUSED TIME
--echo #                 ZONE IS USED WITH GTID + NO BINLOG"
CREATE TABLE t1(dt DATETIME) engine=INNODB;
--replace_result $master_uuid MASTER_UUID
--eval SET SESSION GTID_NEXT='$master_uuid:23'
--echo # Below statement caused assertion failure.
INSERT INTO t1 VALUES (CONVERT_TZ('2015-07-01 01:00:00', 'UTC', 'No-such-time-zone'));
SET SESSION GTID_NEXT='AUTOMATIC';
DROP TABLE t1;


# Cleanup
--source include/gtid_utils_end.inc

Man Man