mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
db2d812d1b
"EE_ error codes (EE_DELETE, EE_WRITE) end up in the binlog, making slave stop". The problem was that during execution of the command on the master, an error can occur (for example, not space left on device, then mysqld waits and when there is space it completes successfully: so finally it worked but the error EE_WRITE remains in thd->net.last_errno and thd->net.last_error). To know if finally the command succeeded, we test the 'error' variable in every place, and if it shows no failure we reset thd->net.last_err* using the function THD::clear_error() which is backported from 4.1. A new test to see if now only real errors get to the binlog (note: the test uses "rm"). Also a bit of memory free/alloc saving in log_event.cc (do not free the whole mem_root after every query in the slave SQL thread: we can keep the initial block of it; which will be freed when the thread terminates).
16 lines
403 B
Text
16 lines
403 B
Text
slave stop;
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
reset master;
|
|
reset slave;
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
slave start;
|
|
create table t1 (a int) type=myisam;
|
|
flush tables;
|
|
drop table t1;
|
|
create table t1 (a int, unique(a)) type=myisam;
|
|
set sql_log_bin=0;
|
|
insert into t1 values(2);
|
|
set sql_log_bin=1;
|
|
insert into t1 values(1),(2);
|
|
Duplicate entry '2' for key 1
|
|
drop table t1;
|