From b2500829a3685d5546658eb969ff53a36872cdaf Mon Sep 17 00:00:00 2001 From: "guilhem@mysql.com" <> Date: Thu, 9 Oct 2003 17:40:38 +0200 Subject: [PATCH] Make the slave die if master is 5.0. Indeed, 5.0 masters send a Format_description_log_event (or maybe it will be named Description_log_event) which is not recognized by 4.0, so a 4.0 can't be a slave of 5.0. We detect it early to produce a helpful message instead of "corrupted relay log" later. --- sql/slave.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sql/slave.cc b/sql/slave.cc index 10d451a88bc..12698c8eda4 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -1017,11 +1017,12 @@ static int check_master_version(MYSQL* mysql, MASTER_INFO* mi) BINLOG_FORMAT_323_GEQ_57 ; break; case '4': - case '5': mi->old_format = BINLOG_FORMAT_CURRENT; break; default: - errmsg = "Master reported unrecognized MySQL version"; + /* 5.0 is not supported */ + errmsg = "Master reported an unrecognized MySQL version. Note that 4.0 \ +slaves can't replicate a 5.0 or newer master."; break; }