~ubuntu-branches/ubuntu/natty/mysql-5.1/natty-security

« back to all changes in this revision

Viewing changes to mysql-test/suite/engines/funcs/t/rpl_row_until.test

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-06-21 15:31:05 UTC
  • mfrom: (1.2.1 upstream) (2.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100621153105-lv81twvjdgzvzrre
Tags: 5.1.48-1ubuntu1
* Merge from debian unstable, remaining changes:
  + debian/control:
     * Update maintainer according to spec.
     * Move section from "misc" to "database".
     * Added libmysqlclient16-dev an empty transitional package. 
     * Added mysql-client-core-5.1 package.
     * Suggest mailx for mysql-server-5.1
     * Add mysql-testsuite package so you can run the testsuite seperately.
  + debian/additions/my.cnf:
    * Remove language options. Error message files are located in a different directory in Mysql
      5.0. Setting the language option to use /usr/share/mysql/english breaks Mysql 5.0. Both 5.0
      and 5.1 use a different value that works. (LP: #316974)
  + Add apparmor profile:
    + debian/apparmor-profile: apparmor-profile
    + debian/rules, debian/mysql-server-5.1.files: install apparmor profile
    + debian/mysql-server-5.1.dirs: add etc/apparmor.d/fore-complain
    + debian/mysql-server-5.1.postrm: remove symlink in force-complain/ on purge.
    + debian/mysql-server-5.1.README.Debian: add apparmor documentation.
    + debian/additions/my.cnf: Add warning about apparmor. (LP: #201799)
    + debian/mysql-server-5.1.postinst: reload apparmor profiles
  * Convert the package from sysvinit to upstart:
    + debian/mysql-server-5.1.mysql.upstart: Add upstart script.
    + debian/mysql-server-5.1.mysql.init: Dropped, unused now with upstart.
    + debian/additions/mysqld_safe_syslog.cnf: Dropped, unused now with upstart.
    + debian/additons/my.cnf: Remove pid declaration and setup error logging to /var/log/mysql since
      we're not piping anything around logger anymore.
    + debian/rules, debian/mysql-server-5.1.logcheck.ignore.{paranoid,worstation},
      debian/mysql-server-5.1.logcheck.ignore.server: : Remove references to mysqld_safe
    + debian/patches/38_scripts_mysqld_safe.sh_signals.dpatch: Dropped
  * Added -fno-strict-aliasing to CFLAGS to get around mysql testsuite build failures.
  * Add Apport hook (LP: #354188):
    + debian/mysql-server-5.1.py: apport package hook
    + debian/rules: Make it installable
  * debian/mysql-server-5.1.mysql-server.logrotate: Check to see if mysql is running before
    running logrotate. (LP: #513135)
  * Make the testsuite installable. (LP: #530752)
    + debian/mysql-server-5.1.files, debian/rules: install apport package hook
  * debian/mysql-server-5.1.preinst: Set mysql user's home directory
    to /nonexistent to protect against having the /var/lib/mysql
    user-writeable. If an attacker can trick mysqld into creating
    dot files in the home directory, he could do .rhost-like attacks
    on the system. (LP: #293258)
  * debian/control: mysql-client-5.1 should depend on mysql-core-client-5.1.
    (LP: #590952) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
# create some events on master
19
19
create table t1(n int not null auto_increment primary key);
20
20
insert into t1 values (1),(2),(3),(4);
 
21
let $master_log_pos_1= query_get_value(SHOW MASTER STATUS, Position, 1);
21
22
drop table t1;
 
23
 
22
24
create table t2(n int not null auto_increment primary key);
23
25
insert into t2 values (1),(2);
 
26
let $master_log_pos_2= query_get_value(SHOW MASTER STATUS, Position, 1);
24
27
insert into t2 values (3),(4);
25
28
drop table t2;
26
29
 
27
30
# try to replicate all queries until drop of t1
28
31
connection slave;
29
 
start slave until master_log_file='master-bin.000001', master_log_pos=311;
 
32
--replace_result $master_log_pos_1 MASTER_LOG_POS
 
33
eval start slave until master_log_file='master-bin.000001', master_log_pos=$master_log_pos_1;
30
34
sleep 2;
31
35
wait_for_slave_to_stop;
32
36
# here table should be still not deleted
33
37
select * from t1;
34
 
--vertical_results
35
 
--replace_result $MASTER_MYPORT MASTER_MYPORT
36
 
--replace_column 1 # 7 # 9 # 11 # 22 # 23 # 33 #
37
 
show slave status;
 
38
--let $slave_param= Exec_Master_Log_Pos
 
39
--let $slave_param_value= $master_log_pos_1
 
40
--source include/check_slave_param.inc
38
41
 
39
42
# this should fail right after start
 
43
--replace_result 291 MASTER_LOG_POS
40
44
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
41
45
# again this table should be still not deleted
42
46
select * from t1;
43
47
sleep 2;
44
48
wait_for_slave_to_stop;
45
 
--vertical_results
46
 
--replace_result $MASTER_MYPORT MASTER_MYPORT
47
 
--replace_column 1 # 7 # 9 # 11 # 22 # 23 # 33 #
48
 
show slave status;
 
49
--let $slave_param= Exec_Master_Log_Pos
 
50
--let $slave_param_value= $master_log_pos_1
 
51
--source include/check_slave_param.inc
49
52
 
50
53
# try replicate all up to and not including the second insert to t2;
51
 
start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728;
 
54
let $master_log_pos= $master_log_pos_2;
 
55
let $relay_log_file= slave-relay-bin.000004;
 
56
--source include/get_relay_log_pos.inc
 
57
--replace_result $relay_log_pos RELAY_LOG_POS
 
58
eval start slave until relay_log_file='$relay_log_file', relay_log_pos=$relay_log_pos;
52
59
sleep 2;
53
60
wait_for_slave_to_stop;
54
61
select * from t2;
55
 
--vertical_results
56
 
--replace_result $MASTER_MYPORT MASTER_MYPORT
57
 
--replace_column 1 # 7 # 9 # 11 # 22 # 23 # 33 #
58
 
show slave status;
 
62
--let $slave_param= Exec_Master_Log_Pos
 
63
--let $slave_param_value= $master_log_pos
 
64
--source include/check_slave_param.inc
59
65
 
60
66
# clean up
61
67
start slave;
65
71
sync_with_master;
66
72
stop slave;
67
73
 
 
74
--let $exec_log_pos_1= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1)
68
75
# this should stop immediately as we are already there
69
 
start slave until master_log_file='master-bin.000001', master_log_pos=740;
 
76
--replace_result $master_log_pos_2 MASTER_LOG_POS
 
77
eval start slave until master_log_file='master-bin.000001', master_log_pos=$master_log_pos_2;
70
78
sleep 2;
71
79
wait_for_slave_to_stop;
72
80
# here the sql slave thread should be stopped
73
 
--vertical_results
74
 
--replace_result $MASTER_MYPORT MASTER_MYPORT bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004
75
 
--replace_column 1 # 7 # 9 # 22 # 23 # 33 #
76
 
show slave status;
 
81
--let $slave_param= Exec_Master_Log_Pos
 
82
--let $slave_param_value= $exec_log_pos_1
 
83
--source include/check_slave_param.inc
77
84
 
78
85
#testing various error conditions
 
86
--replace_result 561 MASTER_LOG_POS
79
87
--error 1277
80
88
start slave until master_log_file='master-bin', master_log_pos=561;
 
89
--replace_result 561 MASTER_LOG_POS 12 RELAY_LOG_POS
81
90
--error 1277
82
91
start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12;
83
92
--error 1277
84
93
start slave until master_log_file='master-bin.000001';
85
94
--error 1277
86
95
start slave until relay_log_file='slave-relay-bin.000002';
 
96
--replace_result 561 MASTER_LOG_POS
87
97
--error 1277
88
98
start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561;
89
99
# Warning should be given for second command
90
100
start slave sql_thread;
 
101
--replace_result 740 MASTER_LOG_POS
91
102
start slave until master_log_file='master-bin.000001', master_log_pos=740;