File: rpl_drop_temp.test

package info (click to toggle)
mariadb 1%3A11.8.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 772,520 kB
  • sloc: ansic: 2,414,714; cpp: 1,791,394; asm: 381,336; perl: 62,905; sh: 49,647; pascal: 40,897; java: 39,363; python: 20,791; yacc: 20,432; sql: 17,907; xml: 12,344; ruby: 8,544; cs: 6,542; makefile: 6,145; ada: 1,879; lex: 1,193; javascript: 996; objc: 80; tcl: 73; awk: 46; php: 22
file content (94 lines) | stat: -rw-r--r-- 2,160 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
##############################################
# Change Author: JBM
# Change Date: 2006-02-07
# Change: Added ENGINE=MyISAM
##############################################
source include/have_binlog_format_mixed_or_statement.inc;
source include/master-slave.inc;

--disable_warnings
create database if not exists mysqltest;
--enable_warnings

connect (con_temp,127.0.0.1,root,,test,$MASTER_MYPORT,);

connection con_temp;
use mysqltest;
create temporary table mysqltest.t1 (n int)ENGINE=MyISAM;
create temporary table mysqltest.t2 (n int)ENGINE=MyISAM;

disconnect con_temp;
--source include/wait_until_disconnected.inc

connection master;
-- let $wait_binlog_event= DROP
-- source include/wait_for_binlog_event.inc
sync_slave_with_master;

connection slave;
show status like 'Slave_open_temp_tables';
# Cleanup
connection master;
drop database mysqltest;
sync_slave_with_master;

#
# Bug#49137
# This test verifies if DROP MULTI TEMPORARY TABLE 
# will cause different errors on master and slave, 
# when one or more of these tables do not exist. 
#

connection master;
DROP TEMPORARY TABLE IF EXISTS tmp1;
CREATE TEMPORARY TABLE t1 ( a int );
--error 1051
DROP TEMPORARY TABLE t1, t2;
--error 1051
DROP TEMPORARY TABLE tmp2;
sync_slave_with_master;

connection slave;
stop slave;
wait_for_slave_to_stop;

connection master;
CREATE TEMPORARY TABLE tmp3 (a int);
DROP TEMPORARY TABLE tmp3;

connection slave;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;

connection master;
sync_slave_with_master;


#
# BUG#54842: DROP TEMPORARY TABLE not binlogged after manual switching binlog format to ROW
#

--source include/rpl_reset.inc
--connection master

CREATE TABLE t1 ( i INT );
--sync_slave_with_master
SHOW STATUS LIKE 'Slave_open_temp_tables';

--connect(con1,localhost,root,,)
CREATE TEMPORARY TABLE ttmp1 ( i INT );
SET SESSION binlog_format=ROW;
--disconnect con1

-- connection master
--let $wait_binlog_event= DROP
--source include/wait_for_binlog_event.inc
--sync_slave_with_master
SHOW STATUS LIKE 'Slave_open_temp_tables';

--connection master
--source include/show_binlog_events.inc
DROP TABLE t1;

# End of 4.1 tests
--source include/rpl_end.inc