Commit da2d3e3f authored by Georgi Kodinov's avatar Georgi Kodinov
Browse files

merged 5.1-rpl-merge -> 5.1-bugteam

parents a320e867 42339e0f
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -13,3 +13,18 @@ create trigger tr1 before insert on t1 for each row insert into t2 values (2*new
create procedure sp1 (a int) insert into t1 values(a);
drop database testing_1;
source include/show_binlog_events.inc;

# BUG#38773: DROP DATABASE cause switch to stmt-mode when there are
# temporary tables open

use test;
reset master;
create temporary table tt1 (a int);
create table t1 (a int);
insert into t1 values (1);
disable_warnings;
drop database if exists mysqltest1;
enable_warnings;
insert into t1 values (1);
drop table tt1, t1;
source include/show_binlog_events.inc;
+24 −0
Original line number Diff line number Diff line
# ==== Purpose ====
#
# Wait for slave SQL error, skip the erroneous statement and restart
# slave
#
# ==== Usage ====
#
# let show_sql_error=0|1;
# source include/wait_for_slave_sql_error_and_skip.inc;

echo --source include/wait_for_slave_sql_error_and_skip.inc;
connection slave;
source include/wait_for_slave_sql_error.inc;
if ($show_sql_error)
{
  let $error= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
  echo Last_SQL_Error = $error;
}

# skip the erroneous statement
set global sql_slave_skip_counter=1;
start slave;
source include/wait_for_slave_to_start.inc;
connection master;
+2 −2
Original line number Diff line number Diff line
@@ -627,7 +627,7 @@ a b
4	4
show master status /* there must be the UPDATE query event */;
File	Position	Binlog_Do_DB	Binlog_Ignore_DB
master-bin.000001	197		
master-bin.000001	206		
delete from t1;
delete from t2;
insert into t1 values (1,2),(3,4),(4,4);
@@ -637,7 +637,7 @@ UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a;
ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
show master status /* there must be the UPDATE query event */;
File	Position	Binlog_Do_DB	Binlog_Ignore_DB
master-bin.000001	212		
master-bin.000001	221		
drop table t1, t2;
set @@session.binlog_format= @sav_binlog_format;
drop table if exists t1, t2, t3;
+53 −0
Original line number Diff line number Diff line
@@ -17,6 +17,22 @@ master-bin.000001 # Query # # use `testing_1`; CREATE DEFINER=`root`@`localhost`
master-bin.000001	#	Query	#	#	use `testing_1`; CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`(a int)
insert into t1 values(a)
master-bin.000001	#	Query	#	#	drop database testing_1
use test;
reset master;
create temporary table tt1 (a int);
create table t1 (a int);
insert into t1 values (1);
drop database if exists mysqltest1;
insert into t1 values (1);
drop table tt1, t1;
show binlog events from <binlog_start>;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Query	#	#	use `test`; create temporary table tt1 (a int)
master-bin.000001	#	Query	#	#	use `test`; create table t1 (a int)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values (1)
master-bin.000001	#	Query	#	#	drop database if exists mysqltest1
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values (1)
master-bin.000001	#	Query	#	#	use `test`; drop table tt1, t1
set binlog_format=mixed;
reset master;
create database testing_1;
@@ -36,6 +52,22 @@ master-bin.000001 # Query # # use `testing_1`; CREATE DEFINER=`root`@`localhost`
master-bin.000001	#	Query	#	#	use `testing_1`; CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`(a int)
insert into t1 values(a)
master-bin.000001	#	Query	#	#	drop database testing_1
use test;
reset master;
create temporary table tt1 (a int);
create table t1 (a int);
insert into t1 values (1);
drop database if exists mysqltest1;
insert into t1 values (1);
drop table tt1, t1;
show binlog events from <binlog_start>;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Query	#	#	use `test`; create temporary table tt1 (a int)
master-bin.000001	#	Query	#	#	use `test`; create table t1 (a int)
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values (1)
master-bin.000001	#	Query	#	#	drop database if exists mysqltest1
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values (1)
master-bin.000001	#	Query	#	#	use `test`; drop table tt1, t1
set binlog_format=row;
reset master;
create database testing_1;
@@ -55,6 +87,27 @@ master-bin.000001 # Query # # use `testing_1`; CREATE DEFINER=`root`@`localhost`
master-bin.000001	#	Query	#	#	use `testing_1`; CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`(a int)
insert into t1 values(a)
master-bin.000001	#	Query	#	#	drop database testing_1
use test;
reset master;
create temporary table tt1 (a int);
create table t1 (a int);
insert into t1 values (1);
drop database if exists mysqltest1;
insert into t1 values (1);
drop table tt1, t1;
show binlog events from <binlog_start>;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Query	#	#	use `test`; create table t1 (a int)
master-bin.000001	#	Query	#	#	use `test`; BEGIN
master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
master-bin.000001	#	Query	#	#	use `test`; COMMIT
master-bin.000001	#	Query	#	#	drop database if exists mysqltest1
master-bin.000001	#	Query	#	#	use `test`; BEGIN
master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
master-bin.000001	#	Query	#	#	use `test`; COMMIT
master-bin.000001	#	Query	#	#	use `test`; DROP TABLE `t1` /* generated by server */
show databases;
Database
information_schema
+3 −3
Original line number Diff line number Diff line
@@ -115,14 +115,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */
DROP TABLE t1;
show status like "binlog_cache_use";
Variable_name	Value
Binlog_cache_use	13
Binlog_cache_use	15
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	14
Binlog_cache_use	16
show status like "binlog_cache_disk_use";
Variable_name	Value
Binlog_cache_disk_use	1
@@ -131,7 +131,7 @@ delete from t1;
commit;
show status like "binlog_cache_use";
Variable_name	Value
Binlog_cache_use	15
Binlog_cache_use	17
show status like "binlog_cache_disk_use";
Variable_name	Value
Binlog_cache_disk_use	1
Loading