mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge branch '11.8' into 12.0
This commit is contained in:
@@ -6189,7 +6189,8 @@ void THD::reset_sub_statement_state(Sub_statement_state *backup,
|
||||
if (rpl_master_erroneous_autoinc(this))
|
||||
{
|
||||
DBUG_ASSERT(backup->auto_inc_intervals_forced.nb_elements() == 0);
|
||||
auto_inc_intervals_forced.swap(&backup->auto_inc_intervals_forced);
|
||||
backup->auto_inc_intervals_forced.copy_shallow(&auto_inc_intervals_forced);
|
||||
MEM_UNDEFINED(&auto_inc_intervals_forced, sizeof auto_inc_intervals_forced);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -6238,7 +6239,7 @@ void THD::restore_sub_statement_state(Sub_statement_state *backup)
|
||||
*/
|
||||
if (rpl_master_erroneous_autoinc(this))
|
||||
{
|
||||
backup->auto_inc_intervals_forced.swap(&auto_inc_intervals_forced);
|
||||
auto_inc_intervals_forced.copy_shallow(&backup->auto_inc_intervals_forced);
|
||||
DBUG_ASSERT(backup->auto_inc_intervals_forced.nb_elements() == 0);
|
||||
}
|
||||
#endif
|
||||
@@ -8696,16 +8697,19 @@ void mariadb_sleep_for_space(unsigned int seconds)
|
||||
{
|
||||
THD *thd= current_thd;
|
||||
PSI_stage_info old_stage;
|
||||
struct timespec abstime;
|
||||
if (!thd)
|
||||
{
|
||||
sleep(seconds);
|
||||
return;
|
||||
}
|
||||
mysql_mutex_lock(&thd->LOCK_wakeup_ready);
|
||||
set_timespec(abstime, seconds);
|
||||
mysql_mutex_lock(&thd->LOCK_wakeup_ready);
|
||||
thd->ENTER_COND(&thd->COND_wakeup_ready, &thd->LOCK_wakeup_ready,
|
||||
&stage_waiting_for_disk_space, &old_stage);
|
||||
if (!thd->killed)
|
||||
mysql_cond_wait(&thd->COND_wakeup_ready, &thd->LOCK_wakeup_ready);
|
||||
mysql_cond_timedwait(&thd->COND_wakeup_ready, &thd->LOCK_wakeup_ready,
|
||||
&abstime);
|
||||
thd->EXIT_COND(&old_stage);
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user