Commit 4284a800 authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi

Last changes after merge with 3.23.47

parent 836f1608
...@@ -448,7 +448,7 @@ int STDCALL mysql_server_init(int argc, char **argv, char **groups) ...@@ -448,7 +448,7 @@ int STDCALL mysql_server_init(int argc, char **argv, char **groups)
#ifdef USE_REGEX #ifdef USE_REGEX
regex_init(); regex_init();
#endif #endif
if (use_temp_pool && bitmap_init(&temp_pool,1024)) if (use_temp_pool && bitmap_init(&temp_pool,1024,1))
{ {
mysql_server_end(); mysql_server_end();
return 1; return 1;
......
...@@ -5,6 +5,12 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; ...@@ -5,6 +5,12 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
slave start; slave start;
create table t1(n int); create table t1(n int);
insert into t1 values(get_lock("lock",2)); 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); select get_lock("lock",3);
get_lock("lock",3) get_lock("lock",3)
1 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 n
1 1
2 2
......
...@@ -1529,6 +1529,12 @@ void Execute_load_log_event::pack_info(String* packet) ...@@ -1529,6 +1529,12 @@ void Execute_load_log_event::pack_info(String* packet)
#endif #endif
#ifndef MYSQL_CLIENT #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 Query_log_event::exec_event(struct st_master_info* mi)
{ {
int expected_error,actual_error = 0; int expected_error,actual_error = 0;
...@@ -1551,11 +1557,13 @@ int Query_log_event::exec_event(struct st_master_info* mi) ...@@ -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 sanity check to make sure the master did not get a really bad
error on the query 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); mysql_parse(thd, thd->query, q_len);
if (expected_error != 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\ const char* errmsg = "Slave: did not get the expected error\
running query from master - expected: '%s' (%d), got '%s' (%d)"; 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) ...@@ -1565,7 +1573,8 @@ int Query_log_event::exec_event(struct st_master_info* mi)
actual_error); actual_error);
thd->query_error = 1; 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; thd->query_error = 0;
*last_slave_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\ ...@@ -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) 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