#At file:///home/andrei/MySQL/BZR/mysql-5.1-telco-6.2/ based on
revid:aelkin@stripped
2994 Andrei Elkin 2009-09-23
bug#47037 to port Bug@25998 fixes to telco 6.2
the 2nd patch to address 6.2 -> 6.3 possible upgrade issue.
The added ignore_server_ids param is stored as the last line in master.info on 6.2,
but on 6.3 it would be buried by some more lines that are last currently in there.
It was suggested to make the 6.2 configuration line to have the same offset
(the 18th) in 6.2 as it would be in 6.3.
Fixed with implementing the suggestion. The 6.2 master.info will have two blank
lines before the terminal one describing ignore_server_ids.
modified:
sql/rpl_mi.cc
=== modified file 'sql/rpl_mi.cc'
--- a/sql/rpl_mi.cc 2009-09-09 18:32:00 +0000
+++ b/sql/rpl_mi.cc 2009-09-23 15:48:12 +0000
@@ -137,7 +137,7 @@ enum {
/* 5.1.16 added value of master_ssl_verify_server_cert */
LINE_FOR_MASTER_SSL_VERIFY_SERVER_CERT= 15,
/* 6.0 added value of master_ignore_server_id */
- LINE_FOR_REPLICATE_IGNORE_SERVER_IDS= 16,
+ LINE_FOR_REPLICATE_IGNORE_SERVER_IDS= 18,
/* Number of lines currently used when saving master info file */
LINES_IN_MASTER_INFO= LINE_FOR_REPLICATE_IGNORE_SERVER_IDS
};
@@ -329,11 +329,22 @@ file '%s')", fname);
Starting from 6.0 list of server_id of ignorable servers might be
in the file
*/
- if (lines >= LINE_FOR_REPLICATE_IGNORE_SERVER_IDS &&
- init_dynarray_intvar_from_file(&mi->ignore_server_ids,
&mi->file))
+ if (lines >= LINE_FOR_REPLICATE_IGNORE_SERVER_IDS)
{
- sql_print_error("Failed to initialize master info ignore_server_ids");
- goto errwithmsg;
+ int blank;
+ /*
+ Precaution for merging with telco-6.3, the two blank (asserted)
+ lines are skipped.
+ */
+ init_intvar_from_file(&blank, &mi->file, 0);
+ DBUG_ASSERT(blank == 0);
+ init_intvar_from_file(&blank, &mi->file, 0);
+ DBUG_ASSERT(blank == 0);
+ if (init_dynarray_intvar_from_file(&mi->ignore_server_ids,
&mi->file))
+ {
+ sql_print_error("Failed to initialize master info ignore_server_ids");
+ goto errwithmsg;
+ }
}
}
@@ -456,7 +467,7 @@ int flush_master_info(Master_info* mi, b
my_b_seek(file, 0L);
my_b_printf(file,
- "%u\n%s\n%s\n%s\n%s\n%s\n%d\n%d\n%d\n%s\n%s\n%s\n%s\n%s\n%d\n%s\n",
+ "%u\n%s\n%s\n%s\n%s\n%s\n%d\n%d\n%d\n%s\n%s\n%s\n%s\n%s\n%d\n\n\n%s\n",
LINES_IN_MASTER_INFO,
mi->master_log_name, llstr(mi->master_log_pos, lbuf),
mi->host, mi->user,
Attachment: [text/bzr-bundle] bzr/aelkin@mysql.com-20090923154812-xvqxuk5ja6kl4owy.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-6.2 branch (aelkin:2994) Bug#47037 | Andrei Elkin | 23 Sep 2009 |