mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge 10.3 into 10.4
This commit is contained in:
@ -1317,7 +1317,7 @@ bool Sql_cmd_analyze_table::execute(THD *thd)
|
||||
"analyze", lock_type, 1, 0, 0, 0,
|
||||
&handler::ha_analyze, 0);
|
||||
/* ! we write after unlocking the table */
|
||||
if (!res && !m_lex->no_write_to_binlog)
|
||||
if (!res && !m_lex->no_write_to_binlog && (!opt_readonly || thd->slave_thread))
|
||||
{
|
||||
/*
|
||||
Presumably, ANALYZE and binlog writing doesn't require synchronization
|
||||
@ -1377,7 +1377,7 @@ bool Sql_cmd_optimize_table::execute(THD *thd)
|
||||
"optimize", TL_WRITE, 1, 0, 0, 0,
|
||||
&handler::ha_optimize, 0);
|
||||
/* ! we write after unlocking the table */
|
||||
if (!res && !m_lex->no_write_to_binlog)
|
||||
if (!res && !m_lex->no_write_to_binlog && (!opt_readonly || thd->slave_thread))
|
||||
{
|
||||
/*
|
||||
Presumably, OPTIMIZE and binlog writing doesn't require synchronization
|
||||
@ -1413,7 +1413,7 @@ bool Sql_cmd_repair_table::execute(THD *thd)
|
||||
&handler::ha_repair, &view_repair);
|
||||
|
||||
/* ! we write after unlocking the table */
|
||||
if (!res && !m_lex->no_write_to_binlog)
|
||||
if (!res && !m_lex->no_write_to_binlog && (!opt_readonly || thd->slave_thread))
|
||||
{
|
||||
/*
|
||||
Presumably, REPAIR and binlog writing doesn't require synchronization
|
||||
|
Reference in New Issue
Block a user