mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user