|
bk commit into 3.23 tree: msg#00381db.mysql.devel
Below is the list of changes that have just been committed into a local 3.23 repository of guilhem. When guilhem does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://www.mysql.com/doc/I/n/Installing_source_tree.html ChangeSet 1.1374 03/04/27 22:23:50 guilhem@xxxxxxxxx +1 -0 Instead of looking like working (bug #198), replication between a 3.23 slave and 4.0 master should frankly stop. Here we detect 4.0 masters in the 3.23 slave code when we see a strange Rotate event, and in that case we print an error and stop sql/slave.cc 1.139 03/04/27 22:23:49 guilhem@xxxxxxxxx +19 -0 Instead of looking like working (bug #198), replication between a 3.23 slave and 4.0 master should frankly stop. Here we detect 4.0 masters in the 3.23 slave code when we see a strange Rotate event, and in that case we print an error and stop # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: guilhem # Host: gbichot.local # Root: /home/mysql_src/mysql-3.23 --- 1.138/sql/slave.cc Mon Apr 7 20:37:24 2003 +++ 1.139/sql/slave.cc Sun Apr 27 22:23:49 2003 @@ -1216,6 +1216,25 @@ Rotate_log_event* rev = (Rotate_log_event*)ev; int ident_len = rev->ident_len; pthread_mutex_lock(&mi->lock); + /* + If the master is 4.0, he has an incompatible binlog format, which we + cannot read. We always can detect this in _fake_ Rotate events, where we + see zeros at the beginning of the expected binlog's filename (this is + because 4.0 _fake_ Rotate events have zeros in the 'log_pos' and 'flags' + parts of the event header). + Consider the following test as a sanity check, which must always pass, + and which has the good side effect of catching 4.0 masters. + */ + if (!ident_len || !(rev->new_log_ident[0])) + { + sql_print_error("Slave: could not parse Rotate event; it *might* be \ +that your master's version is 4.0 or newer, which cannot be replicated by \ +3.23 slaves (in that case you need to upgrade your slave to 4.0 or newer)"); + delete ev; + pthread_cond_broadcast(&mi->cond); + pthread_mutex_unlock(&mi->lock); + return 1; + } memcpy(mi->log_file_name, rev->new_log_ident,ident_len ); mi->log_file_name[ident_len] = 0; mi->pos = 4; // skip magic number -- MySQL Internals Mailing List For list archives: http://lists.mysql.com/internals To unsubscribe: http://lists.mysql.com/internals?unsub=gcdmd-internals@xxxxxxxxxxx |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | bk commit into 4.0 tree (1.1475): 00381, monty |
|---|---|
| Next by Date: | bk commit into 4.0 tree (1.1477): 00381, guilhem |
| Previous by Thread: | bk commit into 3.23 treei: 00381, monty |
| Next by Thread: | bk commit into 3.23 tree: 00381, Sinisa |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |