1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

5.2 merge

This commit is contained in:
Sergei Golubchik
2013-04-11 19:35:39 +02:00
8 changed files with 156 additions and 88 deletions

View File

@ -125,7 +125,12 @@
static int sel_cmp(Field *f,uchar *a,uchar *b,uint8 a_flag,uint8 b_flag);
static uchar is_null_string[2]= {1,0};
/*
this should be long enough so that any memcmp with a string that
starts from '\0' won't cross is_null_string boundaries, even
if the memcmp is optimized to compare 4- 8- or 16- bytes at once
*/
static uchar is_null_string[20]= {1,0};
class RANGE_OPT_PARAM;
/*

View File

@ -874,6 +874,7 @@ static int get_master_version_and_clock(MYSQL* mysql, Master_info* mi)
int err_code= 0;
MYSQL_RES *master_res= 0;
MYSQL_ROW master_row;
uint version= mysql_get_server_version(mysql) / 10000;
DBUG_ENTER("get_master_version_and_clock");
/*
@ -894,20 +895,20 @@ static int get_master_version_and_clock(MYSQL* mysql, Master_info* mi)
/*
Note the following switch will bug when we have MySQL branch 30 ;)
*/
switch (*mysql->server_version)
switch (version)
{
case '0':
case '1':
case '2':
case 0:
case 1:
case 2:
errmsg = "Master reported unrecognized MySQL version";
err_code= ER_SLAVE_FATAL_ERROR;
sprintf(err_buff, ER(err_code), errmsg);
break;
case '3':
case 3:
mi->rli.relay_log.description_event_for_queue= new
Format_description_log_event(1, mysql->server_version);
break;
case '4':
case 4:
mi->rli.relay_log.description_event_for_queue= new
Format_description_log_event(3, mysql->server_version);
break;
@ -1113,10 +1114,10 @@ maybe it is a *VERY OLD MASTER*.");
*/
/* redundant with rest of code but safer against later additions */
if (*mysql->server_version == '3')
if (version == 3)
goto err;
if (*mysql->server_version == '4')
if (version == 4)
{
master_res= NULL;
if (!mysql_real_query(mysql,
@ -1177,7 +1178,7 @@ inconsistency if replicated data deals with collation.");
This check is only necessary for 4.x masters (and < 5.0.4 masters but
those were alpha).
*/
if (*mysql->server_version == '4')
if (version == 4)
{
master_res= NULL;
if (!mysql_real_query(mysql, STRING_WITH_LEN("SELECT @@GLOBAL.TIME_ZONE")) &&