mirror of
https://github.com/MariaDB/server.git
synced 2025-07-18 23:03:28 +03:00
read-only slave using statement replication should replicate tmp tables
Relates to MDEV-17863 DROP TEMPORARY TABLE creates a transaction in binary log on read only server Other things: - Fixed that insert into normal_table select from tmp_table is replicated as row events if tmp_table doesn't exists on slave.
This commit is contained in:
@ -5217,7 +5217,7 @@ bool mysql_create_table(THD *thd, TABLE_LIST *create_table,
|
||||
err:
|
||||
/* In RBR or readonly server we don't need to log CREATE TEMPORARY TABLE */
|
||||
if (!result && create_info->tmp_table() &&
|
||||
(thd->is_current_stmt_binlog_format_row() || opt_readonly))
|
||||
(thd->is_current_stmt_binlog_format_row() || (opt_readonly && !thd->slave_thread)))
|
||||
{
|
||||
/* Note that table->s->table_creation_was_logged is not set! */
|
||||
DBUG_RETURN(result);
|
||||
|
Reference in New Issue
Block a user