Commit 7935311f authored by unknown's avatar unknown

Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0

into dl145b.mysql.com:/home/ndbdev/tomas/mysql-5.1


BitKeeper/etc/logging_ok:
  auto-union
sql/ha_innodb.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
storage/myisam/mi_key.c:
  Auto merged
parents 16fd4ff6 1a0bddb8
......@@ -16,6 +16,11 @@
# This file is public domain and comes with NO WARRANTY of any kind
if HAVE_YASSL
yassl_dummy_link_fix= $(top_srcdir)/extra/yassl/src/dummy.cpp
else
yassl_dummy_link_fix=
endif
#AUTOMAKE_OPTIONS = nostdinc
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/regex \
$(openssl_includes) -I$(top_builddir)/include
......@@ -30,12 +35,17 @@ noinst_HEADERS = sql_string.h completion_hash.h my_readline.h \
mysql_SOURCES = mysql.cc readline.cc sql_string.cc completion_hash.cc
mysqladmin_SOURCES = mysqladmin.cc
mysql_LDADD = @readline_link@ @TERMCAP_LIB@ $(LDADD) $(CXXLDFLAGS)
mysqltest_SOURCES= mysqltest.c $(top_srcdir)/mysys/my_getsystime.c
mysqltest_SOURCES= mysqltest.c $(top_srcdir)/mysys/my_getsystime.c \
$(yassl_dummy_link_fix)
mysqltest_LDADD = $(top_builddir)/regex/libregex.a $(LDADD)
mysqlbinlog_SOURCES = mysqlbinlog.cc $(top_srcdir)/mysys/mf_tempdir.c $(top_srcdir)/mysys/my_new.cc
mysqlbinlog_LDADD = $(LDADD) $(CXXLDFLAGS)
mysqltestmanagerc_SOURCES = mysqlmanagerc.c
mysqltestmanager_pwgen_SOURCES = mysqlmanager-pwgen.c
mysqltestmanagerc_SOURCES= mysqlmanagerc.c $(yassl_dummy_link_fix)
mysqlcheck_SOURCES= mysqlcheck.c $(yassl_dummy_link_fix)
mysqlshow_SOURCES= mysqlshow.c $(yassl_dummy_link_fix)
mysqldump_SOURCES= mysqldump.c $(yassl_dummy_link_fix)
mysqlimport_SOURCES= mysqlimport.c $(yassl_dummy_link_fix)
sql_src=log_event.h mysql_priv.h log_event.cc my_decimal.h my_decimal.cc
strings_src=decimal.c
......
......@@ -30,4 +30,5 @@ AC_DEFUN([MYSQL_CHECK_YASSL], [
AC_SUBST(openssl_libs)
AC_SUBST(openssl_includes)
AC_SUBST(yassl_dir)
AM_CONDITIONAL([HAVE_YASSL], [ test "$yassl" = "yes" ])
])
# include/rpl_stmt_seq.inc
#
# Please be very careful when editing this routine, because the handling of
# the $variables is extreme sensitive.
#
######## The typical test sequence
# 1. INSERT without commit
# check table content of master and slave
# 2. EXECUTE the statement
# check table content of master and slave
# 3. ROLLBACK
# check table content of master and slave
# 4. flush the logs
let $VERSION=`select version()`;
--disable_query_log
# SELECT '######## new test sequence ########' as "";
eval SELECT CONCAT('######## ','$my_stmt',' ########') as "";
--enable_query_log
###############################################################
# Predict the number of the current log
###############################################################
# Disable the logging of the log number computation.
--disable_query_log
# $_log_num_n should contain the number of the current binlog in numeric style.
# If this routine is called for the first time, $_log_num will not initialized
# and contain the value '' instead of '1'. So we will correct it here.
#
eval set @aux= IF('$_log_num_n' = '', '1', '$_log_num_n');
let $_log_num_n= `SELECT @aux`;
eval set @aux= LPAD('$_log_num_n',6,'0');
# SELECT @aux AS "@aux is";
#
# $_log_num_s should contain the number of the current binlog in string style.
let $_log_num_s= `select @aux`;
# eval SELECT '$log_num' ;
--enable_query_log
###############################################################
# INSERT
###############################################################
connection master;
--disable_query_log
SELECT '-------- switch to master -------' as "";
--enable_query_log
# Maybe it would be smarter to use a table with autoincrement column.
let $MAX= `SELECT MAX(f1) FROM t1` ;
eval INSERT INTO t1 SET f1= $MAX + 1;
# results before DDL(to be tested)
SELECT MAX(f1) FROM t1;
--replace_result $VERSION VERSION
--replace_column 2 # 5 #
eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s';
sync_slave_with_master;
connection slave;
--disable_query_log
SELECT '-------- switch to slave --------' as "";
--enable_query_log
# results before DDL(to be tested)
SELECT MAX(f1) FROM t1;
--replace_result $VERSION VERSION
--replace_column 2 # 5 #
eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s';
###############################################################
# command to be tested
###############################################################
connection master;
--disable_query_log
SELECT '-------- switch to master -------' as "";
--enable_query_log
eval $my_stmt;
# Devaluate $my_stmt, to detect script bugs
let $my_stmt= ERROR: YOU FORGOT TO FILL IN THE STATEMENT;
# results after DDL(to be tested)
SELECT MAX(f1) FROM t1;
--replace_result $VERSION VERSION
--replace_column 2 # 5 #
eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s';
sync_slave_with_master;
connection slave;
--disable_query_log
SELECT '-------- switch to slave --------' as "";
--enable_query_log
# results after DDL(to be tested)
SELECT MAX(f1) FROM t1;
--replace_result $VERSION VERSION
--replace_column 2 # 5 #
eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s';
###############################################################
# ROLLBACK
###############################################################
connection master;
--disable_query_log
SELECT '-------- switch to master -------' as "";
--enable_query_log
ROLLBACK;
# results after final ROLLBACK
SELECT MAX(f1) FROM t1;
# Try to detect if the DDL command caused that the INSERT is committed
# $MAX holds the highest/last value just before the insert of MAX + 1
--disable_query_log
eval SELECT CONCAT(CONCAT('TEST-INFO: MASTER: The INSERT is ',
IF(MAX(f1) = $MAX + 1, 'committed', 'not committed')),
IF((MAX(f1) = $MAX + 1) XOR NOT $my_master_commit,
' (Succeeded)',
' (Failed)')) AS ""
FROM mysqltest1.t1;
--enable_query_log
--replace_result $VERSION VERSION
--replace_column 2 # 5 #
eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s';
sync_slave_with_master;
connection slave;
--disable_query_log
SELECT '-------- switch to slave --------' as "";
--enable_query_log
# results after final ROLLBACK
SELECT MAX(f1) FROM t1;
--disable_query_log
eval SELECT CONCAT(CONCAT('TEST-INFO: SLAVE: The INSERT is ',
IF(MAX(f1) = $MAX + 1, 'committed', 'not committed')),
IF((MAX(f1) = $MAX + 1) XOR NOT $my_slave_commit,
' (Succeeded)',
' (Failed)')) AS ""
FROM mysqltest1.t1;
--enable_query_log
--replace_result $VERSION VERSION
--replace_column 2 # 5 #
eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s';
###############################################################
# Manipulate binlog
###############################################################
#let $manipulate= 0;
let $manipulate= 1;
while ($manipulate)
{
#### Manipulate the binary logs,
# so that the output of SHOW BINLOG EVENTS IN <current log>
# contains only commands of the current test sequence.
# - flush the master and the slave log
# ---> both start to write into new logs with incremented number
# - increment $_log_num_n
connection master;
--disable_query_log
SELECT '-------- switch to master -------' as "";
--enable_query_log
flush logs;
# sleep 1;
# eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s';
sync_slave_with_master;
connection slave;
--disable_query_log
SELECT '-------- switch to slave --------' as "";
--enable_query_log
# the final content of the binary log
flush logs;
# The next sleep is urgent needed.
# Without this sleep the slaves crashes often, when the SHOW BINLOG
# is executed. :-(
# sleep 1;
# eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s';
inc $_log_num_n;
let $manipulate= 0;
}
connection master;
--disable_query_log
SELECT '-------- switch to master -------' as "";
--enable_query_log
......@@ -905,3 +905,37 @@ select * from t1 where city = 'Durban ';
id city
2 Durban
drop table t1;
SET NAMES UTF8;
CREATE TABLE t1 (
`id` int(20) NOT NULL auto_increment,
`country` varchar(100) NOT NULL default '',
`shortcode` varchar(100) NOT NULL default '',
`operator` varchar(100) NOT NULL default '',
`momid` varchar(30) NOT NULL default '',
`keyword` varchar(160) NOT NULL default '',
`content` varchar(160) NOT NULL default '',
`second_token` varchar(160) default NULL,
`gateway_id` int(11) NOT NULL default '0',
`created` datetime NOT NULL default '0000-00-00 00:00:00',
`msisdn` varchar(15) NOT NULL default '',
PRIMARY KEY (`id`),
UNIQUE KEY `MSCCSPK_20030521130957121` (`momid`),
KEY `IX_mobile_originated_message_keyword` (`keyword`),
KEY `IX_mobile_originated_message_created` (`created`),
KEY `IX_mobile_originated_message_support` (`msisdn`,`momid`,`keyword`,`gateway_id`,`created`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO t1 VALUES
(1,'blah','464','aaa','fkc1c9ilc20x0hgae7lx6j09','ERR','ERR Имри.Афимим.Аеимимримдмримрмрирор имримримримр имридм ирбднримрфмририримрфмфмим.Ад.Д имдимримрад.Адимримримрмдиримримримр м.Дадимфшьмримд им.Адимимрн имадми','ИМРИ.АФИМИМ.АЕИМИМРИМДМРИМРМРИРОР',3,'2005-06-01 17:30:43','1234567890'),
(2,'blah','464','aaa','haxpl2ilc20x00bj4tt2m5ti','11','11 g','G',3,'2005-06-02 22:43:10','1234567890');
CREATE TABLE t2 (
`msisdn` varchar(15) NOT NULL default '',
`operator_id` int(11) NOT NULL default '0',
`created` datetime NOT NULL default '0000-00-00 00:00:00',
UNIQUE KEY `PK_user` (`msisdn`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO t2 VALUES ('1234567890',2,'2005-05-24 13:53:25');
SELECT content, t2.msisdn FROM t1, t2 WHERE t1.msisdn = '1234567890';
content msisdn
ERR Имри.Афимим.Аеимимримдмримрмрирор имримримримр имридм ирбднримрфмририримрфмфмим.Ад.Д имдимримрад.Адимримримрмдиримримримр м.Дадимфшьмримд им.Адимимрн имадми 1234567890
11 g 1234567890
DROP TABLE t1,t2;
......@@ -909,7 +909,6 @@ set autocommit=0;
create table t1 (a int not null) engine= innodb;
insert into t1 values(1),(2);
truncate table t1;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
commit;
truncate table t1;
truncate table t1;
......@@ -1638,14 +1637,14 @@ t2 CREATE TABLE `t2` (
drop table t2, t1;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use 153
Binlog_cache_use 155
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 0
create table t1 (a int) engine=innodb;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use 154
Binlog_cache_use 156
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 1
......@@ -1654,7 +1653,7 @@ delete from t1;
commit;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use 155
Binlog_cache_use 157
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 1
......
......@@ -24,7 +24,7 @@ a
3
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 0
Qcache_queries_in_cache 1
drop table t1;
commit;
create table t1 (a int not null) engine=innodb;
......
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
SET AUTOCOMMIT = 1;
DROP DATABASE IF EXISTS mysqltest1;
DROP DATABASE IF EXISTS mysqltest2;
DROP DATABASE IF EXISTS mysqltest3;
CREATE DATABASE mysqltest1;
CREATE DATABASE mysqltest2;
CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE= "InnoDB";
INSERT INTO mysqltest1.t1 SET f1= 0;
CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE= "InnoDB";
CREATE INDEX my_idx6 ON mysqltest1.t6(f1);
CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE= "InnoDB";
INSERT INTO mysqltest1.t7 SET f1= 0;
CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT);
SET AUTOCOMMIT = 0;
use mysqltest1;
-------- switch to slave --------
SET AUTOCOMMIT = 0;
use mysqltest1;
-------- switch to master -------
######## COMMIT ########
-------- switch to master -------
INSERT INTO t1 SET f1= 0 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
1
SHOW BINLOG EVENTS IN 'master-bin.000001';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest1
master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest2
master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest3
master-bin.000001 # Query 1 # CREATE DATABASE mysqltest1
master-bin.000001 # Query 1 # CREATE DATABASE mysqltest2
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t1 SET f1= 0
master-bin.000001 # Xid 1 # COMMIT /* xid=17 */
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE INDEX my_idx6 ON mysqltest1.t6(f1)
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t7 SET f1= 0
master-bin.000001 # Xid 1 # COMMIT /* xid=25 */
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT)
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
0
SHOW BINLOG EVENTS IN 'slave-bin.000001';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000001 # Query 2 # use `test`; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9
slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest1
slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest2
slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest3
slave-bin.000001 # Query 1 # CREATE DATABASE mysqltest1
slave-bin.000001 # Query 1 # CREATE DATABASE mysqltest2
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t1 SET f1= 0
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE INDEX my_idx6 ON mysqltest1.t6(f1)
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t7 SET f1= 0
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT)
-------- switch to master -------
COMMIT;
SELECT MAX(f1) FROM t1;
MAX(f1)
1
SHOW BINLOG EVENTS IN 'master-bin.000001';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest1
master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest2
master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest3
master-bin.000001 # Query 1 # CREATE DATABASE mysqltest1
master-bin.000001 # Query 1 # CREATE DATABASE mysqltest2
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t1 SET f1= 0
master-bin.000001 # Xid 1 # COMMIT /* xid=17 */
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE INDEX my_idx6 ON mysqltest1.t6(f1)
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t7 SET f1= 0
master-bin.000001 # Xid 1 # COMMIT /* xid=25 */
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT)
master-bin.000001 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000001 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 0 + 1
master-bin.000001 # Xid 1 # COMMIT /* xid=50 */
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
1
SHOW BINLOG EVENTS IN 'slave-bin.000001';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000001 # Query 2 # use `test`; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9
slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest1
slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest2
slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest3
slave-bin.000001 # Query 1 # CREATE DATABASE mysqltest1
slave-bin.000001 # Query 1 # CREATE DATABASE mysqltest2
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t1 SET f1= 0
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE INDEX my_idx6 ON mysqltest1.t6(f1)
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t7 SET f1= 0
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT)
slave-bin.000001 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 0 + 1
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
1
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000001';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest1
master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest2
master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest3
master-bin.000001 # Query 1 # CREATE DATABASE mysqltest1
master-bin.000001 # Query 1 # CREATE DATABASE mysqltest2
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t1 SET f1= 0
master-bin.000001 # Xid 1 # COMMIT /* xid=17 */
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE INDEX my_idx6 ON mysqltest1.t6(f1)
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t7 SET f1= 0
master-bin.000001 # Xid 1 # COMMIT /* xid=25 */
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT)
master-bin.000001 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000001 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 0 + 1
master-bin.000001 # Xid 1 # COMMIT /* xid=50 */
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
1
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000001';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000001 # Query 2 # use `test`; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9
slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest1
slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest2
slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest3
slave-bin.000001 # Query 1 # CREATE DATABASE mysqltest1
slave-bin.000001 # Query 1 # CREATE DATABASE mysqltest2
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t1 SET f1= 0
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE INDEX my_idx6 ON mysqltest1.t6(f1)
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t7 SET f1= 0
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT)
slave-bin.000001 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 0 + 1
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
######## ROLLBACK ########
-------- switch to master -------
INSERT INTO t1 SET f1= 1 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
2
SHOW BINLOG EVENTS IN 'master-bin.000002';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
1
SHOW BINLOG EVENTS IN 'slave-bin.000002';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
1
SHOW BINLOG EVENTS IN 'master-bin.000002';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
1
SHOW BINLOG EVENTS IN 'slave-bin.000002';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
1
TEST-INFO: MASTER: The INSERT is not committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000002';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
1
TEST-INFO: SLAVE: The INSERT is not committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000002';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
######## SET AUTOCOMMIT=1 ########
-------- switch to master -------
INSERT INTO t1 SET f1= 1 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
2
SHOW BINLOG EVENTS IN 'master-bin.000003';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000003 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
1
SHOW BINLOG EVENTS IN 'slave-bin.000003';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000003 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-------- switch to master -------
SET AUTOCOMMIT=1;
SELECT MAX(f1) FROM t1;
MAX(f1)
2
SHOW BINLOG EVENTS IN 'master-bin.000003';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000003 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000003 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 1 + 1
master-bin.000003 # Xid 1 # COMMIT /* xid=89 */
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
2
SHOW BINLOG EVENTS IN 'slave-bin.000003';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000003 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000003 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 1 + 1
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
2
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000003';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000003 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000003 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 1 + 1
master-bin.000003 # Xid 1 # COMMIT /* xid=89 */
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
2
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000003';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000003 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000003 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 1 + 1
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
SET AUTOCOMMIT=0;
######## START TRANSACTION ########
-------- switch to master -------
INSERT INTO t1 SET f1= 2 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
3
SHOW BINLOG EVENTS IN 'master-bin.000004';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000004 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
2
SHOW BINLOG EVENTS IN 'slave-bin.000004';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000004 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-------- switch to master -------
START TRANSACTION;
SELECT MAX(f1) FROM t1;
MAX(f1)
3
SHOW BINLOG EVENTS IN 'master-bin.000004';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000004 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000004 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000004 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 2 + 1
master-bin.000004 # Xid 1 # COMMIT /* xid=132 */
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
3
SHOW BINLOG EVENTS IN 'slave-bin.000004';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000004 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000004 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 2 + 1
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
3
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000004';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000004 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000004 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000004 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 2 + 1
master-bin.000004 # Xid 1 # COMMIT /* xid=132 */
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
3
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000004';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000004 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000004 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 2 + 1
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
######## BEGIN ########
-------- switch to master -------
INSERT INTO t1 SET f1= 3 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
4
SHOW BINLOG EVENTS IN 'master-bin.000005';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000005 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
3
SHOW BINLOG EVENTS IN 'slave-bin.000005';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000005 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-------- switch to master -------
BEGIN;
SELECT MAX(f1) FROM t1;
MAX(f1)
4
SHOW BINLOG EVENTS IN 'master-bin.000005';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000005 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000005 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000005 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 3 + 1
master-bin.000005 # Xid 1 # COMMIT /* xid=144 */
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
4
SHOW BINLOG EVENTS IN 'slave-bin.000005';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000005 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000005 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 3 + 1
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
4
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000005';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000005 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000005 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000005 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 3 + 1
master-bin.000005 # Xid 1 # COMMIT /* xid=144 */
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
4
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000005';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000005 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000005 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 3 + 1
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
######## DROP TABLE mysqltest1.t2 ########
-------- switch to master -------
INSERT INTO t1 SET f1= 4 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
5
SHOW BINLOG EVENTS IN 'master-bin.000006';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000006 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
4
SHOW BINLOG EVENTS IN 'slave-bin.000006';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000006 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-------- switch to master -------
DROP TABLE mysqltest1.t2;
SELECT MAX(f1) FROM t1;
MAX(f1)
5
SHOW BINLOG EVENTS IN 'master-bin.000006';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000006 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000006 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000006 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 4 + 1
master-bin.000006 # Xid 1 # COMMIT /* xid=171 */
master-bin.000006 # Query 1 # use `mysqltest1`; DROP TABLE mysqltest1.t2
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
5
SHOW BINLOG EVENTS IN 'slave-bin.000006';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000006 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000006 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 4 + 1
slave-bin.000006 # Query 1 # use `mysqltest1`; DROP TABLE mysqltest1.t2
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
5
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000006';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000006 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000006 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000006 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 4 + 1
master-bin.000006 # Xid 1 # COMMIT /* xid=171 */
master-bin.000006 # Query 1 # use `mysqltest1`; DROP TABLE mysqltest1.t2
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
5
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000006';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000006 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000006 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 4 + 1
slave-bin.000006 # Query 1 # use `mysqltest1`; DROP TABLE mysqltest1.t2
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
SHOW TABLES LIKE 't2';
Tables_in_mysqltest1 (t2)
-------- switch to slave --------
SHOW TABLES LIKE 't2';
Tables_in_mysqltest1 (t2)
-------- switch to master -------
######## DROP TEMPORARY TABLE mysqltest1.t23 ########
-------- switch to master -------
INSERT INTO t1 SET f1= 5 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
6
SHOW BINLOG EVENTS IN 'master-bin.000007';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000007 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
5
SHOW BINLOG EVENTS IN 'slave-bin.000007';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000007 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-------- switch to master -------
DROP TEMPORARY TABLE mysqltest1.t23;
SELECT MAX(f1) FROM t1;
MAX(f1)
6
SHOW BINLOG EVENTS IN 'master-bin.000007';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000007 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
5
SHOW BINLOG EVENTS IN 'slave-bin.000007';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000007 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-------- switch to master -------
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
SELECT MAX(f1) FROM t1;
MAX(f1)
5
TEST-INFO: MASTER: The INSERT is not committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000007';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000007 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000007 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000007 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 5 + 1
master-bin.000007 # Query 1 # use `mysqltest1`; DROP TEMPORARY TABLE mysqltest1.t23
master-bin.000007 # Query 1 # use `mysqltest1`; ROLLBACK
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
6
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000007';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000007 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000007 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 5 + 1
slave-bin.000007 # Query 1 # use `mysqltest1`; DROP TEMPORARY TABLE mysqltest1.t23
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
SHOW TABLES LIKE 't23';
Tables_in_mysqltest1 (t23)
-------- switch to slave --------
SHOW TABLES LIKE 't23';
Tables_in_mysqltest1 (t23)
-------- switch to master -------
######## RENAME TABLE mysqltest1.t3 to mysqltest1.t20 ########
-------- switch to master -------
INSERT INTO t1 SET f1= 5 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
6
SHOW BINLOG EVENTS IN 'master-bin.000008';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000008 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
6
SHOW BINLOG EVENTS IN 'slave-bin.000008';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000008 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-------- switch to master -------
RENAME TABLE mysqltest1.t3 to mysqltest1.t20;
SELECT MAX(f1) FROM t1;
MAX(f1)
6
SHOW BINLOG EVENTS IN 'master-bin.000008';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000008 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000008 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000008 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 5 + 1
master-bin.000008 # Xid 1 # COMMIT /* xid=228 */
master-bin.000008 # Query 1 # use `mysqltest1`; RENAME TABLE mysqltest1.t3 to mysqltest1.t20
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
6
SHOW BINLOG EVENTS IN 'slave-bin.000008';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000008 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000008 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 5 + 1
slave-bin.000008 # Query 1 # use `mysqltest1`; RENAME TABLE mysqltest1.t3 to mysqltest1.t20
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
6
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000008';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000008 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000008 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000008 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 5 + 1
master-bin.000008 # Xid 1 # COMMIT /* xid=228 */
master-bin.000008 # Query 1 # use `mysqltest1`; RENAME TABLE mysqltest1.t3 to mysqltest1.t20
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
6
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000008';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000008 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000008 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 5 + 1
slave-bin.000008 # Query 1 # use `mysqltest1`; RENAME TABLE mysqltest1.t3 to mysqltest1.t20
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
SHOW TABLES LIKE 't20';
Tables_in_mysqltest1 (t20)
t20
-------- switch to slave --------
SHOW TABLES LIKE 't20';
Tables_in_mysqltest1 (t20)
t20
-------- switch to master -------
######## ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT ########
-------- switch to master -------
INSERT INTO t1 SET f1= 6 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
7
SHOW BINLOG EVENTS IN 'master-bin.000009';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000009 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
6
SHOW BINLOG EVENTS IN 'slave-bin.000009';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000009 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-------- switch to master -------
ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT;
SELECT MAX(f1) FROM t1;
MAX(f1)
7
SHOW BINLOG EVENTS IN 'master-bin.000009';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000009 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000009 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000009 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 6 + 1
master-bin.000009 # Xid 1 # COMMIT /* xid=257 */
master-bin.000009 # Query 1 # use `mysqltest1`; ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
7
SHOW BINLOG EVENTS IN 'slave-bin.000009';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000009 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000009 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 6 + 1
slave-bin.000009 # Query 1 # use `mysqltest1`; ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
7
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000009';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000009 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000009 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000009 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 6 + 1
master-bin.000009 # Xid 1 # COMMIT /* xid=257 */
master-bin.000009 # Query 1 # use `mysqltest1`; ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
7
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000009';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000009 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000009 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 6 + 1
slave-bin.000009 # Query 1 # use `mysqltest1`; ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
describe mysqltest1.t4;
Field Type Null Key Default Extra
f1 bigint(20) YES NULL
f2 bigint(20) YES NULL
-------- switch to slave --------
describe mysqltest1.t4;
Field Type Null Key Default Extra
f1 bigint(20) YES NULL
f2 bigint(20) YES NULL
-------- switch to master -------
######## CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= "InnoDB" ########
-------- switch to master -------
INSERT INTO t1 SET f1= 7 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
8
SHOW BINLOG EVENTS IN 'master-bin.000010';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000010 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
7
SHOW BINLOG EVENTS IN 'slave-bin.000010';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000010 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-------- switch to master -------
CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= "InnoDB";
SELECT MAX(f1) FROM t1;
MAX(f1)
8
SHOW BINLOG EVENTS IN 'master-bin.000010';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000010 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000010 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000010 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 7 + 1
master-bin.000010 # Xid 1 # COMMIT /* xid=286 */
master-bin.000010 # Query 1 # use `mysqltest1`; CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= "InnoDB"
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
8
SHOW BINLOG EVENTS IN 'slave-bin.000010';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000010 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000010 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 7 + 1
slave-bin.000010 # Query 1 # use `mysqltest1`; CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= "InnoDB"
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
8
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000010';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000010 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000010 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000010 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 7 + 1
master-bin.000010 # Xid 1 # COMMIT /* xid=286 */
master-bin.000010 # Query 1 # use `mysqltest1`; CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= "InnoDB"
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
8
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000010';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000010 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000010 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 7 + 1
slave-bin.000010 # Query 1 # use `mysqltest1`; CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= "InnoDB"
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
######## CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT) ########
-------- switch to master -------
INSERT INTO t1 SET f1= 8 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
9
SHOW BINLOG EVENTS IN 'master-bin.000011';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000011 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
8
SHOW BINLOG EVENTS IN 'slave-bin.000011';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000011 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-------- switch to master -------
CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT);
SELECT MAX(f1) FROM t1;
MAX(f1)
9
SHOW BINLOG EVENTS IN 'master-bin.000011';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000011 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
8
SHOW BINLOG EVENTS IN 'slave-bin.000011';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000011 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-------- switch to master -------
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
SELECT MAX(f1) FROM t1;
MAX(f1)
8
TEST-INFO: MASTER: The INSERT is not committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000011';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000011 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000011 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000011 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 8 + 1
master-bin.000011 # Query 1 # use `mysqltest1`; CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT)
master-bin.000011 # Query 1 # use `mysqltest1`; ROLLBACK
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
9
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000011';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000011 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000011 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 8 + 1
slave-bin.000011 # Query 1 # use `mysqltest1`; CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT)
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
######## TRUNCATE TABLE mysqltest1.t7 ########
-------- switch to master -------
INSERT INTO t1 SET f1= 8 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
9
SHOW BINLOG EVENTS IN 'master-bin.000012';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000012 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
9
SHOW BINLOG EVENTS IN 'slave-bin.000012';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000012 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-------- switch to master -------
TRUNCATE TABLE mysqltest1.t7;
SELECT MAX(f1) FROM t1;
MAX(f1)
9
SHOW BINLOG EVENTS IN 'master-bin.000012';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000012 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000012 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000012 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 8 + 1
master-bin.000012 # Xid 1 # COMMIT /* xid=343 */
master-bin.000012 # Query 1 # use `mysqltest1`; TRUNCATE TABLE mysqltest1.t7
master-bin.000012 # Xid 1 # COMMIT /* xid=364 */
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
9
SHOW BINLOG EVENTS IN 'slave-bin.000012';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000012 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000012 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 8 + 1
slave-bin.000012 # Query 1 # use `mysqltest1`; TRUNCATE TABLE mysqltest1.t7
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
9
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000012';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000012 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000012 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000012 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 8 + 1
master-bin.000012 # Xid 1 # COMMIT /* xid=343 */
master-bin.000012 # Query 1 # use `mysqltest1`; TRUNCATE TABLE mysqltest1.t7
master-bin.000012 # Xid 1 # COMMIT /* xid=364 */
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
9
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000012';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000012 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000012 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 8 + 1
slave-bin.000012 # Query 1 # use `mysqltest1`; TRUNCATE TABLE mysqltest1.t7
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
SELECT * FROM mysqltest1.t7;
f1
-------- switch to slave --------
SELECT * FROM mysqltest1.t7;
f1
-------- switch to master -------
######## LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ ########
-------- switch to master -------
INSERT INTO t1 SET f1= 9 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
10
SHOW BINLOG EVENTS IN 'master-bin.000013';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000013 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
9
SHOW BINLOG EVENTS IN 'slave-bin.000013';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000013 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-------- switch to master -------
LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ;
SELECT MAX(f1) FROM t1;
MAX(f1)
10
SHOW BINLOG EVENTS IN 'master-bin.000013';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000013 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000013 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000013 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 9 + 1
master-bin.000013 # Xid 1 # COMMIT /* xid=370 */
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
10
SHOW BINLOG EVENTS IN 'slave-bin.000013';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000013 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000013 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 9 + 1
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
10
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000013';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000013 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000013 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000013 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 9 + 1
master-bin.000013 # Xid 1 # COMMIT /* xid=370 */
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
10
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000013';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000013 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000013 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 9 + 1
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
UNLOCK TABLES;
######## UNLOCK TABLES ########
-------- switch to master -------
INSERT INTO t1 SET f1= 10 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
11
SHOW BINLOG EVENTS IN 'master-bin.000014';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000014 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
10
SHOW BINLOG EVENTS IN 'slave-bin.000014';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000014 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-------- switch to master -------
UNLOCK TABLES;
SELECT MAX(f1) FROM t1;
MAX(f1)
11
SHOW BINLOG EVENTS IN 'master-bin.000014';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000014 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
10
SHOW BINLOG EVENTS IN 'slave-bin.000014';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000014 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
10
TEST-INFO: MASTER: The INSERT is not committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000014';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000014 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
10
TEST-INFO: SLAVE: The INSERT is not committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000014';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000014 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
LOCK TABLES mysqltest1.t1 READ;
######## UNLOCK TABLES ########
-------- switch to master -------
INSERT INTO t1 SET f1= 10 + 1;
ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
SELECT MAX(f1) FROM t1;
MAX(f1)
10
SHOW BINLOG EVENTS IN 'master-bin.000015';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000015 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
10
SHOW BINLOG EVENTS IN 'slave-bin.000015';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000015 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-------- switch to master -------
UNLOCK TABLES;
SELECT MAX(f1) FROM t1;
MAX(f1)
10
SHOW BINLOG EVENTS IN 'master-bin.000015';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000015 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
10
SHOW BINLOG EVENTS IN 'slave-bin.000015';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000015 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
10
TEST-INFO: MASTER: The INSERT is not committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000015';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000015 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
10
TEST-INFO: SLAVE: The INSERT is not committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000015';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000015 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ;
######## UNLOCK TABLES ########
-------- switch to master -------
INSERT INTO t1 SET f1= 10 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
11
SHOW BINLOG EVENTS IN 'master-bin.000016';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000016 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
10
SHOW BINLOG EVENTS IN 'slave-bin.000016';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000016 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-------- switch to master -------
UNLOCK TABLES;
SELECT MAX(f1) FROM t1;
MAX(f1)
11
SHOW BINLOG EVENTS IN 'master-bin.000016';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000016 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000016 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000016 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 10 + 1
master-bin.000016 # Xid 1 # COMMIT /* xid=463 */
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
11
SHOW BINLOG EVENTS IN 'slave-bin.000016';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000016 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000016 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 10 + 1
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
11
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000016';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000016 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000016 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000016 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 10 + 1
master-bin.000016 # Xid 1 # COMMIT /* xid=463 */
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
11
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000016';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000016 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000016 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 10 + 1
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
######## DROP INDEX my_idx6 ON mysqltest1.t6 ########
-------- switch to master -------
INSERT INTO t1 SET f1= 11 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
12
SHOW BINLOG EVENTS IN 'master-bin.000017';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000017 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
11
SHOW BINLOG EVENTS IN 'slave-bin.000017';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000017 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-------- switch to master -------
DROP INDEX my_idx6 ON mysqltest1.t6;
SELECT MAX(f1) FROM t1;
MAX(f1)
12
SHOW BINLOG EVENTS IN 'master-bin.000017';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000017 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000017 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000017 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 11 + 1
master-bin.000017 # Xid 1 # COMMIT /* xid=483 */
master-bin.000017 # Query 1 # use `mysqltest1`; DROP INDEX my_idx6 ON mysqltest1.t6
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
12
SHOW BINLOG EVENTS IN 'slave-bin.000017';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000017 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000017 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 11 + 1
slave-bin.000017 # Query 1 # use `mysqltest1`; DROP INDEX my_idx6 ON mysqltest1.t6
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
12
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000017';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000017 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000017 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000017 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 11 + 1
master-bin.000017 # Xid 1 # COMMIT /* xid=483 */
master-bin.000017 # Query 1 # use `mysqltest1`; DROP INDEX my_idx6 ON mysqltest1.t6
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
12
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000017';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000017 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000017 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 11 + 1
slave-bin.000017 # Query 1 # use `mysqltest1`; DROP INDEX my_idx6 ON mysqltest1.t6
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
SHOW INDEX FROM mysqltest1.t6;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-------- switch to slave --------
SHOW INDEX FROM mysqltest1.t6;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-------- switch to master -------
######## CREATE INDEX my_idx5 ON mysqltest1.t5(f1) ########
-------- switch to master -------
INSERT INTO t1 SET f1= 12 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
13
SHOW BINLOG EVENTS IN 'master-bin.000018';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000018 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
12
SHOW BINLOG EVENTS IN 'slave-bin.000018';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000018 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-------- switch to master -------
CREATE INDEX my_idx5 ON mysqltest1.t5(f1);
SELECT MAX(f1) FROM t1;
MAX(f1)
13
SHOW BINLOG EVENTS IN 'master-bin.000018';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000018 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000018 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000018 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 12 + 1
master-bin.000018 # Xid 1 # COMMIT /* xid=510 */
master-bin.000018 # Query 1 # use `mysqltest1`; CREATE INDEX my_idx5 ON mysqltest1.t5(f1)
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
13
SHOW BINLOG EVENTS IN 'slave-bin.000018';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000018 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000018 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 12 + 1
slave-bin.000018 # Query 1 # use `mysqltest1`; CREATE INDEX my_idx5 ON mysqltest1.t5(f1)
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
13
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000018';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000018 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000018 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000018 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 12 + 1
master-bin.000018 # Xid 1 # COMMIT /* xid=510 */
master-bin.000018 # Query 1 # use `mysqltest1`; CREATE INDEX my_idx5 ON mysqltest1.t5(f1)
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
13
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000018';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000018 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000018 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 12 + 1
slave-bin.000018 # Query 1 # use `mysqltest1`; CREATE INDEX my_idx5 ON mysqltest1.t5(f1)
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
SHOW INDEX FROM mysqltest1.t5;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t5 1 my_idx5 1 f1 A 0 NULL NULL YES BTREE
-------- switch to slave --------
SHOW INDEX FROM mysqltest1.t5;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t5 1 my_idx5 1 f1 A NULL NULL NULL YES BTREE
-------- switch to master -------
######## DROP DATABASE mysqltest2 ########
-------- switch to master -------
INSERT INTO t1 SET f1= 13 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
14
SHOW BINLOG EVENTS IN 'master-bin.000019';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000019 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
13
SHOW BINLOG EVENTS IN 'slave-bin.000019';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000019 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-------- switch to master -------
DROP DATABASE mysqltest2;
SELECT MAX(f1) FROM t1;
MAX(f1)
14
SHOW BINLOG EVENTS IN 'master-bin.000019';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000019 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000019 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000019 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 13 + 1
master-bin.000019 # Xid 1 # COMMIT /* xid=539 */
master-bin.000019 # Query 1 # DROP DATABASE mysqltest2
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
14
SHOW BINLOG EVENTS IN 'slave-bin.000019';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000019 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000019 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 13 + 1
slave-bin.000019 # Query 1 # DROP DATABASE mysqltest2
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
14
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000019';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000019 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000019 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000019 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 13 + 1
master-bin.000019 # Xid 1 # COMMIT /* xid=539 */
master-bin.000019 # Query 1 # DROP DATABASE mysqltest2
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
14
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000019';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000019 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000019 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 13 + 1
slave-bin.000019 # Query 1 # DROP DATABASE mysqltest2
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
SHOW DATABASES LIKE "mysqltest2";
Database (mysqltest2)
-------- switch to slave --------
SHOW DATABASES LIKE "mysqltest2";
Database (mysqltest2)
-------- switch to master -------
######## CREATE DATABASE mysqltest3 ########
-------- switch to master -------
INSERT INTO t1 SET f1= 14 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
15
SHOW BINLOG EVENTS IN 'master-bin.000020';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000020 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
14
SHOW BINLOG EVENTS IN 'slave-bin.000020';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000020 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-------- switch to master -------
CREATE DATABASE mysqltest3;
SELECT MAX(f1) FROM t1;
MAX(f1)
15
SHOW BINLOG EVENTS IN 'master-bin.000020';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000020 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000020 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000020 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 14 + 1
master-bin.000020 # Xid 1 # COMMIT /* xid=568 */
master-bin.000020 # Query 1 # CREATE DATABASE mysqltest3
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
15
SHOW BINLOG EVENTS IN 'slave-bin.000020';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000020 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000020 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 14 + 1
slave-bin.000020 # Query 1 # CREATE DATABASE mysqltest3
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
15
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000020';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000020 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000020 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000020 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 14 + 1
master-bin.000020 # Xid 1 # COMMIT /* xid=568 */
master-bin.000020 # Query 1 # CREATE DATABASE mysqltest3
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
15
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000020';
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000020 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000020 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 14 + 1
slave-bin.000020 # Query 1 # CREATE DATABASE mysqltest3
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
SHOW DATABASES LIKE "mysqltest3";
Database (mysqltest3)
mysqltest3
-------- switch to slave --------
SHOW DATABASES LIKE "mysqltest3";
Database (mysqltest3)
mysqltest3
-------- switch to master -------
DROP DATABASE IF EXISTS mysqltest1;
DROP DATABASE IF EXISTS mysqltest2;
DROP DATABASE IF EXISTS mysqltest3;
......@@ -8,17 +8,13 @@ end|
set autocommit=0|
insert t1 values (2)|
call bug8850()|
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
commit|
select * from t1|
a
2
call bug8850()|
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
set autocommit=1|
select * from t1|
a
2
drop table t1|
drop procedure bug8850|
drop function if exists bug10015_1|
......
......@@ -746,3 +746,45 @@ insert into t1 values (2,'Durban');
select * from t1 where city = 'Durban';
select * from t1 where city = 'Durban ';
drop table t1;
#
# Test for bug #11167: join for utf8 varchar value longer than 255 bytes
#
SET NAMES UTF8;
CREATE TABLE t1 (
`id` int(20) NOT NULL auto_increment,
`country` varchar(100) NOT NULL default '',
`shortcode` varchar(100) NOT NULL default '',
`operator` varchar(100) NOT NULL default '',
`momid` varchar(30) NOT NULL default '',
`keyword` varchar(160) NOT NULL default '',
`content` varchar(160) NOT NULL default '',
`second_token` varchar(160) default NULL,
`gateway_id` int(11) NOT NULL default '0',
`created` datetime NOT NULL default '0000-00-00 00:00:00',
`msisdn` varchar(15) NOT NULL default '',
PRIMARY KEY (`id`),
UNIQUE KEY `MSCCSPK_20030521130957121` (`momid`),
KEY `IX_mobile_originated_message_keyword` (`keyword`),
KEY `IX_mobile_originated_message_created` (`created`),
KEY `IX_mobile_originated_message_support` (`msisdn`,`momid`,`keyword`,`gateway_id`,`created`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO t1 VALUES
(1,'blah','464','aaa','fkc1c9ilc20x0hgae7lx6j09','ERR','ERR Имри.Афимим.Аеимимримдмримрмрирор имримримримр имридм ирбднримрфмририримрфмфмим.Ад.Д имдимримрад.Адимримримрмдиримримримр м.Дадимфшьмримд им.Адимимрн имадми','ИМРИ.АФИМИМ.АЕИМИМРИМДМРИМРМРИРОР',3,'2005-06-01 17:30:43','1234567890'),
(2,'blah','464','aaa','haxpl2ilc20x00bj4tt2m5ti','11','11 g','G',3,'2005-06-02 22:43:10','1234567890');
CREATE TABLE t2 (
`msisdn` varchar(15) NOT NULL default '',
`operator_id` int(11) NOT NULL default '0',
`created` datetime NOT NULL default '0000-00-00 00:00:00',
UNIQUE KEY `PK_user` (`msisdn`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO t2 VALUES ('1234567890',2,'2005-05-24 13:53:25');
SELECT content, t2.msisdn FROM t1, t2 WHERE t1.msisdn = '1234567890';
DROP TABLE t1,t2;
......@@ -596,7 +596,6 @@ show tables from mysqltest;
set autocommit=0;
create table t1 (a int not null) engine= innodb;
insert into t1 values(1),(2);
--error 1192
truncate table t1;
commit;
truncate table t1;
......
######################## rpl_ddl.test ########################
# #
# DDL statements (sometimes with implicit COMMIT) executed #
# by the master and it's propagation into the slave #
# #
##############################################################
#
# NOTE, PLEASE BE CAREFUL, WHEN MODIFYING THE TESTS !!
#
# 1. !All! objects to be dropped, renamed, altered ... must be created
# in AUTOCOMMIT= 1 mode before AUTOCOMMIT is set to 0 and the test
# sequences start.
#
# 2. Never use a test object, which was direct or indirect affected by a
# preceeding test sequence again.
# Except table d1.t1 where ONLY DML is allowed.
#
# If one preceeding test sequence hits a (sometimes not good visible,
# because the sql error code of the statement might be 0) bug
# and these rules are ignored, a following test sequence might earn ugly
# effects like failing 'sync_slave_with_master', crashes of the slave or
# abort of the test case etc..
#
# 3. The assignment of the DDL command to be tested to $my_stmt can
# be a bit difficult. "'" must be avoided, because the test
# routine "include/rpl_stmt_seq.inc" performs a
# eval SELECT CONCAT('######## ','$my_stmt',' ########') as "";
#
--source include/have_innodb.inc
--source include/master-slave.inc
###############################################################
# Some preparations
###############################################################
# The sync_slave_with_master is needed to make the xids deterministic.
sync_slave_with_master;
connection master;
SET AUTOCOMMIT = 1;
#
# 1. DROP all objects, which probably already exist, but must be created here
#
--disable_warnings
DROP DATABASE IF EXISTS mysqltest1;
DROP DATABASE IF EXISTS mysqltest2;
DROP DATABASE IF EXISTS mysqltest3;
--enable_warnings
#
# 2. CREATE all objects needed
# working database is mysqltest1
# working (transactional!) is mysqltest1.t1
#
CREATE DATABASE mysqltest1;
CREATE DATABASE mysqltest2;
CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE= "InnoDB";
INSERT INTO mysqltest1.t1 SET f1= 0;
CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE= "InnoDB";
CREATE INDEX my_idx6 ON mysqltest1.t6(f1);
CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE= "InnoDB";
INSERT INTO mysqltest1.t7 SET f1= 0;
CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT);
#
# 3. master sessions: never do AUTOCOMMIT
# slave sessions: never do AUTOCOMMIT
#
SET AUTOCOMMIT = 0;
use mysqltest1;
sync_slave_with_master;
connection slave;
--disable_query_log
SELECT '-------- switch to slave --------' as "";
--enable_query_log
SET AUTOCOMMIT = 0;
use mysqltest1;
connection master;
--disable_query_log
SELECT '-------- switch to master -------' as "";
--enable_query_log
# We don't want to abort the whole test if one statement sent
# to the server gets an error, because the following test
# sequences are nearly independend of the previous statements.
--disable_abort_on_error
###############################################################
# Banal case: (explicit) COMMIT and ROLLBACK
# Just for checking if the test sequence is usable
###############################################################
let $my_stmt= COMMIT;
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
let $my_stmt= ROLLBACK;
let $my_master_commit= false;
let $my_slave_commit= false;
--source include/rpl_stmt_seq.inc
###############################################################
# Cases with commands very similar to COMMIT
###############################################################
let $my_stmt= SET AUTOCOMMIT=1;
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
SET AUTOCOMMIT=0;
let $my_stmt= START TRANSACTION;
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
let $my_stmt= BEGIN;
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
###############################################################
# Cases with (BASE) TABLES and (UPDATABLE) VIEWs
###############################################################
let $my_stmt= DROP TABLE mysqltest1.t2;
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
SHOW TABLES LIKE 't2';
connection slave;
--disable_query_log
SELECT '-------- switch to slave --------' as "";
--enable_query_log
SHOW TABLES LIKE 't2';
connection master;
--disable_query_log
SELECT '-------- switch to master -------' as "";
--enable_query_log
# Note: Since this test is executed with a skip-innodb slave, the
# slave incorrectly commits the insert. One can *not* have InnoDB on
# master and MyISAM on slave and expect that a transactional rollback
# after a CREATE TEMPORARY TABLE should work correctly on the slave.
# For this to work properly the handler on the slave must be able to
# handle transactions (e.g. InnoDB or NDB).
let $my_stmt= DROP TEMPORARY TABLE mysqltest1.t23;
let $my_master_commit= false;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
SHOW TABLES LIKE 't23';
connection slave;
--disable_query_log
SELECT '-------- switch to slave --------' as "";
--enable_query_log
SHOW TABLES LIKE 't23';
connection master;
--disable_query_log
SELECT '-------- switch to master -------' as "";
--enable_query_log
let $my_stmt= RENAME TABLE mysqltest1.t3 to mysqltest1.t20;
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
SHOW TABLES LIKE 't20';
connection slave;
--disable_query_log
SELECT '-------- switch to slave --------' as "";
--enable_query_log
SHOW TABLES LIKE 't20';
connection master;
--disable_query_log
SELECT '-------- switch to master -------' as "";
--enable_query_log
let $my_stmt= ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT;
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
describe mysqltest1.t4;
connection slave;
--disable_query_log
SELECT '-------- switch to slave --------' as "";
--enable_query_log
describe mysqltest1.t4;
connection master;
--disable_query_log
SELECT '-------- switch to master -------' as "";
--enable_query_log
let $my_stmt= CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= "InnoDB";
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
# Note: Since this test is executed with a skip-innodb slave, the
# slave incorrectly commits the insert. One can *not* have InnoDB on
# master and MyISAM on slave and expect that a transactional rollback
# after a CREATE TEMPORARY TABLE should work correctly on the slave.
# For this to work properly the handler on the slave must be able to
# handle transactions (e.g. InnoDB or NDB).
let $my_stmt= CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT);
let $my_master_commit= false;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
let $my_stmt= TRUNCATE TABLE mysqltest1.t7;
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
SELECT * FROM mysqltest1.t7;
connection slave;
--disable_query_log
SELECT '-------- switch to slave --------' as "";
--enable_query_log
SELECT * FROM mysqltest1.t7;
connection master;
--disable_query_log
SELECT '-------- switch to master -------' as "";
--enable_query_log
###############################################################
# Cases with LOCK/UNLOCK
###############################################################
# MySQL insists in locking mysqltest1.t1, because rpl_stmt_seq performs an
# INSERT into this table.
let $my_stmt= LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ;
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
UNLOCK TABLES;
# No prior locking
let $my_stmt= UNLOCK TABLES;
let $my_master_commit= false;
let $my_slave_commit= false;
--source include/rpl_stmt_seq.inc
# With prior read locking
# Note that this test generate an error since the rpl_stmt_seq.inc
# tries to insert into t1.
LOCK TABLES mysqltest1.t1 READ;
let $my_stmt= UNLOCK TABLES;
let $my_master_commit= false;
let $my_slave_commit= false;
--source include/rpl_stmt_seq.inc
# With prior write locking
LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ;
let $my_stmt= UNLOCK TABLES;
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
###############################################################
# Cases with INDEXES
###############################################################
let $my_stmt= DROP INDEX my_idx6 ON mysqltest1.t6;
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
SHOW INDEX FROM mysqltest1.t6;
connection slave;
--disable_query_log
SELECT '-------- switch to slave --------' as "";
--enable_query_log
SHOW INDEX FROM mysqltest1.t6;
connection master;
--disable_query_log
SELECT '-------- switch to master -------' as "";
--enable_query_log
let $my_stmt= CREATE INDEX my_idx5 ON mysqltest1.t5(f1);
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
SHOW INDEX FROM mysqltest1.t5;
connection slave;
--disable_query_log
SELECT '-------- switch to slave --------' as "";
--enable_query_log
SHOW INDEX FROM mysqltest1.t5;
connection master;
--disable_query_log
SELECT '-------- switch to master -------' as "";
--enable_query_log
###############################################################
# Cases with DATABASE
###############################################################
let $my_stmt= DROP DATABASE mysqltest2;
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
SHOW DATABASES LIKE "mysqltest2";
connection slave;
--disable_query_log
SELECT '-------- switch to slave --------' as "";
--enable_query_log
SHOW DATABASES LIKE "mysqltest2";
connection master;
--disable_query_log
SELECT '-------- switch to master -------' as "";
--enable_query_log
let $my_stmt= CREATE DATABASE mysqltest3;
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
SHOW DATABASES LIKE "mysqltest3";
connection slave;
--disable_query_log
SELECT '-------- switch to slave --------' as "";
--enable_query_log
SHOW DATABASES LIKE "mysqltest3";
connection master;
--disable_query_log
SELECT '-------- switch to master -------' as "";
--enable_query_log
###############################################################
# Cleanup
###############################################################
--disable_warnings
DROP DATABASE IF EXISTS mysqltest1;
DROP DATABASE IF EXISTS mysqltest2;
DROP DATABASE IF EXISTS mysqltest3;
--enable_warnings
......@@ -24,14 +24,10 @@ end|
set autocommit=0|
insert t1 values (2)|
--error 1192
call bug8850()|
commit|
select * from t1|
#
# when CALL will be fixed to not start a transaction, the error should
# go away
--error 1192
call bug8850()|
set autocommit=1|
select * from t1|
......
......@@ -1041,7 +1041,7 @@ mysql_get_identifier_quote_char(
return(EOF);
}
return(get_quote_char_for_identifier((THD*) trx->mysql_thd,
name, namelen));
name, (int) namelen));
}
/**************************************************************************
......@@ -2022,7 +2022,7 @@ innobase_rollback_to_savepoint(
longlong2str((ulonglong)savepoint, name, 36);
error = trx_rollback_to_savepoint_for_mysql(trx, name,
error = (int) trx_rollback_to_savepoint_for_mysql(trx, name,
&mysql_binlog_cache_pos);
DBUG_RETURN(convert_error_code_to_mysql(error, NULL));
}
......@@ -2051,7 +2051,7 @@ innobase_release_savepoint(
longlong2str((ulonglong)savepoint, name, 36);
error = trx_release_savepoint_for_mysql(trx, name);
error = (int) trx_release_savepoint_for_mysql(trx, name);
DBUG_RETURN(convert_error_code_to_mysql(error, NULL));
}
......@@ -2092,7 +2092,7 @@ innobase_savepoint(
char name[64];
longlong2str((ulonglong)savepoint,name,36);
error = trx_savepoint_for_mysql(trx, name, (ib_longlong)0);
error = (int) trx_savepoint_for_mysql(trx, name, (ib_longlong)0);
DBUG_RETURN(convert_error_code_to_mysql(error, NULL));
}
......@@ -2663,7 +2663,7 @@ innobase_read_from_2_little_endian(
/* out: value */
const mysql_byte* buf) /* in: from where to read */
{
return((ulint)(buf[0]) + 256 * ((ulint)(buf[1])));
return (uint) ((ulint)(buf[0]) + 256 * ((ulint)(buf[1])));
}
/***********************************************************************
......@@ -3744,7 +3744,7 @@ ha_innobase::index_read(
match_mode = ROW_SEL_EXACT_PREFIX;
}
last_match_mode = match_mode;
last_match_mode = (uint) match_mode;
innodb_srv_conc_enter_innodb(prebuilt->trx);
......@@ -3764,7 +3764,7 @@ ha_innobase::index_read(
error = HA_ERR_KEY_NOT_FOUND;
table->status = STATUS_NOT_FOUND;
} else {
error = convert_error_code_to_mysql(ret, user_thd);
error = convert_error_code_to_mysql((int) ret, user_thd);
table->status = STATUS_NOT_FOUND;
}
......@@ -3916,7 +3916,7 @@ ha_innobase::general_fetch(
error = HA_ERR_END_OF_FILE;
table->status = STATUS_NOT_FOUND;
} else {
error = convert_error_code_to_mysql(ret, user_thd);
error = convert_error_code_to_mysql((int) ret, user_thd);
table->status = STATUS_NOT_FOUND;
}
......@@ -4865,7 +4865,7 @@ innobase_drop_database(
}
ptr++;
namebuf = my_malloc(len + 2, MYF(0));
namebuf = my_malloc((uint) len + 2, MYF(0));
memcpy(namebuf, ptr, len);
namebuf[len] = '/';
......@@ -5431,7 +5431,7 @@ ha_innobase::update_table_comment(
info on foreign keys */
const char* comment)/* in: table comment defined by user */
{
uint length = strlen(comment);
uint length = (uint) strlen(comment);
char* str;
row_prebuilt_t* prebuilt = (row_prebuilt_t*)innobase_prebuilt;
......@@ -5483,7 +5483,7 @@ ha_innobase::update_table_comment(
*pos++ = ' ';
}
rewind(file);
flen = fread(pos, 1, flen, file);
flen = (uint) fread(pos, 1, flen, file);
pos[flen] = 0;
}
......@@ -5546,7 +5546,7 @@ ha_innobase::get_foreign_key_create_info(void)
if (str) {
rewind(file);
flen = fread(str, 1, flen, file);
flen = (uint) fread(str, 1, flen, file);
str[flen] = 0;
}
......@@ -5586,8 +5586,8 @@ ha_innobase::get_foreign_key_list(THD *thd, List<FOREIGN_KEY_INFO> *f_key_list)
while (tmp_buff[i] != '/')
i++;
tmp_buff+= i + 1;
f_key_info.forein_id= make_lex_string(thd, 0,
tmp_buff, strlen(tmp_buff), 1);
f_key_info.forein_id= make_lex_string(thd, 0, tmp_buff,
(uint) strlen(tmp_buff), 1);
tmp_buff= foreign->referenced_table_name;
i= 0;
while (tmp_buff[i] != '/')
......@@ -5595,16 +5595,16 @@ ha_innobase::get_foreign_key_list(THD *thd, List<FOREIGN_KEY_INFO> *f_key_list)
f_key_info.referenced_db= make_lex_string(thd, 0,
tmp_buff, i, 1);
tmp_buff+= i + 1;
f_key_info.referenced_table= make_lex_string(thd, 0,
tmp_buff, strlen(tmp_buff), 1);
f_key_info.referenced_table= make_lex_string(thd, 0, tmp_buff,
(uint) strlen(tmp_buff), 1);
for (i= 0;;)
{
tmp_buff= foreign->foreign_col_names[i];
name= make_lex_string(thd, name, tmp_buff, strlen(tmp_buff), 1);
name= make_lex_string(thd, name, tmp_buff, (uint) strlen(tmp_buff), 1);
f_key_info.foreign_fields.push_back(name);
tmp_buff= foreign->referenced_col_names[i];
name= make_lex_string(thd, name, tmp_buff, strlen(tmp_buff), 1);
name= make_lex_string(thd, name, tmp_buff, (uint) strlen(tmp_buff), 1);
f_key_info.referenced_fields.push_back(name);
if (++i >= foreign->n_fields)
break;
......@@ -5996,8 +5996,8 @@ ha_innobase::external_lock(
if (error != DB_SUCCESS) {
error = convert_error_code_to_mysql(
error, user_thd);
DBUG_RETURN(error);
(int) error, user_thd);
DBUG_RETURN((int) error);
}
}
......@@ -6124,8 +6124,8 @@ ha_innobase::transactional_table_lock(
LOCK_TABLE_TRANSACTIONAL);
if (error != DB_SUCCESS) {
error = convert_error_code_to_mysql(error, user_thd);
DBUG_RETURN(error);
error = convert_error_code_to_mysql((int) error, user_thd);
DBUG_RETURN((int) error);
}
if (thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) {
......@@ -6215,22 +6215,22 @@ innodb_show_status(
rewind(srv_monitor_file);
if (flen < MAX_STATUS_SIZE) {
/* Display the entire output. */
flen = fread(str, 1, flen, srv_monitor_file);
flen = (long) fread(str, 1, flen, srv_monitor_file);
} else if (trx_list_end < (ulint) flen
&& trx_list_start < trx_list_end
&& trx_list_start + (flen - trx_list_end)
< MAX_STATUS_SIZE - sizeof truncated_msg - 1) {
/* Omit the beginning of the list of active transactions. */
long len = fread(str, 1, trx_list_start, srv_monitor_file);
long len = (long) fread(str, 1, trx_list_start, srv_monitor_file);
memcpy(str + len, truncated_msg, sizeof truncated_msg - 1);
len += sizeof truncated_msg - 1;
usable_len = (MAX_STATUS_SIZE - 1) - len;
fseek(srv_monitor_file, flen - usable_len, SEEK_SET);
len += fread(str + len, 1, usable_len, srv_monitor_file);
len += (long) fread(str + len, 1, usable_len, srv_monitor_file);
flen = len;
} else {
/* Omit the end of the output. */
flen = fread(str, 1, MAX_STATUS_SIZE - 1, srv_monitor_file);
flen = (long) fread(str, 1, MAX_STATUS_SIZE - 1, srv_monitor_file);
}
mutex_exit_noninline(&srv_monitor_file_mutex);
......@@ -6792,7 +6792,7 @@ innobase_get_at_most_n_mbchars(
ulint n_chars; /* number of characters in prefix */
CHARSET_INFO* charset; /* charset used in the field */
charset = get_charset(charset_id, MYF(MY_WME));
charset = get_charset((uint) charset_id, MYF(MY_WME));
ut_ad(charset);
ut_ad(charset->mbmaxlen);
......@@ -6826,7 +6826,7 @@ innobase_get_at_most_n_mbchars(
whole string. */
char_length = my_charpos(charset, str,
str + data_len, n_chars);
str + data_len, (int) n_chars);
if (char_length > data_len) {
char_length = data_len;
}
......@@ -6949,7 +6949,7 @@ innobase_xa_prepare(
ut_ad(trx->active_trans);
error = trx_prepare_for_mysql(trx);
error = (int) trx_prepare_for_mysql(trx);
} else {
/* We just mark the SQL statement ended and do not do a
transaction prepare */
......
......@@ -2768,6 +2768,20 @@ mysql_execute_command(THD *thd)
case SQLCOM_CREATE_TABLE:
{
/* If CREATE TABLE of non-temporary table, do implicit commit */
if (!(lex->create_info.options & HA_LEX_CREATE_TMP_TABLE))
{
if (end_active_trans(thd))
{
res= -1;
break;
}
}
else
{
/* So that CREATE TEMPORARY TABLE gets to binlog at commit/rollback */
thd->options|= OPTION_STATUS_NO_TRANS_UPDATE;
}
DBUG_ASSERT(first_table == all_tables && first_table != 0);
bool link_to_local;
// Skip first table, which is the table we are creating
......@@ -3262,6 +3276,11 @@ end_with_restore_list:
break;
}
case SQLCOM_TRUNCATE:
if (end_active_trans(thd))
{
res= -1;
break;
}
DBUG_ASSERT(first_table == all_tables && first_table != 0);
if (check_one_table_access(thd, DELETE_ACL, all_tables))
goto error;
......@@ -3355,6 +3374,9 @@ end_with_restore_list:
*/
if (thd->slave_thread)
lex->drop_if_exists= 1;
/* So that DROP TEMPORARY TABLE gets to binlog at commit/rollback */
thd->options|= OPTION_STATUS_NO_TRANS_UPDATE;
}
res= mysql_rm_table(thd, first_table, lex->drop_if_exists,
lex->drop_temporary);
......@@ -3493,6 +3515,11 @@ end_with_restore_list:
break;
case SQLCOM_CREATE_DB:
{
if (end_active_trans(thd))
{
res= -1;
break;
}
char *alias;
if (!(alias=thd->strdup(lex->name)) || check_db_name(lex->name))
{
......@@ -3523,6 +3550,11 @@ end_with_restore_list:
}
case SQLCOM_DROP_DB:
{
if (end_active_trans(thd))
{
res= -1;
break;
}
if (check_db_name(lex->name))
{
my_error(ER_WRONG_DB_NAME, MYF(0), lex->name);
......
......@@ -11635,9 +11635,9 @@ store_record_in_cache(JOIN_CACHE *cache)
end > str && end[-1] == ' ' ;
end--) ;
length=(uint) (end-str);
memcpy(pos+1,str,length);
*pos=(uchar) length;
pos+=length+1;
memcpy(pos+sizeof(uint), str, length);
*((uint *) pos)= length;
pos+= length+sizeof(uint);
}
else
{
......@@ -11700,9 +11700,9 @@ read_cached_record(JOIN_TAB *tab)
{
if (copy->strip)
{
memcpy(copy->str,pos+1,length=(uint) *pos);
memset(copy->str+length,' ',copy->length-length);
pos+=1+length;
memcpy(copy->str, pos+sizeof(uint), length= *((uint *) pos));
memset(copy->str+length, ' ', copy->length-length);
pos+= sizeof(uint)+length;
}
else
{
......
......@@ -17,6 +17,11 @@
## Process this file with automake to create Makefile.in
if HAVE_YASSL
yassl_dummy_link_fix= $(top_srcdir)/extra/yassl/src/dummy.cpp
else
yassl_dummy_link_fix=
endif
EXTRA_DIST = auto_increment.res auto_increment.tst \
function.res function.tst lock_test.pl lock_test.res \
export.pl big_record.pl \
......@@ -38,7 +43,9 @@ LDADD = @CLIENT_EXTRA_LDFLAGS@ \
$(top_builddir)/libmysql/libmysqlclient.la
mysql_client_test_LDADD= $(LDADD) $(CXXLDFLAGS) \
$(top_builddir)/mysys/libmysys.a
mysql_client_test_SOURCES= mysql_client_test.c
mysql_client_test_SOURCES= mysql_client_test.c $(yassl_dummy_link_fix)
insert_test_SOURCES= insert_test.c $(yassl_dummy_link_fix)
select_test_SOURCES= select_test.c $(yassl_dummy_link_fix)
insert_test_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
select_test_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
......
......@@ -14,22 +14,25 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
if HAVE_YASSL
yassl_dummy_link_fix= $(top_srcdir)/extra/yassl/src/dummy.cpp
else
yassl_dummy_link_fix=
endif
INCLUDES= -I$(top_srcdir)/include $(openssl_includes)
LDADD= @CLIENT_EXTRA_LDFLAGS@ $(openssl_libs)
pkglib_LIBRARIES= libvio.a
noinst_PROGRAMS = test-ssl test-sslserver test-sslclient
noinst_HEADERS= vio_priv.h
test_ssl_SOURCES= test-ssl.c $(top_srcdir)/extra/yassl/src/dummy.cpp
test_ssl_SOURCES= test-ssl.c $(yassl_dummy_link_fix)
test_ssl_LDADD= @CLIENT_EXTRA_LDFLAGS@ ../dbug/libdbug.a libvio.a \
../mysys/libmysys.a ../strings/libmystrings.a \
$(openssl_libs)
test_sslserver_SOURCES= test-sslserver.c \
$(top_srcdir)/extra/yassl/src/dummy.cpp
test_sslserver_SOURCES= test-sslserver.c $(yassl_dummy_link_fix)
test_sslserver_LDADD= @CLIENT_EXTRA_LDFLAGS@ ../dbug/libdbug.a libvio.a \
../mysys/libmysys.a ../strings/libmystrings.a \
$(openssl_libs)
test_sslclient_SOURCES= test-sslclient.c \
$(top_srcdir)/extra/yassl/src/dummy.cpp
test_sslclient_SOURCES= test-sslclient.c $(yassl_dummy_link_fix)
test_sslclient_LDADD= @CLIENT_EXTRA_LDFLAGS@ ../dbug/libdbug.a libvio.a \
../mysys/libmysys.a ../strings/libmystrings.a \
$(openssl_libs)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment