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

Bug #26418: Slave out of sync after

CREATE/DROP TEMPORARY TABLE + ROLLBACK on master

The transaction ability of the storage engines of
the tables on the replication master and the replication
slave must generally be the same.
When the storage engine type of the slave is 
non-transactional then transactions on the master that 
mix update of transactional and non-transactional tables
should be avoided because they will cause inconsistency of
the data between the master's transactional table and the
slave's non-transactional table.

The effect described by this bug is actually expected.
A detailed test case is added (to be merged later to
the updated rpl_ddl.test), as there was no coverage 
by the existing tests. 
Some code cleanup is also added by this change.
This commit is contained in:
gkodinov/kgeorge@magare.gmz
2007-06-19 14:27:53 +03:00
parent 16a7a45bdc
commit bef15b279b
14 changed files with 168 additions and 150 deletions

View File

@ -2504,12 +2504,7 @@ end_with_restore_list:
/*
Presumably, REPAIR and binlog writing doesn't require synchronization
*/
if (mysql_bin_log.is_open())
{
thd->clear_error(); // No binlog error generated
thd->binlog_query(THD::STMT_QUERY_TYPE,
thd->query, thd->query_length, 0, FALSE);
}
write_bin_log(thd, TRUE, thd->query, thd->query_length);
}
select_lex->table_list.first= (uchar*) first_table;
lex->query_tables=all_tables;
@ -2539,12 +2534,7 @@ end_with_restore_list:
/*
Presumably, ANALYZE and binlog writing doesn't require synchronization
*/
if (mysql_bin_log.is_open())
{
thd->clear_error(); // No binlog error generated
thd->binlog_query(THD::STMT_QUERY_TYPE,
thd->query, thd->query_length, 0, FALSE);
}
write_bin_log(thd, TRUE, thd->query, thd->query_length);
}
select_lex->table_list.first= (uchar*) first_table;
lex->query_tables=all_tables;
@ -2566,12 +2556,7 @@ end_with_restore_list:
/*
Presumably, OPTIMIZE and binlog writing doesn't require synchronization
*/
if (mysql_bin_log.is_open())
{
thd->clear_error(); // No binlog error generated
thd->binlog_query(THD::STMT_QUERY_TYPE,
thd->query, thd->query_length, 0, FALSE);
}
write_bin_log(thd, TRUE, thd->query, thd->query_length);
}
select_lex->table_list.first= (uchar*) first_table;
lex->query_tables=all_tables;
@ -3471,11 +3456,7 @@ end_with_restore_list:
*/
if (!lex->no_write_to_binlog && write_to_binlog)
{
if (mysql_bin_log.is_open())
{
thd->binlog_query(THD::STMT_QUERY_TYPE,
thd->query, thd->query_length, 0, FALSE);
}
write_bin_log(thd, FALSE, thd->query, thd->query_length);
}
send_ok(thd);
}