1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

MDEV-33813 ERROR 1021 (HY000): Disk full (./org/test1.MAI); waiting for someone to free some space

Fixed that internal temporary tables are not waiting for freed disk space.

Other things:
- 'kill id' will now kill a query waiting for free disk space instantly.
  Before it could take up to 60 seconds for the kill would be noticed.
- Fixed that sorting one index is not using MY_WAIT_IF_FULL for temp files.
- Fixed bug where share->write_flag set MY_WAIT_IF_FULL for temp files.

It is quite hard to do a test case for this. Instead I tested all
combinations interactively.
This commit is contained in:
Monty
2024-04-09 20:56:57 +03:00
parent 33af5575a9
commit 3655cefc42
11 changed files with 64 additions and 3 deletions

View File

@@ -8323,6 +8323,34 @@ wait_for_commit::unregister_wait_for_prior_commit2()
mysql_mutex_unlock(&LOCK_wait_commit);
}
/*
Wait # seconds or until someone sends a signal (through kill)
Note that this must have same prototype as my_sleep_for_space()
*/
C_MODE_START
void mariadb_sleep_for_space(unsigned int seconds)
{
THD *thd= current_thd;
PSI_stage_info old_stage;
if (!thd)
{
sleep(seconds);
return;
}
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);
thd->EXIT_COND(&old_stage);
return;
}
C_MODE_END
bool Discrete_intervals_list::append(ulonglong start, ulonglong val,
ulonglong incr)