Bug #53452 | Inconsistent behavior of binlog_direct_non_transactional_updates with temp table | ||
---|---|---|---|
Submitted: | 5 May 2010 23:40 | Modified: | 2 Sep 2010 14:14 |
Reporter: | Elena Stepanova | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S3 (Non-critical) |
Version: | 5.6.99-m4, 5.5-m3 | OS: | Any |
Assigned to: | Alfranio Tavares Correia Junior | CPU Architecture: | Any |
[5 May 2010 23:40]
Elena Stepanova
[6 May 2010 15:11]
Alfranio Tavares Correia Junior
Hi Elena, The bug is in case #2: START TRANSACTION; INSERT INTO t_myisam SELECT * FROM t_innodb; # Insert is written to binlog COMMIT; # No further changes in binlog This was supposed to generate the following entries: START TRANSACTION; INSERT INTO t_myisam SELECT * FROM t_innodb; # Nothing written into binlog COMMIT; # Insert is written into binlog See another example to understand the reason: -- EXECUTION --: BEGIN; INSERT INTO t_innodb VALUES (...); INSERT INTO t_myisam SELECT * FROM t_innodb; COMMIT; -- BINARY LOG --: BEGIN; INSERT INTO myisam_t SELECT * FROM innodb_t; COMMIT; BEGIN; INSERT INTO innodb_t VALUES (...); COMMIT; This clearly will make the slaves go out of sync. Cheers.
[6 May 2010 15:33]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/107676 3036 Alfranio Correia 2010-05-06 BUG#53452 Inconsistent behavior of binlog_direct_non_transactional_updates with temp table When the binary logging format is STATEMENT, a mixed statement (i.e. a statement that accesses nontransactional table as well as transactional or temporary table, and writes to any of them) must be written to the binary log upon commit the on-going transaction. Unfortunately, the following statement was not following this rule thus making slaves to go out of sync: INSERT INTO myisam_t SELECT * FROM innodb_t. To fix the problem, we introduced a flag that forces this rule when there is a mixed statement.
[7 Jul 2010 0:29]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/112982 3086 Alfranio Correia 2010-07-07 BUG#53452 Inconsistent behavior of binlog_direct_non_transactional_updates with temp table This fix improves and clarifies the behavior of the binlog_direct_non_transactional_updates by writing directly to the binary log any statement that changes a non-transactional table. Before the patch, . a mixed statement that updated both a transactional or non-transactional table was kept in the trx-cache. . a mixed statment that updated a non-transactional table and read from a temporary table was kept in the trx-cache if the trx-cache was not empty or the temporary table was transactional. @ mysql-test/suite/rpl/r/rpl_concurrency_error.result Updated test case. @ mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result Updated test case. @ mysql-test/suite/rpl/r/rpl_trigger.result Updated test case. @ mysql-test/suite/rpl/t/rpl_trigger.test Updated test case by setting binlog_direct_non_transactional_updates = OFF otherwise the slave would diverge. @ sql/log.cc Changed the binlog_rollback and use_trans_cache functions. @ sql/log_event.cc Reorganize the code to make it clear.
[13 Jul 2010 11:25]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/113449 3087 Alfranio Correia 2010-07-13 BUG#53452 Inconsistent behavior of binlog_direct_non_transactional_updates with temp table This patch introduces two key changes in the replication's behavior. Firstly, it reverts part of BUG#51894 which puts any update to temporary tables into the trx-cache. Now, updates to temporary tables are handled according to the type of their engines as a regular table. Secondly, an unsafe mixed statement, (i.e. a statement that access transactional table as well non-transactional or temporary table, and writes to any of them), are written into the trx-cache in order to minimize errors in the execution when the statement logging format is in use. Such changes has a direct impact on which statements are classified as unsafe statements and thus part of BUG#53259 is reverted. @ mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc Fixed test case that was producing the wrong permutation. @ mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.test After this patch, manipulating temporary tables when the logging format is statement may not be safe. @ mysql-test/r/ctype_cp932_binlog_stm.result Updated the result set. @ mysql-test/r/mysqlbinlog.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_database.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_innodb_row.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_row_binlog.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_row_drop_tbl.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_binlog.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_blackhole.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_drop_tbl.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_row.result Updated the result set. @ mysql-test/suite/perfschema/r/binlog_mix.result Updated the result set. @ mysql-test/suite/perfschema/r/binlog_row.result Updated the result set. @ mysql-test/suite/perfschema/r/binlog_stmt.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_drop_if_exists.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_non_direct_row_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_non_direct_stm_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_drop.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_log.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_log_innodb.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_server_id.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_sp.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_stm_log.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result Updated the result set. @ mysql-test/suite/rpl/t/rpl_mixed_row_innodb.test Updated the result set. @ mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test Updated the result set. @ mysql-test/suite/rpl/t/rpl_stm_innodb.test Updated the result set. @ mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result Updated the result set. @ mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_implicit_commit_binlog.result Updated the result set. @ mysql-test/suite/rpl_ndb/r/rpl_ndb_row_implicit_commit_binlog.result Updated the result set. @ sql/log.cc There is no need to keep track if a non-transactional temporary was written into the trx-cache. @ sql/log_event.cc There is no need to force that non-transactional temporary tables are written to the trx-cache. @ sql/sql_base.cc Returns the type of temporary table that was dropped: i.e. transactional or non-transactional. @ sql/sql_base.h Changed the signature of drop_temporary_table in order to know the type of the table that was dropped. @ sql/sql_class.cc Moved the routine that verifies if a mixed statement is unsafe to sql_lex.h. @ sql/sql_insert.cc Changed the signature of mysql_create_table_no_lock in order to know the type of the table that was dropped. @ sql/sql_lex.h Moved the routine that verifies if a mixed statement is unsafe to sql_lex.h. @ sql/sql_table.cc Core of the patch. @ sql/sql_table.h Changed the signature of mysql_create_table_no_lock in order to know the type of the table that was dropped.
[23 Jul 2010 1:17]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/114189 3087 Alfranio Correia 2010-07-23 BUG#53452 Inconsistent behavior of binlog_direct_non_transactional_updates with temp table This patch introduces two key changes in the replication's behavior. Firstly, it reverts part of BUG#51894 which puts any update to temporary tables into the trx-cache. Now, updates to temporary tables are handled according to the type of their engines as a regular table. Secondly, an unsafe mixed statement, (i.e. a statement that access transactional table as well non-transactional or temporary table, and writes to any of them), are written into the trx-cache in order to minimize errors in the execution when the statement logging format is in use. Such changes has a direct impact on which statements are classified as unsafe statements and thus part of BUG#53259 is reverted. @ mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc Fixed test case that was producing the wrong permutation. @ mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.test After this patch, manipulating temporary tables when the logging format is statement may not be safe. @ mysql-test/r/ctype_cp932_binlog_stm.result Updated the result set. @ mysql-test/r/mysqlbinlog.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_database.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_innodb_row.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_row_binlog.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_row_drop_tbl.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_binlog.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_blackhole.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_drop_tbl.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_row.result Updated the result set. @ mysql-test/suite/perfschema/r/binlog_mix.result Updated the result set. @ mysql-test/suite/perfschema/r/binlog_row.result Updated the result set. @ mysql-test/suite/perfschema/r/binlog_stmt.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_drop_if_exists.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_non_direct_row_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_non_direct_stm_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_drop.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_log.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_log_innodb.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_server_id.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_sp.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_stm_log.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result Updated the result set. @ mysql-test/suite/rpl/t/rpl_mixed_row_innodb.test Updated the result set. @ mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test Updated the result set. @ mysql-test/suite/rpl/t/rpl_stm_innodb.test Updated the result set. @ mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result Updated the result set. @ mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_implicit_commit_binlog.result Updated the result set. @ mysql-test/suite/rpl_ndb/r/rpl_ndb_row_implicit_commit_binlog.result Updated the result set. @ sql/log.cc There is no need to keep track if a non-transactional temporary was written into the trx-cache. @ sql/log_event.cc There is no need to force that non-transactional temporary tables are written to the trx-cache. @ sql/sql_base.cc Returns the type of temporary table that was dropped: i.e. transactional or non-transactional. @ sql/sql_base.h Changed the signature of drop_temporary_table in order to know the type of the table that was dropped. @ sql/sql_class.cc Moved the routine that verifies if a mixed statement is unsafe to sql_lex.h. @ sql/sql_insert.cc Changed the signature of mysql_create_table_no_lock in order to know the type of the table that was dropped. @ sql/sql_lex.h Moved the routine that verifies if a mixed statement is unsafe to sql_lex.h. @ sql/sql_table.cc Core of the patch. @ sql/sql_table.h Changed the signature of mysql_create_table_no_lock in order to know the type of the table that was dropped.
[25 Jul 2010 22:59]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/114304 3087 Alfranio Correia 2010-07-25 BUG#53452 Inconsistent behavior of binlog_direct_non_transactional_updates with temp table This patch introduces two key changes in the replication's behavior. Firstly, it reverts part of BUG#51894 which puts any update to temporary tables into the trx-cache. Now, updates to temporary tables are handled according to the type of their engines as a regular table. Secondly, an unsafe mixed statement, (i.e. a statement that access transactional table as well non-transactional or temporary table, and writes to any of them), are written into the trx-cache in order to minimize errors in the execution when the statement logging format is in use. Such changes has a direct impact on which statements are classified as unsafe statements and thus part of BUG#53259 is reverted. @ mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc Fixed test case that was producing the wrong permutation. @ mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.test After this patch, manipulating temporary tables when the logging format is statement may not be safe. @ mysql-test/r/ctype_cp932_binlog_stm.result Updated the result set. @ mysql-test/r/mysqlbinlog.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_database.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_innodb_row.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_row_binlog.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_row_drop_tbl.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_binlog.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_blackhole.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_drop_tbl.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_row.result Updated the result set. @ mysql-test/suite/perfschema/r/binlog_mix.result Updated the result set. @ mysql-test/suite/perfschema/r/binlog_row.result Updated the result set. @ mysql-test/suite/perfschema/r/binlog_stmt.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_drop_if_exists.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_non_direct_row_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_non_direct_stm_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_drop.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_log.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_log_innodb.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_server_id.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_sp.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_stm_log.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result Updated the result set. @ mysql-test/suite/rpl/t/rpl_mixed_row_innodb.test Updated the result set. @ mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test Updated the result set. @ mysql-test/suite/rpl/t/rpl_stm_innodb.test Updated the result set. @ mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result Updated the result set. @ mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_implicit_commit_binlog.result Updated the result set. @ mysql-test/suite/rpl_ndb/r/rpl_ndb_row_implicit_commit_binlog.result Updated the result set. @ sql/log.cc There is no need to keep track if a non-transactional temporary was written into the trx-cache. @ sql/log_event.cc There is no need to force that non-transactional temporary tables are written to the trx-cache. @ sql/sql_base.cc Returns the type of temporary table that was dropped: i.e. transactional or non-transactional. @ sql/sql_base.h Changed the signature of drop_temporary_table in order to know the type of the table that was dropped. @ sql/sql_class.cc Moved the routine that verifies if a mixed statement is unsafe to sql_lex.h. @ sql/sql_insert.cc Changed the signature of mysql_create_table_no_lock in order to know the type of the table that was dropped. @ sql/sql_lex.h Moved the routine that verifies if a mixed statement is unsafe to sql_lex.h. @ sql/sql_table.cc Core of the patch. @ sql/sql_table.h Changed the signature of mysql_create_table_no_lock in order to know the type of the table that was dropped.
[26 Jul 2010 9:24]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/114320 3088 Alfranio Correia 2010-07-26 Post-fix for BUG#53452
[27 Jul 2010 19:00]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/114462 3087 Alfranio Correia 2010-07-27 BUG#53452 Inconsistent behavior of binlog_direct_non_transactional_updates with temp table This patch introduces two key changes in the replication's behavior. Firstly, it reverts part of BUG#51894 which puts any update to temporary tables into the trx-cache. Now, updates to temporary tables are handled according to the type of their engines as a regular table. Secondly, an unsafe mixed statement, (i.e. a statement that access transactional table as well non-transactional or temporary table, and writes to any of them), are written into the trx-cache in order to minimize errors in the execution when the statement logging format is in use. Such changes has a direct impact on which statements are classified as unsafe statements and thus part of BUG#53259 is reverted. ****** Post-fix for BUG#53452 @ mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc Fixed test case that was producing the wrong permutation. @ mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.test After this patch, manipulating temporary tables when the logging format is statement may not be safe. @ mysql-test/r/ctype_cp932_binlog_stm.result Updated the result set. @ mysql-test/r/mysqlbinlog.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_database.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_innodb_row.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_row_binlog.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_row_drop_tbl.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_binlog.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_blackhole.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_drop_tbl.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_row.result Updated the result set. @ mysql-test/suite/perfschema/r/binlog_mix.result Updated the result set. @ mysql-test/suite/perfschema/r/binlog_row.result Updated the result set. @ mysql-test/suite/perfschema/r/binlog_stmt.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_drop_if_exists.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_non_direct_row_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_non_direct_stm_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_drop.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_log.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_log_innodb.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_server_id.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_sp.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_stm_log.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result Updated the result set. @ mysql-test/suite/rpl/t/rpl_mixed_row_innodb.test Updated the result set. @ mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test Updated the result set. @ mysql-test/suite/rpl/t/rpl_stm_innodb.test Updated the result set. @ mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result Updated the result set. @ mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_implicit_commit_binlog.result Updated the result set. @ mysql-test/suite/rpl_ndb/r/rpl_ndb_row_implicit_commit_binlog.result Updated the result set. @ sql/log.cc There is no need to keep track if a non-transactional temporary was written into the trx-cache. @ sql/log_event.cc There is no need to force that non-transactional temporary tables are written to the trx-cache. @ sql/sql_base.cc Returns the type of temporary table that was dropped: i.e. transactional or non-transactional. @ sql/sql_base.h Changed the signature of drop_temporary_table in order to know the type of the table that was dropped. @ sql/sql_class.cc Moved the routine that verifies if a mixed statement is unsafe to sql_lex.h. @ sql/sql_insert.cc Changed the signature of mysql_create_table_no_lock in order to know the type of the table that was dropped. @ sql/sql_lex.h Moved the routine that verifies if a mixed statement is unsafe to sql_lex.h. @ sql/sql_table.cc Core of the patch. @ sql/sql_table.h Changed the signature of mysql_create_table_no_lock in order to know the type of the table that was dropped.
[29 Jul 2010 8:48]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/114595 3087 Alfranio Correia 2010-07-29 BUG#53452 Inconsistent behavior of binlog_direct_non_transactional_updates with temp table This patch introduces two key changes in the replication's behavior. Firstly, it reverts part of BUG#51894 which puts any update to temporary tables into the trx-cache. Now, updates to temporary tables are handled according to the type of their engines as a regular table. Secondly, an unsafe mixed statement, (i.e. a statement that access transactional table as well non-transactional or temporary table, and writes to any of them), are written into the trx-cache in order to minimize errors in the execution when the statement logging format is in use. Such changes has a direct impact on which statements are classified as unsafe statements and thus part of BUG#53259 is reverted. @ mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc Fixed test case that was producing the wrong permutation. @ mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.test After this patch, manipulating temporary tables when the logging format is statement may not be safe. @ mysql-test/r/ctype_cp932_binlog_stm.result Updated the result set. @ mysql-test/r/mysqlbinlog.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_database.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_innodb_row.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_row_binlog.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_row_drop_tbl.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_binlog.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_blackhole.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_drop_tbl.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result Updated the result set. @ mysql-test/suite/binlog/r/binlog_stm_row.result Updated the result set. @ mysql-test/suite/perfschema/r/binlog_mix.result Updated the result set. @ mysql-test/suite/perfschema/r/binlog_row.result Updated the result set. @ mysql-test/suite/perfschema/r/binlog_stmt.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_drop_if_exists.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_non_direct_row_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_non_direct_stm_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_drop.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_log.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_log_innodb.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_server_id.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_sp.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_stm_log.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result Updated the result set. @ mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result Updated the result set. @ mysql-test/suite/rpl/t/rpl_mixed_row_innodb.test Updated the result set. @ mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test Updated the result set. @ mysql-test/suite/rpl/t/rpl_stm_innodb.test Updated the result set. @ mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result Updated the result set. @ mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_implicit_commit_binlog.result Updated the result set. @ mysql-test/suite/rpl_ndb/r/rpl_ndb_row_implicit_commit_binlog.result Updated the result set. @ sql/log.cc There is no need to keep track if a non-transactional temporary was written into the trx-cache. @ sql/log_event.cc There is no need to force that non-transactional temporary tables are written to the trx-cache. @ sql/sql_base.cc Returns the type of temporary table that was dropped: i.e. transactional or non-transactional. @ sql/sql_base.h Changed the signature of drop_temporary_table in order to know the type of the table that was dropped. @ sql/sql_class.cc Moved the routine that verifies if a mixed statement is unsafe to sql_lex.h. @ sql/sql_insert.cc Changed the signature of mysql_create_table_no_lock in order to know the type of the table that was dropped. @ sql/sql_lex.h Moved the routine that verifies if a mixed statement is unsafe to sql_lex.h. @ sql/sql_table.cc Core of the patch. @ sql/sql_table.h Changed the signature of mysql_create_table_no_lock in order to know the type of the table that was dropped.
[29 Jul 2010 9:40]
Alfranio Tavares Correia Junior
The current patch is based on patch http://lists.mysql.com/commits/113227 (BUG#50312).
[8 Aug 2010 22:35]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/115268 3191 Alfranio Correia 2010-08-08 BUG#53452 Inconsistent behavior of binlog_direct_non_transactional_updates with temp table This patch introduces two key changes in the replication's behavior. Firstly, it reverts part of BUG#51894 which puts any update to temporary tables into the trx-cache. Now, updates to temporary tables are handled according to the type of their engines as a regular table. Secondly, an unsafe mixed statement, (i.e. a statement that access transactional table as well non-transactional or temporary table, and writes to any of them), are written into the trx-cache in order to minimize errors in the execution when the statement logging format is in use. Such changes has a direct impact on which statements are classified as unsafe statements and thus part of BUG#53259 is reverted.
[11 Aug 2010 10:40]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/115480 3173 Alfranio Correia 2010-08-11 BUG#53452 Inconsistent behavior of binlog_direct_non_transactional_updates with temp table This patch introduces two key changes in the replication's behavior. Firstly, it reverts part of BUG#51894 which puts any update to temporary tables into the trx-cache. Now, updates to temporary tables are handled according to the type of their engines as a regular table. Secondly, an unsafe mixed statement, (i.e. a statement that access transactional table as well non-transactional or temporary table, and writes to any of them), are written into the trx-cache in order to minimize errors in the execution when the statement logging format is in use. Such changes has a direct impact on which statements are classified as unsafe statements and thus part of BUG#53259 is reverted.
[20 Aug 2010 3:03]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/116314 3191 Alfranio Correia 2010-08-20 BUG#53452 Inconsistent behavior of binlog_direct_non_transactional_updates with temp table This patch introduces two key changes in the replication's behavior. Firstly, it reverts part of BUG#51894 which puts any update to temporary tables into the trx-cache. Now, updates to temporary tables are handled according to the type of their engines as a regular table. Secondly, an unsafe mixed statement, (i.e. a statement that access transactional table as well non-transactional or temporary table, and writes to any of them), are written into the trx-cache in order to minimize errors in the execution when the statement logging format is in use. Such changes has a direct impact on which statements are classified as unsafe statements and thus part of BUG#53259 is reverted.
[20 Aug 2010 3:54]
Alfranio Tavares Correia Junior
Pushed it to mysql-5.5-bugfixing, mysql-trunk-bugfixing and mysql-next-mr-bugfixing.
[23 Aug 2010 22:35]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/116555 3194 Alfranio Correia 2010-08-23 Post-fix push for BUG#53452.
[25 Aug 2010 9:23]
Bugs System
Pushed into mysql-5.5 5.5.6-m3 (revid:alik@ibmvm-20100825092002-2yvkb3iwu43ycpnm) (version source revid:alik@ibmvm-20100825092002-2yvkb3iwu43ycpnm) (merge vers: 5.5.6-m3) (pib:20)
[25 Aug 2010 14:15]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/116753 3194 Alfranio Correia 2010-08-25 Post-fix push for BUG#53452. Updated the result files for ndb test cases.
[25 Aug 2010 14:33]
Jon Stephens
See also BUG#53259.
[26 Aug 2010 9:25]
Jon Stephens
Documented in the 5.5.6 changelog as follows: The value of binlog_direct_non_transactional_updates had no effect on statements mixing transactional tables and nontransactional tables, or mixing tables and nontransactional tables. As part of the fix for this issue, updates to temporary tables are now handled as transactional or nontransactional according to their storage engine types. (In effect, the current fix reverts a change made previously as part of the fix for Bug#53259.) In addition, unsafe mixed statements (that is, statements which access transactional table as well as nontransactional or temporary tables, and write to any of them) are now handled as transactional when the statement-based logging format is in use. Also updated relevant portions of 5.5/5.6 Manuals. Closed.
[30 Aug 2010 8:31]
Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@sun.com-20100830082732-n2eyijnv86exc5ci) (version source revid:alik@sun.com-20100830082732-n2eyijnv86exc5ci) (merge vers: 5.6.1-m4) (pib:21)
[30 Aug 2010 8:35]
Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100830082745-n6sh01wlwh3itasv) (version source revid:alik@sun.com-20100830082745-n6sh01wlwh3itasv) (pib:21)
[30 Aug 2010 8:36]
Bugs System
Pushed into mysql-5.5 5.5.7-m3 (revid:alik@sun.com-20100830082727-5ac4czrxl61w9wle) (version source revid:alik@sun.com-20100830082727-5ac4czrxl61w9wle) (merge vers: 5.5.7-m3) (pib:21)
[30 Aug 2010 11:06]
Jon Stephens
Already documented in 5.5.5/5.6.0 -- setting back to Closed state.
[2 Sep 2010 14:14]
Jon Stephens
No new changelog entry required. Returning to Closed state.