summaryrefslogtreecommitdiff
path: root/sql/slave.cc
diff options
context:
space:
mode:
authorAndrei Elkin <aelkin@mysql.com>2008-06-19 21:47:59 +0300
committerAndrei Elkin <aelkin@mysql.com>2008-06-19 21:47:59 +0300
commite66ba2a74b59f6cb1b9fa876e75ce44fba7c1aee (patch)
tree11737c99f6b55ce09a940cf41b895e0764b08d3c /sql/slave.cc
parent0a68dd1d3fa8ddb7f16b24b8871eb94bbd37a9c4 (diff)
downloadmariadb-git-e66ba2a74b59f6cb1b9fa876e75ce44fba7c1aee.tar.gz
Bug#36443 Server crashes when executing insert when insert trigger on table
The crash appeared to be a result of allocating an instance of Discrete_interval automatically that that was referred in out-of-declaration scope. Fixed with correcting backing up and restoring scheme of auto_inc_intervals_forced, introduced by bug#33029, by means of shallow copying; added simulation code that forces executing those fixes of the former bug that targeted at master-and-slave having incompatible bug#33029-prone versions. mysql-test/suite/bugs/r/rpl_bug33029.result: new results file mysql-test/suite/bugs/t/rpl_bug33029.test: test merely checks no crash happens on slave. sql/slave.cc: forcing to execute special logics implemented for bug#33029 if simulate_bug33029 the debug option is set. sql/sql_class.cc: swaps of backed and the actual auto_inc_intervals_forced basing on shallow coping. sql/structs.h: Removing the deep _copy() and methods associated with it; adding methods to Discrete_intervals_list: private `=', copy constructor to prevent using; private set_members(); public copy_shallow(), swap(), get_{head, tail, current}(); empty_no_free() through set_members().
Diffstat (limited to 'sql/slave.cc')
-rw-r--r--sql/slave.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/slave.cc b/sql/slave.cc
index dcc808625c0..a6d7758c8de 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -4136,6 +4136,7 @@ bool rpl_master_erroneous_autoinc(THD *thd)
if (active_mi && active_mi->rli.sql_thd == thd)
{
Relay_log_info *rli= &active_mi->rli;
+ DBUG_EXECUTE_IF("simulate_bug33029", return TRUE;);
return rpl_master_has_bug(rli, 33029, FALSE);
}
return FALSE;