1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Added timeout for wait_for_master_pos

Fixed comparision of log-binary name to handle comparison when file name extension wraps from .999 to .1000
Don't replicate CREATE/DROP DATABASE if wild_xxx_table=database.% is used.
This commit is contained in:
monty@mashka.mysql.fi
2003-01-25 15:07:51 +02:00
parent 9ec97f2c08
commit fa7a94ed14
14 changed files with 320 additions and 67 deletions

View File

@@ -925,18 +925,17 @@ int cmp_master_pos(const char* log_file_name1, ulonglong log_pos1,
const char* log_file_name2, ulonglong log_pos2)
{
int res;
/*
TODO: Change compare function to work with file name of type
'.999 and .1000'
*/
uint log_file_name1_len= strlen(log_file_name1);
uint log_file_name2_len= strlen(log_file_name2);
if ((res = strcmp(log_file_name1, log_file_name2)))
return res;
if (log_pos1 > log_pos2)
return 1;
else if (log_pos1 == log_pos2)
return 0;
return -1;
// We assume that both log names match up to '.'
if (log_file_name1_len == log_file_name2_len)
{
if ((res= strcmp(log_file_name1, log_file_name2)))
return res;
return (log_pos1 < log_pos2) ? -1 : (log_pos1 == log_pos2) ? 0 : 1;
}
return ((log_file_name1_len < log_file_name2_len) ? -1 : 1);
}