=== modified file 'sql/slave.cc'
--- sql/slave.cc	2009-10-16 10:29:42 +0000
+++ sql/slave.cc	2009-12-05 11:39:07 +0000
@@ -1067,128 +1067,6 @@
     master_res= NULL;
   }
 
-  /*
-    Check that the master's global character_set_server and ours are the same.
-    Not fatal if query fails (old master?).
-    Note that we don't check for equality of global character_set_client and
-    collation_connection (neither do we prevent their setting in
-    set_var.cc). That's because from what I (Guilhem) have tested, the global
-    values of these 2 are never used (new connections don't use them).
-    We don't test equality of global collation_database either as it's is
-    going to be deprecated (made read-only) in 4.1 very soon.
-    The test is only relevant if master < 5.0.3 (we'll test only if it's older
-    than the 5 branch; < 5.0.3 was alpha...), as >= 5.0.3 master stores
-    charset info in each binlog event.
-    We don't do it for 3.23 because masters <3.23.50 hang on
-    SELECT @@unknown_var (BUG#7965 - see changelog of 3.23.50). So finally we
-    test only if master is 4.x.
-  */
-
-  /* redundant with rest of code but safer against later additions */
-  if (*mysql->server_version == '3')
-    goto err;
-
-  if (*mysql->server_version == '4')
-  {
-    master_res= NULL;
-    if (!mysql_real_query(mysql,
-                          STRING_WITH_LEN("SELECT @@GLOBAL.COLLATION_SERVER")) &&
-        (master_res= mysql_store_result(mysql)) &&
-        (master_row= mysql_fetch_row(master_res)))
-    {
-      if (strcmp(master_row[0], global_system_variables.collation_server->name))
-      {
-        errmsg= "The slave I/O thread stops because master and slave have \
-different values for the COLLATION_SERVER global variable. The values must \
-be equal for the Statement-format replication to work";
-        err_code= ER_SLAVE_FATAL_ERROR;
-        sprintf(err_buff, ER(err_code), errmsg);
-        goto err;
-      }
-    }
-    else if (is_network_error(mysql_errno(mysql)))
-    {
-      mi->report(WARNING_LEVEL, mysql_errno(mysql),
-                 "Get master COLLATION_SERVER failed with error: %s", mysql_error(mysql));
-      goto network_err;
-    }
-    else if (mysql_errno(mysql) != ER_UNKNOWN_SYSTEM_VARIABLE)
-    {
-      /* Fatal error */
-      errmsg= "The slave I/O thread stops because a fatal error is encountered \
-when it try to get the value of COLLATION_SERVER global variable from master.";
-      err_code= mysql_errno(mysql);
-      sprintf(err_buff, "%s Error: %s", errmsg, mysql_error(mysql));
-      goto err;
-    }
-    else
-      mi->report(WARNING_LEVEL, ER_UNKNOWN_SYSTEM_VARIABLE,
-                 "Unknown system variable 'COLLATION_SERVER' on master, \
-maybe it is a *VERY OLD MASTER*. *NOTE*: slave may experience \
-inconsistency if replicated data deals with collation.");
-
-    if (master_res)
-    {
-      mysql_free_result(master_res);
-      master_res= NULL;
-    }
-  }
-
-  /*
-    Perform analogous check for time zone. Theoretically we also should
-    perform check here to verify that SYSTEM time zones are the same on
-    slave and master, but we can't rely on value of @@system_time_zone
-    variable (it is time zone abbreviation) since it determined at start
-    time and so could differ for slave and master even if they are really
-    in the same system time zone. So we are omiting this check and just
-    relying on documentation. Also according to Monty there are many users
-    who are using replication between servers in various time zones. Hence
-    such check will broke everything for them. (And now everything will
-    work for them because by default both their master and slave will have
-    'SYSTEM' time zone).
-    This check is only necessary for 4.x masters (and < 5.0.4 masters but
-    those were alpha).
-  */
-  if (*mysql->server_version == '4')
-  {
-    master_res= NULL;
-    if (!mysql_real_query(mysql, STRING_WITH_LEN("SELECT @@GLOBAL.TIME_ZONE")) &&
-        (master_res= mysql_store_result(mysql)) &&
-        (master_row= mysql_fetch_row(master_res)))
-    {
-      if (strcmp(master_row[0],
-                 global_system_variables.time_zone->get_name()->ptr()))
-      {
-        errmsg= "The slave I/O thread stops because master and slave have \
-different values for the TIME_ZONE global variable. The values must \
-be equal for the Statement-format replication to work";
-        err_code= ER_SLAVE_FATAL_ERROR;
-        sprintf(err_buff, ER(err_code), errmsg);
-        goto err;
-      }
-    }
-    else if (is_network_error(mysql_errno(mysql)))
-    {
-      mi->report(WARNING_LEVEL, mysql_errno(mysql),
-                 "Get master TIME_ZONE failed with error: %s", mysql_error(mysql));
-      goto network_err;
-    } 
-    else
-    {
-      /* Fatal error */
-      errmsg= "The slave I/O thread stops because a fatal error is encountered \
-when it try to get the value of TIME_ZONE global variable from master.";
-      err_code= mysql_errno(mysql);
-      sprintf(err_buff, "%s Error: %s", errmsg, mysql_error(mysql));
-      goto err;
-    }
-    if (master_res)
-    {
-      mysql_free_result(master_res);
-      master_res= NULL;
-    }
-  }
-
 err:
   if (errmsg)
   {