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

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl/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:
15
15
# Save master log postion for query DROP TABLE t1
16
16
save_master_pos;
17
17
let $master_pos_drop_t1= query_get_value(SHOW BINLOG EVENTS, Pos, 7);
 
18
let $master_log_file= query_get_value(SHOW BINLOG EVENTS, Log_name, 7);
18
19
 
19
20
CREATE TABLE t2(n INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
20
21
# Save master log postion for query CREATE TABLE t2
46
47
 
47
48
# Try to replicate all queries until drop of t1
48
49
connection slave;
49
 
echo START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=master_pos_drop_t1;
 
50
echo START SLAVE UNTIL MASTER_LOG_FILE='$master_log_file', MASTER_LOG_POS=master_pos_drop_t1;
50
51
--disable_query_log
51
 
eval START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=$master_pos_drop_t1;
 
52
eval START SLAVE UNTIL MASTER_LOG_FILE='$master_log_file', MASTER_LOG_POS=$master_pos_drop_t1;
52
53
--enable_query_log
53
54
--source include/wait_for_slave_sql_to_stop.inc
54
55
 
55
56
# Here table should be still not deleted
56
57
SELECT * FROM t1;
57
 
--replace_result $master_pos_drop_t1 MASTER_POS_DROP_T1
58
 
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
59
 
query_vertical SHOW SLAVE STATUS;
 
58
--let $slave_param= Exec_Master_Log_Pos
 
59
--let $slave_param_value= $master_pos_drop_t1
 
60
--source include/check_slave_param.inc
60
61
 
61
62
# This should fail right after start
 
63
--replace_result 291 MASTER_LOG_POS
62
64
START SLAVE UNTIL MASTER_LOG_FILE='master-no-such-bin.000001', MASTER_LOG_POS=291;
63
65
--source include/wait_for_slave_sql_to_stop.inc
64
66
# again this table should be still not deleted
65
67
SELECT * FROM t1;
66
 
--replace_result $master_pos_drop_t1 MASTER_POS_DROP_T1
67
 
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
68
 
query_vertical SHOW SLAVE STATUS;
 
68
 
 
69
--let $slave_param= Exec_Master_Log_Pos
 
70
--let $slave_param_value= $master_pos_drop_t1
 
71
--source include/check_slave_param.inc
69
72
 
70
73
# Try replicate all up to and not including the second insert to t2;
71
74
echo START SLAVE UNTIL RELAY_LOG_FILE='slave-relay-bin.000002', RELAY_LOG_POS=relay_pos_insert1_t2;
74
77
--enable_query_log
75
78
--source include/wait_for_slave_sql_to_stop.inc
76
79
SELECT * FROM t2;
77
 
--replace_result $relay_pos_insert1_t2 RELAY_POS_INSERT1_T2 $master_pos_insert1_t2 MASTER_POS_INSERT1_T2
78
 
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
79
 
query_vertical SHOW SLAVE STATUS;
 
80
 
 
81
--let $slave_param= Exec_Master_Log_Pos
 
82
--let $slave_param_value= $master_pos_insert1_t2
 
83
--source include/check_slave_param.inc
80
84
 
81
85
# clean up
82
86
START SLAVE;
86
90
--source include/stop_slave.inc
87
91
 
88
92
# This should stop immediately as we are already there
89
 
echo START SLAVE SQL_THREAD UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=master_pos_create_t2;
 
93
echo START SLAVE SQL_THREAD UNTIL MASTER_LOG_FILE='$master_log_file', MASTER_LOG_POS=master_pos_create_t2;
90
94
--disable_query_log
91
 
eval START SLAVE SQL_THREAD UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=$master_pos_create_t2;
 
95
eval START SLAVE SQL_THREAD UNTIL MASTER_LOG_FILE='$master_log_file', MASTER_LOG_POS=$master_pos_create_t2;
92
96
--enable_query_log
93
97
let $slave_param= Until_Log_Pos;
94
98
let $slave_param_value= $master_pos_create_t2;
95
99
--source include/wait_for_slave_param.inc
96
100
--source include/wait_for_slave_sql_to_stop.inc
97
101
# here the sql slave thread should be stopped
98
 
--replace_result bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004
99
 
--replace_result $master_pos_create_t2 MASTER_POS_CREATE_T2 $master_pos_drop_t2 MASTER_POS_DROP_T2
100
 
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
101
 
query_vertical SHOW SLAVE STATUS;
 
102
--let $slave_param= Exec_Master_Log_Pos
 
103
--let $slave_param_value= $master_pos_drop_t2
 
104
--source include/check_slave_param.inc
102
105
 
103
106
#testing various error conditions
 
107
--replace_result 561 MASTER_LOG_POS
104
108
--error 1277
105
109
START SLAVE UNTIL MASTER_LOG_FILE='master-bin', MASTER_LOG_POS=561;
 
110
--replace_result 561 MASTER_LOG_POS 12 RELAY_LOG_POS
106
111
--error 1277
107
112
START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=561, RELAY_LOG_POS=12;
108
113
--error 1277
109
114
START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001';
110
115
--error 1277
111
116
START SLAVE UNTIL RELAY_LOG_FILE='slave-relay-bin.000009';
 
117
--replace_result 561 MASTER_LOG_POS
112
118
--error 1277
113
119
START SLAVE UNTIL RELAY_LOG_FILE='slave-relay-bin.000002', MASTER_LOG_POS=561;
114
120
# Warning should be given for second command
115
121
START SLAVE;
 
122
--replace_result 740 MASTER_LOG_POS
116
123
START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=740;