Commit b63538f1 authored by unknown's avatar unknown

Last changes after merge with 3.23.47


libmysqld/lib_sql.cc:
  Fix for new bitmap
mysql-test/r/rpl_get_lock.result:
  Fix results after merge
mysql-test/r/rpl_skip_error.result:
  Fix results after merge
sql/log_event.cc:
  Finish merge of slave.cc
sql/slave.cc:
  Finish merge
parent 63e4dec2
......@@ -448,7 +448,7 @@ int STDCALL mysql_server_init(int argc, char **argv, char **groups)
#ifdef USE_REGEX
regex_init();
#endif
if (use_temp_pool && bitmap_init(&temp_pool,1024))
if (use_temp_pool && bitmap_init(&temp_pool,1024,1))
{
mysql_server_end();
return 1;
......
......@@ -5,6 +5,12 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
slave start;
create table t1(n int);
insert into t1 values(get_lock("lock",2));
select get_lock("lock",2);
get_lock("lock",2)
1
select release_lock("lock");
release_lock("lock")
1
select get_lock("lock",3);
get_lock("lock",3)
1
......
slave stop;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
slave start;
drop table if exists t1;
create table t1 (n int not null primary key);
insert into t1 values (1);
insert into t1 values (1);
insert into t1 values (2),(3);
select * from t1;
n
1
2
......
......@@ -1529,6 +1529,12 @@ void Execute_load_log_event::pack_info(String* packet)
#endif
#ifndef MYSQL_CLIENT
int ignored_error_code(int err_code)
{
return use_slave_mask && bitmap_is_set(&slave_error_mask, err_code);
}
int Query_log_event::exec_event(struct st_master_info* mi)
{
int expected_error,actual_error = 0;
......@@ -1551,11 +1557,13 @@ int Query_log_event::exec_event(struct st_master_info* mi)
sanity check to make sure the master did not get a really bad
error on the query
*/
if (!check_expected_error(thd, (expected_error = error_code)))
if (ignored_error_code((expected_error=error_code)) ||
!check_expected_error(thd, expected_error))
{
mysql_parse(thd, thd->query, q_len);
if (expected_error !=
(actual_error = thd->net.last_errno) && expected_error)
(actual_error = thd->net.last_errno) && expected_error &&
!ignored_error_code(actual_error))
{
const char* errmsg = "Slave: did not get the expected error\
running query from master - expected: '%s' (%d), got '%s' (%d)";
......@@ -1565,7 +1573,8 @@ int Query_log_event::exec_event(struct st_master_info* mi)
actual_error);
thd->query_error = 1;
}
else if (expected_error == actual_error)
else if (expected_error == actual_error ||
ignored_error_code(actual_error))
{
thd->query_error = 0;
*last_slave_error = 0;
......
......@@ -1037,10 +1037,6 @@ point. If you are sure that your master is ok, run this query manually on the\
}
}
inline int ignored_error_code(int err_code)
{
return use_slave_mask && bitmap_is_set(&slave_error_mask, err_code);
}
static int exec_event(THD* thd, NET* net, MASTER_INFO* mi, int event_len)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment