~chuck-bell/mysql-utilities/mysql-utilities

« back to all changes in this revision

Viewing changes to mysql-test/t/replicate_errors.py

  • Committer: chuck.bell at oracle
  • Date: 2011-09-29 14:14:38 UTC
  • Revision ID: chuck.bell@oracle.com-20110929141438-clzfl7m2769wt2jm
WL#5983 : allow user to specify binary log file and position (mysqlreplicate)

This patch adds new features to mysqlreplicate to permit starting replication
from the beginning, starting from a specific log file, and starting from a
specific log file and position.

Show diffs side-by-side

added added

removed removed

Lines of Context:
149
149
 
150
150
        self.server1.exec_query("SET GLOBAL server_id = %s" % slave_serverid)
151
151
 
 
152
        comment = "Test case 10 - --master-log-pos but no log file"
 
153
        cmd_opts = "--master-log-pos=96 "
 
154
        res = mutlib.System_test.run_test_case(self, 2, cmd+cmd_opts, comment)
 
155
        if not res:
 
156
            raise MUTLibError("%s: failed" % comment)
 
157
 
 
158
        comment = "Test case 11 - --master-log-file and --start-from-beginning"
 
159
        cmd_opts = "--master-log-file='mysql_bin.00005' --start-from-beginning"
 
160
        res = mutlib.System_test.run_test_case(self, 2, cmd+cmd_opts, comment)
 
161
        if not res:
 
162
            raise MUTLibError("%s: failed" % comment)
 
163
 
 
164
        comment = "Test case 12 - --master-log-pos and --start-from-beginning"
 
165
        cmd_opts = "--master-log-pos=96 --start-from-beginning"
 
166
        res = mutlib.System_test.run_test_case(self, 2, cmd+cmd_opts, comment)
 
167
        if not res:
 
168
            raise MUTLibError("%s: failed" % comment)
 
169
 
 
170
        comment = "Test case 13 - --master-log-file+pos and --start-from-beginning"
 
171
        cmd_opts = "--master-log-pos=96 --start-from-beginning "
 
172
        cmd_opts += "--master-log-file='mysql_bin.00005'"
 
173
        res = mutlib.System_test.run_test_case(self, 2, cmd+cmd_opts, comment)
 
174
        if not res:
 
175
            raise MUTLibError("%s: failed" % comment)
 
176
 
152
177
        # Mask known platform-dependent lines
153
178
        self.mask_result("Error 2005:", "(1", '#######')
154
179
        self.replace_result("ERROR: Query failed. 1227: Access denied;",