~ubuntu-branches/ubuntu/lucid/mysql-dfsg-5.1/lucid-security

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 22:33:55 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20120222223355-or06x1euyk8n0ldi
Tags: 5.1.61-0ubuntu0.10.04.1
* SECURITY UPDATE: Update to 5.1.61 to fix multiple security issues
  (LP: #937869)
  - http://www.oracle.com/technetwork/topics/security/cpujan2012-366304.html
  - CVE-2011-2262
  - CVE-2012-0075
  - CVE-2012-0112
  - CVE-2012-0113
  - CVE-2012-0114
  - CVE-2012-0115
  - CVE-2012-0116
  - CVE-2012-0117
  - CVE-2012-0118
  - CVE-2012-0119
  - CVE-2012-0120
  - CVE-2012-0484
  - CVE-2012-0485
  - CVE-2012-0486
  - CVE-2012-0487
  - CVE-2012-0488
  - CVE-2012-0489
  - CVE-2012-0490
  - CVE-2012-0491
  - CVE-2012-0492
  - CVE-2012-0493
  - CVE-2012-0494
  - CVE-2012-0495
  - CVE-2012-0496
* Dropped patches unnecessary with 5.1.61:
  - debian/patches/90_mysql_safer_strmov.dpatch
  - debian/patches/51_ssl_test_certs.dpatch
  - debian/patches/52_CVE-2009-4030.dpatch
  - debian/patches/53_CVE-2009-4484.dpatch
  - debian/patches/54_CVE-2008-7247.dpatch
  - debian/patches/55_CVE-2010-1621.dpatch
  - debian/patches/56_CVE-2010-1850.dpatch
  - debian/patches/57_CVE-2010-1849.dpatch
  - debian/patches/58_CVE-2010-1848.dpatch
  - debian/patches/59_CVE-2010-1626.dpatch
  - debian/patches/60_CVE-2010-2008.dpatch
  - debian/patches/60_CVE-2010-3677.dpatch
  - debian/patches/60_CVE-2010-3678.dpatch
  - debian/patches/60_CVE-2010-3679.dpatch
  - debian/patches/60_CVE-2010-3680.dpatch
  - debian/patches/60_CVE-2010-3681.dpatch
  - debian/patches/60_CVE-2010-3682.dpatch
  - debian/patches/60_CVE-2010-3683.dpatch
  - debian/patches/60_CVE-2010-3833.dpatch
  - debian/patches/60_CVE-2010-3834.dpatch
  - debian/patches/60_CVE-2010-3835.dpatch
  - debian/patches/60_CVE-2010-3836.dpatch
  - debian/patches/60_CVE-2010-3837.dpatch
  - debian/patches/60_CVE-2010-3838.dpatch
  - debian/patches/60_CVE-2010-3839.dpatch
  - debian/patches/60_CVE-2010-3840.dpatch
  - debian/patches/61_disable_longfilename_test.dpatch
  - debian/patches/62_alter_table_fix.dpatch
  - debian/patches/63_cherrypick-upstream-49479.dpatch
  - debian/patches/10_readline_build_fix.dpatch
* debian/mysql-client-5.1.docs: removed EXCEPTIONS-CLIENT file
* debian/mysql-server-5.1.docs,debian/libmysqlclient16.docs,
  debian/libmysqlclient-dev.docs: removed, no longer necessary.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
source include/master-slave.inc;
13
13
source include/have_binlog_format_mixed.inc;
 
14
source include/have_innodb.inc;
14
15
 
15
16
--echo ==== Initialize ====
16
17
 
31
32
--connection master
32
33
 
33
34
disconnect master;
 
35
--echo [on master1]
34
36
--connection master1
35
37
 
36
38
# waiting DROP TEMPORARY TABLE event to be written into binlog
46
48
--echo ==== Clean up ====
47
49
 
48
50
--echo [on master]
49
 
--connection master1
 
51
--let $rpl_connection_name= master
 
52
--let $rpl_server_number= 1
 
53
--source include/rpl_connect.inc
 
54
--connection master
50
55
DROP TABLE t1;
51
56
 
52
57
--echo [on slave]
88
93
#    10. in the end the slave should not have open temp tables.
89
94
#  
90
95
 
91
 
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,);
 
96
--source include/rpl_reset.inc
92
97
-- connection master
93
98
 
94
99
# action: setup environment
146
150
-- sync_slave_with_master
147
151
 
148
152
-- source include/show_binlog_events.inc
 
153
 
 
154
--echo
 
155
--echo # Bug#55478 Row events wrongly apply on the temporary table of the same name
 
156
--echo # ==========================================================================
 
157
connection master;
 
158
 
 
159
let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1);
 
160
let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
 
161
 
 
162
--echo # The statement should be binlogged
 
163
CREATE TEMPORARY TABLE t1(c1 INT) ENGINE=InnoDB;
 
164
 
 
165
--echo
 
166
--echo # Case 1: CREATE TABLE t1 ... SELECT
 
167
--echo # ----------------------------------
 
168
let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1);
 
169
let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
 
170
 
 
171
--echo
 
172
--echo # The statement generates row events on t1. And the rows events should
 
173
--echo # be inserted into the base table on slave.
 
174
CREATE TABLE t1 ENGINE=MyISAM SELECT rand();
 
175
 
 
176
source include/show_binlog_events.inc;
 
177
let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1);
 
178
let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
 
179
 
 
180
--echo
 
181
--echo # Case 2: DROP TEMPORARY TABLE in a transacation(happens only on 5.5+)
 
182
--echo # --------------------------------------------------------------------
 
183
--echo
 
184
 
 
185
BEGIN;
 
186
DROP TEMPORARY TABLE t1;
 
187
 
 
188
--echo # The statement will binlogged after 'DROP TEMPORARY TABLE t1'
 
189
INSERT INTO t1 VALUES(1);
 
190
 
 
191
--echo # The rows event will binlogged after 'INSERT INTO t1 VALUES(1)'
 
192
INSERT INTO t1 VALUES(Rand());
 
193
COMMIT;
 
194
 
 
195
source include/show_binlog_events.inc;
 
196
 
 
197
--sync_slave_with_master
 
198
 
 
199
--echo # Compare the base table.
 
200
--let $diff_tables= master:t1, slave:t1
 
201
--source include/diff_tables.inc
 
202
 
 
203
--echo
 
204
connection master;
 
205
DROP TABLE t1;
 
206
--source include/rpl_end.inc