1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

FLUSH TABLES WITH READ LOCK should block writes to binlog too

This commit is contained in:
serg@serg.mylan
2005-04-12 17:15:54 +02:00
parent a4025168c7
commit d4a0becc8a
5 changed files with 64 additions and 21 deletions

View File

@ -4414,10 +4414,19 @@ unsent_create_error:
else
if (thd->transaction.xa_state == XA_PREPARED && thd->lex->xa_opt == XA_NONE)
{
if (ha_commit_one_phase(thd, 1))
if (wait_if_global_read_lock(thd, 0, 0))
{
ha_rollback(thd);
my_error(ER_XAER_RMERR, MYF(0));
}
else
send_ok(thd);
{
if (ha_commit_one_phase(thd, 1))
my_error(ER_XAER_RMERR, MYF(0));
else
send_ok(thd);
start_waiting_global_read_lock(thd);
}
}
else
{