Commit 23176f8f authored by Tatiana A. Nurnberg's avatar Tatiana A. Nurnberg
Browse files

auto merge

parents 5128b787 3f33b44a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ AC_CANONICAL_SYSTEM
#
# When changing major version number please also check switch statement
# in mysqlbinlog::check_master_version().
AM_INIT_AUTOMAKE(mysql, 5.1.26-rc)
AM_INIT_AUTOMAKE(mysql, 5.1.27)
AM_CONFIG_HEADER([include/config.h:config.h.in])

PROTOCOL_VERSION=10
+15 −0
Original line number Diff line number Diff line
stop slave;
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;
start slave;
create table `t1` (`id` int not null auto_increment primary key);
create trigger `trg` before insert on `t1` for each row begin end;
set @@global.debug="+d,simulate_bug33029";
stop slave;
start slave;
insert into `t1` values ();
select * from t1;
id
1
+25 −0
Original line number Diff line number Diff line
#
# Bug #36443 Server crashes when executing insert when insert trigger on table
#
# Emulating the former bug#33029 situation to see that there is no crash anymore.
# 


source include/master-slave.inc;

create table `t1` (`id` int not null auto_increment primary key);
create trigger `trg` before insert on `t1` for each row begin end;

sync_slave_with_master;
set @@global.debug="+d,simulate_bug33029";

stop slave;
start slave;

connection master;

insert into `t1` values ();

sync_slave_with_master;
select * from t1;
+1 −0
Original line number Diff line number Diff line
@@ -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;
+4 −4
Original line number Diff line number Diff line
@@ -2882,8 +2882,8 @@ void THD::reset_sub_statement_state(Sub_statement_state *backup,
   */
  if (rpl_master_erroneous_autoinc(this))
  {
    backup->auto_inc_intervals_forced= auto_inc_intervals_forced;
    auto_inc_intervals_forced.empty();
    DBUG_ASSERT(backup->auto_inc_intervals_forced.nb_elements() == 0);
    auto_inc_intervals_forced.swap(&backup->auto_inc_intervals_forced);
  }
#endif
  
@@ -2931,8 +2931,8 @@ void THD::restore_sub_statement_state(Sub_statement_state *backup)
   */
  if (rpl_master_erroneous_autoinc(this))
  {
    auto_inc_intervals_forced= backup->auto_inc_intervals_forced;
    backup->auto_inc_intervals_forced.empty();
    backup->auto_inc_intervals_forced.swap(&auto_inc_intervals_forced);
    DBUG_ASSERT(backup->auto_inc_intervals_forced.nb_elements() == 0);
  }
#endif

Loading