mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
post-merge fixes, including slave-skip-errors backport
fixed too quick timeout in mysql-test-run which caused a race with the new server getting started before the old one completely finished shutdown. This should fix the pid warning we've been getting as well as inconsistent results when running tests with the manager libmysqld/lib_sql.cc: post-merge fix mysql-test/mysql-test-run.sh: fixed start/stop timeout and cleanup of log directory mysql-test/r/rpl000014.result: post-merge fix mysql-test/r/rpl000015.result: post-merge fix mysql-test/r/rpl000016.result: post-merge fix mysql-test/r/rpl_log.result: post-merge fix sql/log_event.cc: post-merge fix sql/slave.cc: post-merge fix sql/slave.h: post-merge fix sql/sql_class.h: post-merge fix tools/mysqlmanager.c: added debug message
This commit is contained in:
33
sql/slave.cc
33
sql/slave.cc
@ -26,6 +26,9 @@
|
||||
#include <my_dir.h>
|
||||
#include <assert.h>
|
||||
|
||||
bool use_slave_mask = 0;
|
||||
MY_BITMAP slave_error_mask;
|
||||
|
||||
volatile bool slave_sql_running = 0, slave_io_running = 0;
|
||||
char* slave_load_tmpdir = 0;
|
||||
MASTER_INFO main_mi;
|
||||
@ -219,6 +222,36 @@ err:
|
||||
return (*errmsg) ? 1 : 0;
|
||||
}
|
||||
|
||||
/* called from get_options() in mysqld.cc on start-up */
|
||||
void init_slave_skip_errors(char* arg)
|
||||
{
|
||||
char* p;
|
||||
my_bool last_was_digit = 0;
|
||||
if (bitmap_init(&slave_error_mask,MAX_SLAVE_ERROR,0))
|
||||
{
|
||||
fprintf(stderr, "Badly out of memory, please check your system status\n");
|
||||
exit(1);
|
||||
}
|
||||
use_slave_mask = 1;
|
||||
for (;isspace(*arg);++arg)
|
||||
/* empty */;
|
||||
if (!my_casecmp(arg,"all",3))
|
||||
{
|
||||
bitmap_set_all(&slave_error_mask);
|
||||
return;
|
||||
}
|
||||
for (p= arg ; *p; )
|
||||
{
|
||||
long err_code;
|
||||
if (!(p= str2int(p, 10, 0, LONG_MAX, &err_code)))
|
||||
break;
|
||||
if (err_code < MAX_SLAVE_ERROR)
|
||||
bitmap_set_bit(&slave_error_mask,(uint)err_code);
|
||||
while (!isdigit(*p) && *p)
|
||||
p++;
|
||||
}
|
||||
}
|
||||
|
||||
// we assume we have a run lock on rli and that the both slave thread
|
||||
// are not running
|
||||
int purge_relay_logs(RELAY_LOG_INFO* rli, bool just_reset, const char** errmsg)
|
||||
|
Reference in New Issue
Block a user