An error occurred fetching the project authors.
- 28 Apr, 2010 1 commit
-
-
Sven Sandberg authored
Clarified error messages related to unsafe statements: - avoid the internal technical term "row injection" - use 'binary log' instead of 'binlog' - avoid the word 'unsafeness' mysql-test/extra/binlog_tests/blackhole.test: updated suppression pattern mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test: updated suppression pattern mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test: updated suppression pattern mysql-test/extra/rpl_tests/rpl_insert_id.test: updated suppression pattern mysql-test/extra/rpl_tests/rpl_loaddata.test: updated suppression pattern mysql-test/extra/rpl_tests/rpl_mixing_engines.test: updated suppression pattern mysql-test/extra/rpl_tests/rpl_start_stop_slave.test: updated suppression pattern mysql-test/extra/rpl_tests/rpl_stm_000001.test: updated suppression pattern mysql-test/extra/rpl_tests/rpl_stop_middle_group.test: updated suppression pattern mysql-test/r/archive.result: updated result file mysql-test/r/commit_1innodb.result: updated result file mysql-test/r/ctype_cp932_binlog_stm.result: updated result file mysql-test/r/partition_innodb_stmt.result: updated result file mysql-test/suite/binlog/r/binlog_innodb.result: updated result file mysql-test/suite/binlog/r/binlog_killed.result: updated result file mysql-test/suite/binlog/r/binlog_multi_engine.result: updated result file mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result: updated result file mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result: updated result file mysql-test/suite/binlog/r/binlog_stm_blackhole.result: updated result file mysql-test/suite/binlog/r/binlog_stm_do_db.result: updated result file mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result: updated result file mysql-test/suite/binlog/r/binlog_stm_ps.result: updated result file mysql-test/suite/binlog/r/binlog_stm_row.result: updated result file mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result: updated result file mysql-test/suite/binlog/r/binlog_unsafe.result: updated result file mysql-test/suite/binlog/t/binlog_killed.test: updated suppression pattern mysql-test/suite/binlog/t/binlog_multi_engine.test: updated suppression pattern mysql-test/suite/binlog/t/binlog_statement_insert_delayed.test: updated suppression pattern mysql-test/suite/binlog/t/binlog_stm_ps.test: updated suppression pattern mysql-test/suite/binlog/t/binlog_stm_row.test: updated suppression pattern mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test: updated suppression pattern mysql-test/suite/binlog/t/binlog_tmp_table.test: updated suppression pattern mysql-test/suite/binlog/t/binlog_unsafe.test: updated suppression pattern mysql-test/suite/ndb/r/ndb_binlog_format.result: updated result file mysql-test/suite/ndb/t/ndb_binlog_format.test: updated suppression pattern mysql-test/suite/perfschema/r/binlog_stmt.result: updated result file mysql-test/suite/perfschema/t/binlog_stmt.test: updated suppression pattern mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result: updated result file mysql-test/suite/rpl/r/rpl_blackhole.result: updated result file mysql-test/suite/rpl/r/rpl_concurrency_error.result: updated result file mysql-test/suite/rpl/r/rpl_get_lock.result: updated result file mysql-test/suite/rpl/r/rpl_insert_id.result: updated result file mysql-test/suite/rpl/r/rpl_insert_ignore.result: updated result file mysql-test/suite/rpl/r/rpl_misc_functions.result: updated result file mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result: updated result file mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result: updated result file mysql-test/suite/rpl/r/rpl_mysql_upgrade.result: updated result file mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result: updated result file mysql-test/suite/rpl/r/rpl_non_direct_row_mixing_engines.result: updated result file mysql-test/suite/rpl/r/rpl_non_direct_stm_mixing_engines.result: updated result file mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result: updated result file mysql-test/suite/rpl/r/rpl_read_only.result: updated result file mysql-test/suite/rpl/r/rpl_row_binlog_max_cache_size.result: updated result file mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result: updated result file mysql-test/suite/rpl/r/rpl_row_mixing_engines.result: updated result file mysql-test/suite/rpl/r/rpl_slow_query_log.result: updated result file mysql-test/suite/rpl/r/rpl_sp.result: updated result file mysql-test/suite/rpl/r/rpl_stm_000001.result: updated result file mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result: updated result file mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result: updated result file mysql-test/suite/rpl/r/rpl_stm_loadfile.result: updated result file mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result: updated result file mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result: updated result file mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result: updated result file mysql-test/suite/rpl/r/rpl_temp_temporary.result: updated result file mysql-test/suite/rpl/r/rpl_variables_stm.result: updated result file mysql-test/suite/rpl/t/rpl000013.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_blackhole.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_concurrency_error.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_err_ignoredtable.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_get_lock.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_insert.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_insert_id.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_insert_ignore.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_invoked_features.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_misc_functions.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_mixed_bit_pk.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_mysql_upgrade.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_optimize.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_read_only.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_semi_sync.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_semi_sync_event.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_session_var.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_slow_query_log.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_sp.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_stm_auto_increment_bug33029.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_stm_found_rows.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_stm_loadfile.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_temp_table.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_temp_temporary.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_temporary.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_timezone.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_trigger.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_udf.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_user_variables.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_variables_stm.test: updated suppression pattern mysql-test/suite/rpl/t/rpl_view_multi.test: updated suppression pattern mysql-test/suite/rpl_ndb/r/rpl_ndb_binlog_format_errors.result: updated result file mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors.test: updated suppression pattern mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test: updated suppression pattern mysql-test/suite/sys_vars/t/rpl_init_slave_func.test: updated suppression pattern mysql-test/t/archive.test: updated suppression pattern mysql-test/t/commit_1innodb.test: updated suppression pattern mysql-test/t/create_select_tmp.test: updated suppression pattern mysql-test/t/ctype_cp932_binlog_stm.test: updated suppression pattern mysql-test/t/lock_sync.test: updated suppression pattern mysql-test/t/mysqlbinlog.test: updated suppression pattern mysql-test/t/mysqldump.test: updated suppression pattern mysql-test/t/sp_trans.test: updated suppression pattern sql/log_event.cc: Clarified error message. sql/share/errmsg-utf8.txt: Clarified error messages.
-
- 20 Apr, 2010 1 commit
-
-
Alfranio Correia authored
transaction BUG#52616 Temp table prevents switch binlog format from STATEMENT to ROW Before the WL#2687 and BUG#46364, every non-transactional change that happened after a transactional change was written to trx-cache and flushed upon committing the transaction. WL#2687 and BUG#46364 changed this behavior and non-transactional changes are now written to the binary log upon committing the statement. A binary log event is identified as transactional or non-transactional through a flag in the Log_event which is set taking into account the underlie storage engine on what it is stems from. In the current bug, this flag was not being set properly when the DROP TEMPORARY TABLE was executed. However, while fixing this bug we figured out that changes to temporary tables should be always written to the trx-cache if there is an on-going transaction. Otherwise, binlog events in the reversed order would be produced. Regarding concurrency, keeping changes to temporary tables in the trx-cache is also safe as temporary tables are only visible to the owner connection. In this patch, we classify the following statements as unsafe: 1 - INSERT INTO t_myisam SELECT * FROM t_myisam_temp 2 - INSERT INTO t_myisam_temp SELECT * FROM t_myisam 3 - CREATE TEMPORARY TABLE t_myisam_temp SELECT * FROM t_myisam On the other hand, the following statements are classified as safe: 1 - INSERT INTO t_innodb SELECT * FROM t_myisam_temp 2 - INSERT INTO t_myisam_temp SELECT * FROM t_innodb The patch also guarantees that transactions that have a DROP TEMPORARY are always written to the binary log regardless of the mode and the outcome: commit or rollback. In particular, the DROP TEMPORARY is extended with the IF EXISTS clause when the current statement logging format is set to row. Finally, the patch allows to switch from STATEMENT to MIXED/ROW when there are temporary tables but the contrary is not possible. mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test: Updated the test case because CREATE TEMPORARY TABLE t_innodb_temp SELECT * FROM t_myisam is not unsafe. mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test: Updated the test case due to the new rules: changes to temporary tables are written to the binary log in the boundaries of a transaction if there is any. mysql-test/extra/rpl_tests/rpl_innodb.test: Removed comments from the test case that became false after the patch. mysql-test/extra/rpl_tests/rpl_loaddata.test: Suppressed warning messages due to the following cases: 1 - INSERT INTO t_myisam SELECT * FROM t_myisam_temp 2 - INSERT INTO t_myisam_temp SELECT * FROM t_myisam mysql-test/include/ctype_utf8_table.inc: Suppressed warning messages due to the following cases: 1 - INSERT INTO t_myisam SELECT * FROM t_myisam_temp 2 - INSERT INTO t_myisam_temp SELECT * FROM t_myisam mysql-test/r/ctype_cp932_binlog_stm.result: Updated the test case due to the new rules: changes to temporary tables are written to the binary log in the boundaries of a transaction if there is any. mysql-test/suite/binlog/r/binlog_database.result: Updated the test case due to the new rules: changes to temporary tables are written to the binary log in the boundaries of a transaction if there is any. mysql-test/suite/binlog/r/binlog_innodb_row.result: Updated the result file. mysql-test/suite/binlog/r/binlog_multi_engine.result: Updated the unsafe message. mysql-test/suite/binlog/r/binlog_row_binlog.result: Updated the test case due to the new rules: changes to temporary tables are written to the binary log in the boundaries of a transaction if there is any. mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result: Updated the test case due to the new rules: changes to temporary tables are written to the binary log in the boundaries of a transaction if there is any. mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result: Updated the test case due to the new rules: changes to temporary tables are written to the binary log in the boundaries of a transaction if there is any. mysql-test/suite/binlog/r/binlog_stm_binlog.result: Updated the result file. mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result: Updated the test case due to the new rules: changes to temporary tables are written to the binary log in the boundaries of a transaction if there is any. mysql-test/suite/binlog/t/binlog_tmp_table.test: Suppressed warning messages due to the following cases: 1 - INSERT INTO t_myisam SELECT * FROM t_myisam_temp 2 - INSERT INTO t_myisam_temp SELECT * FROM t_myisam mysql-test/suite/ndb/r/ndb_binlog_format.result: Updated the unsafe message. mysql-test/suite/rpl/r/rpl_concurrency_error.result: Updated the unsafe message. mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result: Updated the result file because CREATE TEMPORARY TABLE t_innodb_temp SELECT * FROM t_myisam is not unsafe. mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result: Updated the test case due to the new rules: changes to temporary tables are written to the binary log in the boundaries of a transaction if there is any. mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result: Updated the test case due to the new rules: changes to temporary tables are written to the binary log in the boundaries of a transaction if there is any. mysql-test/suite/rpl/r/rpl_mixed_row_innodb.result: Added some comments to ease the understanding of the result file. mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result: Updated the test case due to the new rules: changes to temporary tables are written to the binary log in the boundaries of a transaction if there is any. mysql-test/suite/rpl/r/rpl_non_direct_row_mixing_engines.result: Updated the test case due to the new rules: changes to temporary tables are written to the binary log in the boundaries of a transaction if there is any. mysql-test/suite/rpl/r/rpl_non_direct_stm_mixing_engines.result: Updated the test case due to the new rules: changes to temporary tables are written to the binary log in the boundaries of a transaction if there is any. mysql-test/suite/rpl/r/rpl_row_drop.result: Updated the test case due to the new rules: changes to temporary tables are written to the binary log in the boundaries of a transaction if there is any. mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result: Updated the test case due to the new rules: changes to temporary tables are written to the binary log in the boundaries of a transaction if there is any. mysql-test/suite/rpl/r/rpl_row_mixing_engines.result: Updated the test case due to the new rules: changes to temporary tables are written to the binary log in the boundaries of a transaction if there is any. mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result: Updated the result file because CREATE TEMPORARY TABLE t_innodb_temp SELECT * FROM t_myisam is not unsafe. mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result: Updated the test case due to the new rules: changes to temporary tables are written to the binary log in the boundaries of a transaction if there is any. mysql-test/suite/rpl/r/rpl_stm_innodb.result: Added some comments to ease the understanding of the result file. mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result: Updated the test case due to the new rules: changes to temporary tables are written to the binary log in the boundaries of a transaction if there is any. mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result: Updated the unsafe message. mysql-test/suite/rpl/r/rpl_temp_temporary.result: Added a test case. mysql-test/suite/rpl/t/rpl000013.test: Suppressed warning messages due to the following cases: 1 - INSERT INTO t_myisam SELECT * FROM t_myisam_temp 2 - INSERT INTO t_myisam_temp SELECT * FROM t_myisam 3 - CREATE TEMPORARY TABLE t_myisam_temp SELECT * FROM t_myisam mysql-test/suite/rpl/t/rpl_misc_functions.test: Suppressed warning messages. mysql-test/suite/rpl/t/rpl_temp_table.test: Suppressed warning messages due to the following cases: 1 - INSERT INTO t_myisam SELECT * FROM t_myisam_temp 2 - INSERT INTO t_myisam_temp SELECT * FROM t_myisam 3 - CREATE TEMPORARY TABLE t_myisam_temp SELECT * FROM t_myisam mysql-test/suite/rpl/t/rpl_temp_temporary.test: Added a test case. mysql-test/suite/rpl/t/rpl_temporary.test: Suppressed warning messages due to the following cases: 1 - INSERT INTO t_myisam SELECT * FROM t_myisam_temp 2 - INSERT INTO t_myisam_temp SELECT * FROM t_myisam 3 - CREATE TEMPORARY TABLE t_myisam_temp SELECT * FROM t_myisam mysql-test/suite/rpl_ndb/r/rpl_ndb_row_implicit_commit_binlog.result: Updated the test case due to the new rules: changes to temporary tables are written to the binary log in the boundaries of a transaction if there is any. mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result: Updated the test case to remove references to positions in the binary log. mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test: Updated the test case to remove references to positions in the binary log. mysql-test/t/create_select_tmp.test: Suppressed warning messages due to the following cases: 1 - INSERT INTO t_myisam SELECT * FROM t_myisam_temp 2 - INSERT INTO t_myisam_temp SELECT * FROM t_myisam 3 - CREATE TEMPORARY TABLE t_myisam_temp SELECT * FROM t_myisam mysql-test/t/ctype_cp932_binlog_stm.test: Suppressed warning messages due to the following cases: 1 - INSERT INTO t_myisam SELECT * FROM t_myisam_temp 2 - INSERT INTO t_myisam_temp SELECT * FROM t_myisam 3 - CREATE TEMPORARY TABLE t_myisam_temp SELECT * FROM t_myisam mysql-test/t/mysqlbinlog.test: Suppressed warning messages due to the following cases: 1 - INSERT INTO t_myisam SELECT * FROM t_myisam_temp 2 - INSERT INTO t_myisam_temp SELECT * FROM t_myisam 3 - CREATE TEMPORARY TABLE t_myisam_temp SELECT * FROM t_myisam sql/log.cc: Improved the code by creating several functions to hide decision on type of engine changed, commit/abort, etc: . stmt_has_updated_non_trans_table . trans_has_updated_non_trans_table . ending_trans Updated the binlog_rollback function and the use of the OPTION_KEEP_LOG which indincates when a temporary table was either created or dropped and as such the command must be logged if not in MIXED mode and even while rolling back the transaction. sql/log.h: Improved the code by creating several functions to hide decision on type of engine changed, commit/abort, etc. sql/log_event.cc: Removed the setting of the OPTION_KEEP_LOG as it is related to CREATE TEMPORARY and DROP TEMPORARY and not to the type of engine (i.e. transactional or non-transactional). sql/log_event_old.cc: Removed the setting of the OPTION_KEEP_LOG as it is related to CREATE TEMPORARY and DROP TEMPORARY and not to the type of engine (i.e. transactional or non-transactional). sql/share/errmsg-utf8.txt: Updated the unsafe message. sql/sql_class.cc: Classifies the following statements as unsafe: 1 - INSERT INTO t_myisam SELECT * FROM t_myisam_temp 2 - INSERT INTO t_myisam_temp SELECT * FROM t_myisam On the other hand, the following statements are classified as safe: 1 - INSERT INTO t_innodb SELECT * FROM t_myisam_temp 2 - INSERT INTO t_myisam_temp SELECT * FROM t_innodb sql/sql_class.h: It allows to switch from STATEMENT to MIXED/ROW when there are temporary tables but the contrary is not possible. sql/sql_table.cc: Fixed the case that a DROP/DROP TEMPORARY that affects a temporary table in MIXED mode is written as a DROP TEMPORARY TABLE IF EXISTS because the table may not exist in the slave and due to the IF EXISTS token an error will never happen while processing the statement in the slave. Removed a function that was not being used.
-
- 31 Mar, 2010 1 commit
-
-
Alfranio Correia authored
BUG#46364 introduced the flag binlog_direct_non_transactional_updates which would make N-changes to be written to the binary log upon committing the statement when "ON". On the other hand, when "OFF" the option was supposed to mimic the behavior in 5.1. However, the implementation was not mimicking the behavior correctly and the following bugs popped up: Case #1: N-changes executed within a transaction would go into the S-cache. When later in the same transaction a T-change occurs, N-changes following it were written to the T-cache instead of the S-cache. In some cases, this raises problems. For example, a Table_map_log_event being written initially into the S-cache, together with the initial N-changes, would be absent from the T-cache. This would log N-changes orphaned from a Table_map_log_event (thence discarded at the slave). (MIXED and ROW) Case #2: When rolling back a transaction, the N-changes that might be in the T-cache were disregarded and truncated along with the T-changes. (MIXED and ROW) Case #3: When a MIXED statement (TN) is ahead of any other T-changes in the transaction and it fails, it is kept in the T-cache until the transaction ends. This is not the case in 5.1 or Betony (5.5.2). In these, the failed TN statement would be written to the binlog at the same instant it had failed and not deferred until transaction end. (SBR) To fix these problems, we have decided to do what follows: For Case #1 and #2, we circumvent them: 1. by not letting binlog_direct_non_transactional_updates affect MIXED and RBR. These modes will keep the behavior provided by WL#2687. Although this will make Celosia to behave differently from 5.1, an execution will be always safe under such modes in the sense that slaves will never go out sync. In 5.1, using either MIXED or ROW while mixing N-statements and T-statements was not safe. For Case #3, we don't actually fix it. We: 1. keep it and make all MIXED statements whether they end up failing or not or whether they are up front in the transaction or after some transactional change to always be stored in the T-cache. This means that it is written to the binary log on transaction commit/rollback only. 2. We make the warning message even more specific about the MIXED statement and SBR. mysql-test/extra/rpl_tests/rpl_mixing_engines.test: Updated the test case to avoid checking inconsistencies between the master and slave when session.binlog_direct_non_transactional_updates is ON and the format is statement. In this scenario, they will diverge because a counter (within a triger) is incremented and associated to the issued statement. However, an n-statement is logged ahead of the transaction and thus is not executed by the same order in the slave and thus gets a different value from the counter. mysql-test/suite/binlog/r/binlog_multi_engine.result: Updated the test case with the new error ER_BINLOG_UNSAFE_MIXED_STATEMENT. mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result: Updated the test case with the new error ER_BINLOG_UNSAFE_MIXED_STATEMENT. mysql-test/suite/ndb/r/ndb_binlog_format.result: Updated the test case with the new error ER_BINLOG_UNSAFE_MIXED_STATEMENT. mysql-test/suite/rpl/r/rpl_concurrency_error.result: Updated the test case with the new error ER_BINLOG_UNSAFE_MIXED_STATEMENT. mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result: Updated the test case with the new error ER_BINLOG_UNSAFE_MIXED_STATEMENT. mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result: Updated the test case with the new error ER_BINLOG_UNSAFE_MIXED_STATEMENT. mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result: Updated the test case with the new error ER_BINLOG_UNSAFE_MIXED_STATEMENT. sql/log.cc: Checked if either a trx-cache or a non-trx-cache should be used. If bin_log_direct_non_trans_update is active or the format is either MIXED or ROW, the cache to be used depends on the flag is_transactional. When the format is STMT, the non-trx-cache should be used if the statement is non-transactional and the trx-cache is empty, i.e. if any transactional statement has not committed yet. Otherwise, the trx-cache should be used. sql/share/errmsg-utf8.txt: Added the new unsafe error ER_BINLOG_UNSAFE_MIXED_STATEMENT. sql/sql_class.cc: Started printing ER_BINLOG_UNSAFE_MIXED_STATEMENT, when there is a mixed-statement. Organized the names of the variables and added comments. sql/sql_lex.cc: Added the new unsafe error ER_BINLOG_UNSAFE_MIXED_STATEMENT. sql/sql_lex.h: Added the new unsafe error ER_BINLOG_UNSAFE_MIXED_STATEMENT.
-
- 02 Feb, 2010 1 commit
-
-
Alexander Nozdrin authored
Conflicts: - mysql-test/r/mysqld--help-win.result - sql/sys_vars.cc Original revsion (in next-mr-bugfixing): ------------------------------------------------------------ revno: 2971 [merge] revision-id: alfranio.correia@sun.com-20100121210527-rbuheu5rnsmcakh1 committer: Alfranio Correia <alfranio.correia@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Thu 2010-01-21 21:05:27 +0000 message: BUG#46364 MyISAM transbuffer problems (NTM problem) It is well-known that due to concurrency issues, a slave can become inconsistent when a transaction contains updates to both transaction and non-transactional tables. In a nutshell, the current code-base tries to preserve causality among the statements by writing non-transactional statements to the txn-cache which is flushed upon commit. However, modifications done to non-transactional tables on behalf of a transaction become immediately visible to other connections but may not immediately get into the binary log and therefore consistency may be broken. In general, it is impossible to automatically detect causality/dependency among statements by just analyzing the statements sent to the server. This happen because dependency may be hidden in the application code and it is necessary to know a priori all the statements processed in the context of a transaction such as in a procedure. Moreover, even for the few cases that we could automatically address in the server, the computation effort required could make the approach infeasible. So, in this patch we introduce the option - "--binlog-direct-non-transactional-updates" that can be used to bypass the current behavior in order to write directly to binary log statements that change non-transactional tables. Besides, it is used to enable the WL#2687 which is disabled by default. ------------------------------------------------------------ revno: 2970.1.1 revision-id: alfranio.correia@sun.com-20100121131034-183r4qdyld7an5a0 parent: alik@sun.com-20100121083914-r9rz2myto3tkdya0 committer: Alfranio Correia <alfranio.correia@sun.com> branch nick: mysql-next-mr-bugfixing timestamp: Thu 2010-01-21 13:10:34 +0000 message: BUG#46364 MyISAM transbuffer problems (NTM problem) It is well-known that due to concurrency issues, a slave can become inconsistent when a transaction contains updates to both transaction and non-transactional tables. In a nutshell, the current code-base tries to preserve causality among the statements by writing non-transactional statements to the txn-cache which is flushed upon commit. However, modifications done to non-transactional tables on behalf of a transaction become immediately visible to other connections but may not immediately get into the binary log and therefore consistency may be broken. In general, it is impossible to automatically detect causality/dependency among statements by just analyzing the statements sent to the server. This happen because dependency may be hidden in the application code and it is necessary to know a priori all the statements processed in the context of a transaction such as in a procedure. Moreover, even for the few cases that we could automatically address in the server, the computation effort required could make the approach infeasible. So, in this patch we introduce the option - "--binlog-direct-non-transactional-updates" that can be used to bypass the current behavior in order to write directly to binary log statements that change non-transactional tables. Besides, it is used to enable the WL#2687 which is disabled by default.
-
- 21 Jan, 2010 1 commit
-
-
Alfranio Correia authored
It is well-known that due to concurrency issues, a slave can become inconsistent when a transaction contains updates to both transaction and non-transactional tables. In a nutshell, the current code-base tries to preserve causality among the statements by writing non-transactional statements to the txn-cache which is flushed upon commit. However, modifications done to non-transactional tables on behalf of a transaction become immediately visible to other connections but may not immediately get into the binary log and therefore consistency may be broken. In general, it is impossible to automatically detect causality/dependency among statements by just analyzing the statements sent to the server. This happen because dependency may be hidden in the application code and it is necessary to know a priori all the statements processed in the context of a transaction such as in a procedure. Moreover, even for the few cases that we could automatically address in the server, the computation effort required could make the approach infeasible. So, in this patch we introduce the option - "--binlog-direct-non-transactional-updates" that can be used to bypass the current behavior in order to write directly to binary log statements that change non-transactional tables. Besides, it is used to enable the WL#2687 which is disabled by default. mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test: Changes the result set as the STMT mode behaves as both the ROW and MIXED modes and as such uses the non-trx-cache and takes longer to fill the trx-cache up and trigger an error. mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test: Changes the result set as the STMT mode behaves as both the ROW and MIXED modes and as such uses the non-trx-cache. It also fixes comments. mysql-test/extra/rpl_tests/rpl_mixing_engines.test: The STMT mode is unsafe when mixed-statements are executed thus making slaves to go out of sync. For that reason, it checks consistency if not in STMT mode. mysql-test/include/default_mysqld.cnf: Makes binlog-direct-non-transactional-updates "TRUE" by default in the test cases. mysql-test/r/mysqld--help-notwin.result: Updates the result file with the new option. mysql-test/r/mysqld--help-win.result: Updates the result file with the new option. mysql-test/suite/binlog/r/binlog_multi_engine.result: Updates the result file because non-trx-changes are written ahead of the transaction. mysql-test/suite/binlog/r/binlog_switch_inside_trans.result: Verifies if the user cannot change the opion binlog_direct_non_transactional_updates within a transaction or a procedure/function/trigger. mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam-master.opt: Sets binlog_direct_non_transactional_updates to FALSE in order to avoid changing the test case and its result file. mysql-test/suite/binlog/t/binlog_switch_inside_trans.test: Verifies if the user cannot change the opion binlog_direct_non_transactional_updates within a transaction or a procedure/function/trigger. mysql-test/suite/ndb/r/ndb_binlog_format.result: Updates the result file because non-trx-changes are written ahead of the transaction. mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result: Sets binlog_direct_non_transactional_updates to FALSE in order to avoid changing the test case and its result file. mysql-test/suite/rpl/r/rpl_concurrency_error.result: Updates the result file because non-trx-changes are written ahead of the transaction mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result: Updates the result file because non-trx-changes are written ahead of the transaction. mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result: Updates the result file because non-trx-changes are written ahead of the transaction. mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result: Changes the result set as the STMT mode behaves as both the ROW and MIXED modes and as such uses the non-trx-cache and takes longer to fill the trx-cache up and trigger an error. mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result: Updates the result file because non-trx-changes are written ahead of the transaction. mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result: Updates the result file because non-trx-changes are written ahead of the transaction. mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result: Sets binlog_direct_non_transactional_updates to FALSE in order to avoid changing the test case and its result file. mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result: Sets binlog_direct_non_transactional_updates to FALSE in order to avoid changing the test case and its result file. mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test: Sets binlog_direct_non_transactional_updates to FALSE in order to avoid changing the test case and its result file. mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test: Sets binlog_direct_non_transactional_updates to FALSE in order to avoid changing the test case and its result file. mysql-test/suite/rpl/t/rpl_stm_stop_middle_group.test: Sets binlog_direct_non_transactional_updates to FALSE in order to avoid changing the test case and its result file. sql/log.cc: Verifies if changes should be written to either the trx-cache or non-trx-cache through the use of the function use_trans_cache(). It also organizes the code. sql/log.h: Changes the signature of some functions by adding the modifier "const" to the thd parameter. Specifically, the following functions are changed: bool trans_has_updated_trans_table(const THD* thd); bool stmt_has_updated_trans_table(const THD *thd); bool use_trans_cache(const THD*, bool is_transactional); sql/share/errmsg-utf8.txt: Creates error messages to report when an user tries to change the new option binlog_direct_non_transactional_updates within a transaction or a procedure/ function/trigger. sql/share/errmsg.txt: Creates error messages to report when an user tries to change the new option binlog_direct_non_transactional_updates within a transaction or a procedure/ function/trigger. sql/sql_class.h: Adds the new option binlog_direct_non_transactional_updates. sql/sys_vars.cc: Adds the new option binlog_direct_non_transactional_updates. support-files/my-small.cnf.sh: Adds binlog-direct-non-transactional-updates to the example file. By default the option is disabled.
-
- 03 Nov, 2009 1 commit
-
-
Alfranio Correia authored
Non-transactional updates that take place inside a transaction present problems for logging because they are visible to other clients before the transaction is committed, and they are not rolled back even if the transaction is rolled back. It is not always possible to log correctly in statement format when both transactional and non-transactional tables are used in the same transaction. In the current patch, we ensure that such scenario is completely safe under the ROW and MIXED modes.
-
- 14 Jul, 2009 1 commit
-
-
Sven Sandberg authored
General overview: The logic for switching to row format when binlog_format=MIXED had numerous flaws. The underlying problem was the lack of a consistent architecture. General purpose of this changeset: This changeset introduces an architecture for switching to row format when binlog_format=MIXED. It enforces the architecture where it has to. It leaves some bugs to be fixed later. It adds extensive tests to verify that unsafe statements work as expected and that appropriate errors are produced by problems with the selection of binlog format. It was not practical to split this into smaller pieces of work. Problem 1: To determine the logging mode, the code has to take several parameters into account (namely: (1) the value of binlog_format; (2) the capabilities of the engines; (3) the type of the current statement: normal, unsafe, or row injection). These parameters may conflict in several ways, namely: - binlog_format=STATEMENT for a row injection - binlog_format=STATEMENT for an unsafe statement - binlog_format=STATEMENT for an engine only supporting row logging - binlog_format=ROW for an engine only supporting statement logging - statement is unsafe and engine does not support row logging - row injection in a table that does not support statement logging - statement modifies one table that does not support row logging and one that does not support statement logging Several of these conflicts were not detected, or were detected with an inappropriate error message. The problem of BUG#39934 was that no appropriate error message was written for the case when an engine only supporting row logging executed a row injection with binlog_format=ROW. However, all above cases must be handled. Fix 1: Introduce new error codes (sql/share/errmsg.txt). Ensure that all conditions are detected and handled in decide_logging_format() Problem 2: The binlog format shall be determined once per statement, in decide_logging_format(). It shall not be changed before or after that. Before decide_logging_format() is called, all information necessary to determine the logging format must be available. This principle ensures that all unsafe statements are handled in a consistent way. However, this principle is not followed: thd->set_current_stmt_binlog_row_based_if_mixed() is called in several places, including from code executing UPDATE..LIMIT, INSERT..SELECT..LIMIT, DELETE..LIMIT, INSERT DELAYED, and SET @@binlog_format. After Problem 1 was fixed, that caused inconsistencies where these unsafe statements would not print the appropriate warnings or errors for some of the conflicts. Fix 2: Remove calls to THD::set_current_stmt_binlog_row_based_if_mixed() from code executed after decide_logging_format(). Compensate by calling the set_current_stmt_unsafe() at parse time. This way, all unsafe statements are detected by decide_logging_format(). Problem 3: INSERT DELAYED is not unsafe: it is logged in statement format even if binlog_format=MIXED, and no warning is printed even if binlog_format=STATEMENT. This is BUG#45825. Fix 3: Made INSERT DELAYED set itself to unsafe at parse time. This allows decide_logging_format() to detect that a warning should be printed or the binlog_format changed. Problem 4: LIMIT clause were not marked as unsafe when executed inside stored functions/triggers/views/prepared statements. This is BUG#45785. Fix 4: Make statements containing the LIMIT clause marked as unsafe at parse time, instead of at execution time. This allows propagating unsafe-ness to the view. mysql-test/extra/rpl_tests/create_recursive_construct.inc: Added auxiliary file used by binlog_unsafe.test to create and execute recursive constructs (functions/procedures/triggers/views/prepared statements). mysql-test/extra/rpl_tests/rpl_foreign_key.test: removed unnecessary set @@session.binlog_format mysql-test/extra/rpl_tests/rpl_insert_delayed.test: Filter out table id from table map events in binlog listing. Got rid of $binlog_format_statement. mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test: disable warnings around call to unsafe procedure mysql-test/include/rpl_udf.inc: Disabled warnings for code that generates warnings for some binlog formats. That would otherwise cause inconsistencies in the result file. mysql-test/r/mysqldump.result: Views are now unsafe if they contain a LIMIT clause. That fixed BUG#45831. Due to BUG#45832, a warning is printed for the CREATE VIEW statement. mysql-test/r/sp_trans.result: Unsafe statements in stored procedures did not give a warning if binlog_format=statement. This is BUG#45824. Now they do, so this result file gets a new warning. mysql-test/suite/binlog/r/binlog_multi_engine.result: Error message changed. mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result: INSERT DELAYED didn't generate a warning when binlog_format=STATEMENT. That was BUG#45825. Now there is a warning, so result file needs to be updated. mysql-test/suite/binlog/r/binlog_stm_ps.result: Changed error message. mysql-test/suite/binlog/r/binlog_unsafe.result: updated result file: - error message changed - added test for most combinations of unsafe constructs invoked from recursive constructs - INSERT DELAYED now gives a warning (because BUG#45826 is fixed) - INSERT..SELECT..LIMIT now gives a warning from inside recursive constructs (because BUG#45785 was fixed) - When a recursive construct (e.g., stored proc or function) contains more than one statement, at least one of which is unsafe, then all statements in the recursive construct give warnings. This is a new bug introduced by this changeset. It will be addressed in a post-push fix. mysql-test/suite/binlog/t/binlog_innodb.test: Changed error code for innodb updates with READ COMMITTED or READ UNCOMMITTED transaction isolation level and binlog_format=statement. mysql-test/suite/binlog/t/binlog_multi_engine.test: The error code has changed for statements where more than one engine is involved and one of them is self-logging. mysql-test/suite/binlog/t/binlog_unsafe-master.opt: Since binlog_unsafe now tests unsafe-ness of UDF's, we need an extra flag in the .opt file. mysql-test/suite/binlog/t/binlog_unsafe.test: - Clarified comment. - Rewrote first part of test. Now it tests not only unsafe variables and functions, but also unsafe-ness due to INSERT..SELECT..LIMIT, INSERT DELAYED, insert into two autoinc columns, use of UDF's, and access to log tables in the mysql database. Also, in addition to functions, procedures, triggers, and prepared statements, it now also tests views; and it constructs recursive calls in two levels by combining these recursive constructs. Part of the logic is in extra/rpl_tests/create_recursive_construct.inc. - added tests for all special system variables that should not be unsafe. - added specific tests for BUG#45785 and BUG#45825 mysql-test/suite/rpl/r/rpl_events.result: updated result file mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result: updated result file mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result: updated result file mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result: updated result file mysql-test/suite/rpl/r/rpl_idempotency.result: updated result file mysql-test/suite/rpl/r/rpl_mix_found_rows.result: Split rpl_found_rows.test into rpl_mix_found_rows.test (a new file) and rpl_stm_found_rows.test (renamed rpl_found_rows.test). This file equals the second half of the old rpl_found_rows.result, with the following modifications: - minor formatting changes - additional initialization mysql-test/suite/rpl/r/rpl_mix_insert_delayed.result: Moved out code operating in mixed mode from rpl_stm_insert_delayed (into rpl_mix_insert_delayed) and got rid of explicit setting of binlog format. mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result: updated result file mysql-test/suite/rpl/r/rpl_row_idempotency.result: Moved the second half of rpl_idempotency.test, which only executed in row mode, to rpl_row_idempotency.test. This is the new result file. mysql-test/suite/rpl/r/rpl_row_insert_delayed.result: Got rid of unnecessary explicit setting of binlog format. mysql-test/suite/rpl/r/rpl_stm_found_rows.result: Split rpl_found_rows.test into rpl_mix_found_rows.test (a new file) and rpl_stm_found_rows.test (renamed rpl_found_rows.test). Changes in this file: - minor formatting changes - warning is now issued for unsafe statements inside procedures (since BUG#45824 is fixed) - second half of file is moved to rpl_mix_found_rows.result mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result: Moved out code operating in mixed mode from rpl_stm_insert_delayed (into rpl_mix_insert_delayed) and got rid of explicit setting of binlog format. mysql-test/suite/rpl/r/rpl_stm_loadfile.result: error message changed mysql-test/suite/rpl/r/rpl_temporary_errors.result: updated result file mysql-test/suite/rpl/r/rpl_udf.result: Remove explicit set of binlog format (and triplicate test execution) and rely on test system executing the test in all binlog formats. mysql-test/suite/rpl/t/rpl_bug31076.test: Test is only valid in mixed or row mode since it generates row events. mysql-test/suite/rpl/t/rpl_events.test: Removed explicit set of binlog_format and removed duplicate testing. Instead, we rely on the test system to try all binlog formats. mysql-test/suite/rpl/t/rpl_extraColmaster_innodb.test: Removed triplicate testing and instead relying on test system. Test is only relevant for row format since statement-based replication cannot handle extra columns on master. mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test: Removed triplicate testing and instead relying on test system. Test is only relevant for row format since statement-based replication cannot handle extra columns on master. mysql-test/suite/rpl/t/rpl_idempotency-slave.opt: Removed .opt file to avoid server restarts. mysql-test/suite/rpl/t/rpl_idempotency.test: - Moved out row-only tests to a new test file, rpl_row_idempotency.test. rpl_idempotency now only contains tests that execute in all binlog_formats. - While I was here, also removed .opt file to avoid server restarts. The slave_exec_mode is now set inside the test instead. mysql-test/suite/rpl/t/rpl_mix_found_rows.test: Split rpl_found_rows.test into rpl_mix_found_rows.test (a new file) and rpl_stm_found_rows.test (renamed rpl_found_rows.test). This file contains the second half of the original rpl_found_rows.test with the follwing changes: - initialization - removed SET_BINLOG_FORMAT and added have_binlog_format_mixed.inc - minor formatting changes mysql-test/suite/rpl/t/rpl_mix_insert_delayed.test: Moved out code operating in mixed mode from rpl_stm_insert_delayed (into rpl_mix_insert_delayed) and got rid of explicit setting of binlog format. mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test: Test cannot execute in statement mode, since we no longer switch to row format when binlog_format=statement. Enforced mixed mode throughout the test. mysql-test/suite/rpl/t/rpl_row_idempotency.test: Moved the second half of rpl_idempotency.test, which only executed in row mode, to this new file. We now rely on the test system to set binlog format. mysql-test/suite/rpl/t/rpl_row_insert_delayed.test: - Got rid of unnecessary explicit setting of binlog format. - extra/rpl_tests/rpl_insert_delayed.test does not need the $binlog_format_statement variable any more, so that was removed. mysql-test/suite/rpl/t/rpl_slave_skip.test: The test switches binlog_format internally and master generates both row and statement events. Hence, the slave must be able to log in both statement and row format. Hence test was changed to only execute in mixed mode. mysql-test/suite/rpl/t/rpl_stm_found_rows.test: Split rpl_found_rows.test into rpl_mix_found_rows.test (a new file) and rpl_stm_found_rows.test (renamed rpl_found_rows.test). Changes in this file: - minor formatting changes - added have_binlog_format_statement and removed SET BINLOG_FORMAT. - second half of file is moved to rpl_mix_found_rows.test - added cleanup code mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test: Moved out code operating in mixed mode from rpl_stm_insert_delayed (into rpl_mix_insert_delayed) and got rid of explicit setting of binlog format. mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test: The test switches binlog_format internally and master generates both row and statement events. Hence, the slave must be able to log in both statement and row format. Hence test was changed to only execute in mixed mode on slave. mysql-test/suite/rpl/t/rpl_temporary_errors.test: Removed explicit set of binlog format. Instead, the test now only executes in row mode. mysql-test/suite/rpl/t/rpl_udf.test: Remove explicit set of binlog format (and triplicate test execution) and rely on test system executing the test in all binlog formats. mysql-test/suite/rpl_ndb/combinations: Added combinations file for rpl_ndb. mysql-test/suite/rpl_ndb/r/rpl_ndb_binlog_format_errors.result: new result file mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result: updated result file mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test: The test needs slave to be able to switch to row mode, so the test was changed to only execute in mixed and row mode. mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test: The test needs slave to be able to switch to row mode, so the test was changed to only execute in mixed and row mode. mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test: The test needs slave to be able to switch to row mode, so the test was changed to only execute in mixed and row mode. mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors-master.opt: new option file mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors-slave.opt: new option file mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors.test: New test case to verify all errors and warnings generated by decide_logging_format. mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test: The test needs slave to be able to switch to row mode, so the test was changed to only execute in mixed and row mode. mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test: The test needs slave to be able to switch to row mode, so the test was changed to only execute in mixed and row mode. mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test: The test needs slave to be able to switch to row mode, so the test was changed to only execute in mixed and row mode. mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test: The test needs slave to be able to switch to row mode, so the test was changed to only execute in mixed and row mode. While I was here, also made the test clean up after itself. mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test: The test needs slave to be able to switch to row mode, so the test was changed to only execute in mixed and row mode. mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test: The test needs slave to be able to switch to row mode, so the test was changed to only execute in mixed and row mode. mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test: The test needs slave to be able to switch to row mode, so the test was changed to only execute in mixed and row mode. mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test: The test needs slave to be able to switch to row mode, so the test was changed to only execute in mixed and row mode. mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test: The test needs slave to be able to switch to row mode, so the test was changed to only execute in mixed and row mode. mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test: The test needs slave to be able to switch to row mode, so the test was changed to only execute in mixed and row mode. mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test: The test needs slave to be able to switch to row mode, so the test was changed to only execute in mixed and row mode. mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test: The test needs slave to be able to switch to row mode, so the test was changed to only execute in mixed and row mode. mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test: The test needs slave to be able to switch to row mode, so the test was changed to only execute in mixed and row mode. mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test: The test needs slave to be able to switch to row mode, so the test was changed to only execute in mixed and row mode. mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test: The test needs slave to be able to switch to row mode, so the test was changed to only execute in mixed and row mode. mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test: The test needs slave to be able to switch to row mode, so the test was changed to only execute in mixed and row mode. mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test: The test needs slave to be able to switch to row mode, so the test was changed to only execute in mixed and row mode. mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test: The test needs slave to be able to switch to row mode, so the test was changed to only execute in mixed and row mode. mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test: The test needs slave to be able to switch to row mode, so the test was changed to only execute in mixed and row mode. mysql-test/t/partition_innodb_stmt.test: Changed error code for innodb updates with READ COMMITTED or READ UNCOMMITTED transaction isolation level and binlog_format=statement. sql/event_db_repository.cc: Use member function to read current_stmt_binlog_row_based. sql/events.cc: Use member function to read current_stmt_binlog_row_based. sql/ha_ndbcluster_binlog.cc: reset_current_stmt_binlog_row_based() is not a no-op for the ndb_binlog thread any more. Instead, the ndb_binlog thread now forces row mode both initially and just after calling mysql_parse. (mysql_parse() is the only place where reset_current_stmt_binlog_row_based() may be called from the ndb_binlog thread, so these are the only two places that need to change.) sql/ha_partition.cc: Use member function to read current_stmt_binlog_row_based. sql/handler.cc: Use member function to read current_stmt_binlog_row_based. sql/item_create.cc: Added DBUG_ENTER to some functions, to be able to trace when set_stmt_unsafe is called. sql/log.cc: Use member function to read current_stmt_binlog_row_based. sql/log_event.cc: - Moved logic for changing to row format out of do_apply_event (and into decide_logging_format). - Added @todo comment for post-push cleanup. sql/log_event_old.cc: Move logic for changing to row format out of do_apply_event (and into decide_logging_format). sql/mysql_priv.h: Make decide_logging_format() a member of the THD class, for two reasons: - It is natural from an object-oriented perspective. - decide_logging_format() needs to access private members of THD (specifically, the new binlog_warning_flags field). sql/rpl_injector.cc: Removed call to set_current_stmt_binlog_row_based(). From now on, only decide_logging_fromat is allowed to modify current_stmt_binlog_row_based. This call is from the ndb_binlog thread, mostly executing code in ha_ndbcluster_binlog.cc. This call can be safely removed, because: - current_stmt_binlog_row_based is initialized for the ndb_binlog thread's THD object when the THD object is created. So we're not going to read uninitialized memory. - The behavior of ndb_binlog thread does not use the state of the current_stmt_binlog_row_based. It is conceivable that the ndb_binlog thread would rely on the current_stmt_binlog_format in two situations: (1) when it calls mysql_parse; (2) when it calls THD::binlog_query. In case (1), it always clears THD::options&OPTION_BIN_LOG (because run_query() in ha_ndbcluster_binlog.cc is only called with disable_binlogging = TRUE). In case (2), it always uses qtype=STMT_QUERY_TYPE. sql/set_var.cc: Added @todo comment for post-push cleanup. sql/share/errmsg.txt: Added new error messages and clarified ER_BINLOG_UNSAFE_STATEMENT. sql/sp.cc: Added DBUG_ENTER, to be able to trace when set_stmt_unsafe is called. Got rid of MYSQL_QUERY_TYPE: it was equivalent to STMT_QUERY_TYPE. sql/sp_head.cc: Use member function to read current_stmt_binlog_row_based. sql/sp_head.h: Added DBUG_ENTER, to be able to trace when set_stmt_unsafe is called. sql/sql_acl.cc: Got rid of MYSQL_QUERY_TYPE: it was equivalent to STMT_QUERY_TYPE. sql/sql_base.cc: - Made decide_logging_format take care of all logic for deciding the logging format, and for determining the related warnings and errors. See comment above decide_logging_format for details. - Made decide_logging_format a member function of THD, since it needs to access private members of THD and since its purpose is to update the state of a THD object. - Added DBUG_ENTER, to be able to trace when set_stmt_unsafe is called. sql/sql_class.cc: - Moved logic for determining unsafe warnings away from THD::binlog_query (and into decide_logging_format()). Now, it works like this: 1. decide_logging_format detects that the current statement shall produce a warning, if it ever makes it to the binlog 2. decide_logging_format sets a flag of THD::binlog_warning_flags. 3. THD::binlog_query reads the flag. If the flag is set, it generates a warning. - Use member function to read current_stmt_binlog_row_based. sql/sql_class.h: - Added THD::binlog_warning_flags (see sql_class.cc for explanation). - Made decide_logging_format() and reset_for_next_command() member functions of THD (instead of standalone functions). This was needed for two reasons: (1) the functions need to access the private member THD::binlog_warning_flags; (2) the purpose of these functions is to update the staet of a THD object, so from an object-oriented point of view they should be member functions. - Encapsulated current_stmt_binlog_row_based, so it is now private and can only be accessed from a member function. Also changed the data type to an enumeration instead of a bool. - Removed MYSQL_QUERY_TYPE, because it was equivalent to STMT_QUERY_TYPE anyways. - When reset_current_stmt_binlog_row_based was called from the ndb_binlog thread, it would behave as a no-op. This special case has been removed, and the behavior of reset_current_stmt_binlog_row_based does not depend on which thread calls it any more. The special case did not serve any purpose, since the ndb binlog thread did not take the current_stmt_binlog_row_based flag into account anyways. sql/sql_delete.cc: - Moved logic for setting row format for DELETE..LIMIT away from mysql_prepare_delete. (Instead, we mark the statement as unsafe at parse time (sql_yacc.yy) and rely on decide_logging_format() (sql_class.cc) to set row format.) This is part of the fix for BUG#45831. - Use member function to read current_stmt_binlog_row_based. sql/sql_insert.cc: - Removed unnecessary calls to thd->lex->set_stmt_unsafe() and thd->set_current_stmt_binlog_row_based_if_mixed() from handle_delayed_insert(). The calls are unnecessary because they have already been made; they were made in the constructor of the `di' object. - Since decide_logging_format() is now a member function of THD, code that calls decide_logging_format() had to be updated. - Added DBUG_ENTER call, to be able to trace when set_stmt_unsafe is called. - Moved call to set_stmt_unsafe() for INSERT..SELECT..LIMIT away from mysql_insert_select_prepare() (and into decide_logging_format). This is part of the fix for BUG#45831. - Use member function to read current_stmt_binlog_row_based. sql/sql_lex.h: - Added the flag BINLOG_STMT_FLAG_ROW_INJECTION to enum_binlog_stmt_flag. This was necessary so that a statement can identify itself as a row injection. - Added appropriate setter and getter functions for the new flag. - Added or clarified some comments. - Added DBUG_ENTER() sql/sql_load.cc: Use member function to read current_stmt_binlog_row_based. sql/sql_parse.cc: - Made mysql_reset_thd_for_next_command() clear thd->binlog_warning_flags. - Since thd->binlog_warning_flags is private, it must be set in a member function of THD. Hence, moved the body of mysql_reset_thd_for_next_command() to the new member function THD::reset_thd_for_next_command(), and made mysql_reset_thd_for_next_command() call THD::reset_thd_for_next_command(). - Removed confusing comment. - Use member function to read current_stmt_binlog_row_based. sql/sql_repl.cc: Use member function to read current_stmt_binlog_row_based. sql/sql_table.cc: Use member function to read current_stmt_binlog_row_based. sql/sql_udf.cc: Use member function to read current_stmt_binlog_row_based. sql/sql_update.cc: Moved logic for setting row format for UPDATE..LIMIT away from mysql_prepare_update. (Instead, we mark the statement as unsafe at parse time (sql_yacc.yy) and rely on decide_logging_format() (sql_class.cc) to set row format.) This is part of the fix for BUG#45831. sql/sql_yacc.yy: Made INSERT DELAYED, INSERT..SELECT..LIMIT, UPDATE..LIMIT, and DELETE..LIMIT mark themselves as unsafe at parse time (instead of at execution time). This is part of the fixes BUG#45831 and BUG#45825. storage/example/ha_example.cc: Made exampledb accept inserts. This was needed by the new test case rpl_ndb_binlog_format_errors, because it needs an engine that is statement-only (and accepts inserts). storage/example/ha_example.h: Made exampledb a statement-only engine instead of a row-only engine. No existing test relied exampledb's row-only capabilities. The new test case rpl_ndb_binlog_format_errors needs an engine that is statement-only. storage/innobase/handler/ha_innodb.cc: - Changed error error code and message given by innodb when binlog_format=STATEMENT and transaction isolation level is READ COMMITTED or READ UNCOMMITTED. - While I was here, also simplified the condition for checking when to give the error.
-
- 24 Oct, 2008 1 commit
-
-
Mats Kindahl authored
-
- 02 Oct, 2008 1 commit
-
-
Mats Kindahl authored
The Blackhole engine did not support row-based replication since the delete_row(), update_row(), and the index and range searching functions were not implemented. This patch adds row-based replication support for the Blackhole engine by implementing the two functions mentioned above, and making the engine pretend that it has found the correct row to delete or update when executed from the slave SQL thread by implementing index and range searching functions. It is necessary to only pretend this for the SQL thread, since a SELECT executed on the Blackhole engine will otherwise never return EOF, causing a livelock. mysql-test/extra/binlog_tests/blackhole.test: Blackhole now handles row-based replication. mysql-test/extra/rpl_tests/rpl_blackhole.test: Test helper file for testing that blackhole actually writes something to the binary log on the slave. mysql-test/suite/binlog/t/binlog_multi_engine.test: Replication now handles row-based replcation. mysql-test/suite/rpl/t/rpl_blackhole.test: Test that Blackhole works with primary key, index, or none. sql/log_event.cc: Correcting code to only touch filler bits and leave all other bits alone. It is necessary since there is no guarantee that the engine will be able to fill in the bits correctly (e.g., the blackhole engine). storage/blackhole/ha_blackhole.cc: Adding definitions for update_row() and delete_row() to return OK when executed from the slave SQL thread with thd->query == NULL (indicating that row-based replication events are being processed). Changing rnd_next(), index_read(), index_read_idx(), and index_read_last() to return OK when executed from the slave SQL thread (faking that the row has been found so that processing proceeds to update/delete the row). storage/blackhole/ha_blackhole.h: Enabling row capabilities for engine. Defining write_row(), update_row(), and delete_row(). Making write_row() private (as it should be).
-
- 28 Mar, 2008 1 commit
-
-
unknown authored
The bug allow multiple executing transactions working with non-transactional to interfere with each others by interleaving the events of different trans- actions. Bug is fixed by writing non-transactional events to the transaction cache and flushing the cache to the binary log at statement commit. To mimic the behavior of normal statement-based replication, we flush the transaction cache in row- based mode when there is no committed statements in the transaction cache, which means we are committing the first one. This means that it will be written to the binary log as a "mini-transaction" with just the rows for the statement. Note that the changes here does not take effect when building the server with HAVE_TRANSACTIONS set to false, but it is not clear if this was possible before this patch either. For row-based logging, we also have that when AUTOCOMMIT=1, the code now always generates a BEGIN/COMMIT pair for single statements, or BEGIN/ROLLBACK pair in the case of non-transactional changes in a statement that was rolled back. Note that for the case where changes to a non-transactional table causes a rollback due to error, the statement will now be logged with a BEGIN/ROLLBACK pair, even though some changes has been committed to the non-transactional table. mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test: Removing SHOW BINLOG EVENTS causing test to be non-deterministic. mysql-test/r/ctype_cp932_binlog_row.result: Result change. mysql-test/suite/binlog/r/binlog_base64_flag.result: Result change. mysql-test/suite/binlog/r/binlog_multi_engine.result: Result file change. mysql-test/suite/binlog/r/binlog_row_binlog.result: Result file change. mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result: Result file change. mysql-test/suite/binlog/r/binlog_row_insert_select.result: Result file change. mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result: Result file change. mysql-test/suite/binlog/r/binlog_stm_binlog.result: Result file change. mysql-test/suite/binlog/t/binlog_base64_flag.test: Removing table that will be used in test to prevent failing if preceeding tests forgot to drop the table. mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result: Result file change. mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result: Result file change. mysql-test/suite/rpl/r/rpl_row_create_table.result: Result file change. mysql-test/suite/rpl/r/rpl_row_delayed_ins.result: Result file change. mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result: Result file change. mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result: Result file change. mysql-test/suite/rpl/r/rpl_row_log.result: Result file change. mysql-test/suite/rpl/r/rpl_row_log_innodb.result: Result file change. mysql-test/suite/rpl/r/rpl_row_until.result: Result file change. mysql-test/suite/rpl/r/rpl_slave_skip.result: Result file change. mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result: Result file change. mysql-test/suite/rpl/r/rpl_truncate_2myisam.result: Result file change. mysql-test/suite/rpl/t/rpl_row_create_table.test: Binlog position change. mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test: Binlog position change. mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test: Binlog position change. Added stop position to mysqlbinlog argments to prevent extreneous output. mysql-test/suite/rpl/t/rpl_row_until.test: Binlog position change. mysql-test/suite/rpl/t/rpl_slave_skip.test: Binlog position change. mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test: Removing extreneous SHOW BINLOG EVENTS causing test to be non-deterministic. mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result: Result change. sql/log.cc: Adding variable at_least_one_stmt to denote that there is at least one statement committed to the transaction cache (but there might be more). Removing duplicate checks from binlog_end_trans(). The transaction cache should always be committed or rolled back when this function is called. Correcting conditions for binlog_rollback() and binlog_commit() and removing the previous "invisible commit" in favor of always using explicit commits in the binary log. sql/log_event.cc: Marking table map event to be cached. Removing Muted_query_log_event from code. sql/log_event.h: Removing unused class Muted_query_log_event. sql/sql_insert.cc: Adding missing call to ha_autocommit_or_rollback() for delayed thread. Marking CREATE-SELECT statements as transactional, since they don't need to be logged.
-
- 26 Mar, 2008 1 commit
-
-
unknown authored
mysql-test/include/commit.inc: Adjust path Add missing drop tables mysql-test/mysql-test-run.pl: Remove duplicate printout mysql-test/lib/mtr_report.pm: Only print each test that has failed once mysql-test/r/commit_1innodb.result: Adjust path Add missing drop table mysql-test/suite/binlog/r/binlog_multi_engine.result: Remove merge error - extra s mysql-test/suite/binlog/r/binlog_unsafe.result: Remove drop of non existing view mysql-test/suite/binlog/t/binlog_unsafe.test: Remove drop of non existing view
-
- 28 Feb, 2008 1 commit
-
-
unknown authored
mysql-test/suite/binlog/r/binlog_multi_engine.result: updated result mysql-test/suite/binlog/t/binlog_multi_engine.test: fix for bug#32663 mysql-test/suite/binlog/t/disabled.def: updated mysql-test/suite/rpl/r/rpl_invoked_features.result: updated result mysql-test/suite/rpl/t/disabled.def: updated mysql-test/suite/rpl/t/rpl_invoked_features.test: fix for bug#33045 mysql-test/suite/bugs/r/rpl_bug23533.result: result file mysql-test/suite/bugs/t/rpl_bug23533.test: test case for bug#23533
-
- 11 Jan, 2008 1 commit
-
-
unknown authored
-
- 14 Dec, 2007 1 commit
-
-
unknown authored
Now, every transaction (including autocommit transactions) starts with a BEGIN and ends with a COMMIT/ROLLBACK in the binlog. Added a test case, and updated lots of test case result files. mysql-test/r/multi_update.result: Updated result file mysql-test/r/sp_trans_log.result: Updated result file mysql-test/suite/binlog/r/binlog_innodb.result: Updated result file mysql-test/suite/binlog/r/binlog_multi_engine.result: Updated result file mysql-test/suite/binlog/r/binlog_stm_blackhole.result: Updated result file mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result: Updated result file mysql-test/suite/ndb/r/ndb_binlog_format.result: Updated result file mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result: Updated result file mysql-test/suite/rpl/r/rpl_row_charset_innodb.result: Updated result file mysql-test/suite/rpl/r/rpl_row_create_table.result: Updated result file mysql-test/suite/rpl/r/rpl_row_log_innodb.result: Updated result file mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result: Updated result file mysql-test/suite/rpl/r/rpl_truncate_3innodb.result: Updated result file mysql-test/suite/rpl/t/rpl_row_create_table.test: Updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result: Updated result file sql/log.cc: - Always write BEGIN and COMMIT around statements, even in autocommit mode. - Added comments for binlog_commit and binlog_rollback. sql/log_event.cc: Added debug trigger to avoid writing xid events to the binlog. mysql-test/suite/rpl_ndb/r/rpl_ndb_transaction.result: Results for new test case mysql-test/suite/rpl_ndb/t/rpl_ndb_transaction-master.opt: Options for new test case mysql-test/suite/rpl_ndb/t/rpl_ndb_transaction-slave.opt: Options for new test case mysql-test/suite/rpl_ndb/t/rpl_ndb_transaction.test: Added new test case.
-
- 27 Jun, 2007 1 commit
-
-
unknown authored
Move tests to their respective suite mysql-test/suite/binlog/t/binlog_innodb.test: Rename: mysql-test/t/binlog_innodb.test -> mysql-test/suite/binlog/t/binlog_innodb.test mysql-test/suite/binlog/r/binlog_innodb.result: Rename: mysql-test/r/binlog_innodb.result -> mysql-test/suite/binlog/r/binlog_innodb.result mysql-test/suite/binlog/t/binlog_multi_engine.test: Rename: mysql-test/t/binlog_multi_engine.test -> mysql-test/suite/binlog/t/binlog_multi_engine.test mysql-test/suite/binlog/r/binlog_multi_engine.result: Rename: mysql-test/r/binlog_multi_engine.result -> mysql-test/suite/binlog/r/binlog_multi_engine.result mysql-test/suite/rpl/t/rpl_grant.test: Rename: mysql-test/t/rpl_grant.test -> mysql-test/suite/rpl/t/rpl_grant.test mysql-test/suite/rpl/t/rpl_invoked_features-master.opt: Rename: mysql-test/t/rpl_invoked_features-master.opt -> mysql-test/suite/rpl/t/rpl_invoked_features-master.opt mysql-test/suite/rpl/t/rpl_invoked_features-slave.opt: Rename: mysql-test/t/rpl_invoked_features-slave.opt -> mysql-test/suite/rpl/t/rpl_invoked_features-slave.opt mysql-test/suite/rpl/t/rpl_invoked_features.test: Rename: mysql-test/t/rpl_invoked_features.test -> mysql-test/suite/rpl/t/rpl_invoked_features.test mysql-test/suite/rpl/t/rpl_loaddata_fatal-slave.opt: Rename: mysql-test/t/rpl_loaddata_fatal-slave.opt -> mysql-test/suite/rpl/t/rpl_loaddata_fatal-slave.opt mysql-test/suite/rpl/t/rpl_loaddata_fatal.test: Rename: mysql-test/t/rpl_loaddata_fatal.test -> mysql-test/suite/rpl/t/rpl_loaddata_fatal.test mysql-test/suite/rpl/t/rpl_slave_skip.test: Rename: mysql-test/t/rpl_slave_skip.test -> mysql-test/suite/rpl/t/rpl_slave_skip.test mysql-test/suite/rpl/r/rpl_grant.result: Rename: mysql-test/r/rpl_grant.result -> mysql-test/suite/rpl/r/rpl_grant.result mysql-test/suite/rpl/r/rpl_invoked_features.result: Rename: mysql-test/r/rpl_invoked_features.result -> mysql-test/suite/rpl/r/rpl_invoked_features.result mysql-test/suite/rpl/r/rpl_loaddata_fatal.result: Rename: mysql-test/r/rpl_loaddata_fatal.result -> mysql-test/suite/rpl/r/rpl_loaddata_fatal.result mysql-test/suite/rpl/r/rpl_slave_skip.result: Rename: mysql-test/r/rpl_slave_skip.result -> mysql-test/suite/rpl/r/rpl_slave_skip.result mysql-test/suite/rpl/t/disabled.def: Move disabling of rpl_invoked_features to suite/rpl/t/disabled.def mysql-test/t/disabled.def: Move disabling of rpl_invoked_features to suite/rpl/t/disabled.def
-
- 21 Jun, 2007 2 commits
-
-
unknown authored
Test fixes resulting from changed semantics. mysql-test/extra/rpl_tests/rpl_row_UUID.test: Using same engine throughout to prevent NDB tests from failing. mysql-test/r/binlog_multi_engine.result: Result change. mysql-test/r/ndb_read_multi_range.result: Result change. mysql-test/r/ndb_trigger.result: Result change. mysql-test/r/rpl_ndb_UUID.result: Result change. mysql-test/r/rpl_row_UUID.result: Result change. mysql-test/t/binlog_multi_engine.test: Removing garbage. mysql-test/t/ndb_read_multi_range.test: Using ndbcluster for table used inside trigger. mysql-test/t/ndb_trigger.test: Using ndbcluster for table used inside trigger.
-
unknown authored
WL#3931 (Multi-table statement involving self-logging engines): Adding logic to generate error if more than one engine is involved in the statement and at least one engine is self-logging (i.e., has the HA_HAS_OWN_BINLOGGING table flags set). mysql-test/r/binlog_multi_engine.result: Result change. mysql-test/t/binlog_multi_engine.test: Errors now generated for some statements due to NDB setting the HA_HAS_OWN_BINLOGGING flag. sql/sql_base.cc: Computing both the intersection and union of all table flags in the logic to decide logging format. Calculating if there are more than one engine involved in the statement. For this case, we only consider engines that hold tables that data is written to. Adding logic to generate error if more than one engine is involved in the statement and at least one engine is self-logging (i.e., has the HA_HAS_OWN_BINLOGGING table flags set). --- Renaming variable.
-
- 19 Jun, 2007 1 commit
-
-
unknown authored
mysql-test/r/binlog_multi_engine.result: Result change mysql-test/t/binlog_multi_engine.test: Fixing test case. Keeping some bad statements in the test since I don't want to disable the entire test. Have marked the offending statement so that they can easily be found.
-
- 18 Jun, 2007 1 commit
-
-
unknown authored
mysql-test/r/binlog_multi_engine.result: Result change mysql-test/t/binlog_multi_engine.test: Commenting out statements that generate non-deterministic results.
-
- 14 Jun, 2007 1 commit
-
-
unknown authored
Test case fixes. mysql-test/r/binlog_multi_engine.result: Result change. mysql-test/r/rpl_ndb_stm_innodb.result: Result change. mysql-test/t/binlog_multi_engine.test: NDB tests only work in MIXED or ROW mode. Adding some cleanup actions. mysql-test/t/loaddata_autocom_ndb.test: NDB requires MIXED or ROW mode. mysql-test/t/ndb_alter_table.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_alter_table2.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_alter_table3.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_autodiscover.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_autodiscover2.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_autodiscover3.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_basic.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_binlog_log_bin.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_binlog_multi.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_bitfield.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_blob.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_blob_partition.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_cache.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_cache2.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_cache_multi.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_cache_multi2.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_charset.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_condition_pushdown.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_config.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_config2.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_cursor.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_database.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_dd_alter.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_dd_backuprestore.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_dd_basic.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_dd_ddl.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_dd_disk2memory.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_dd_dump.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_dd_sql_features.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_gis.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_index.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_index_ordered.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_index_unique.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_insert.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_limit.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_loaddatalocal.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_lock.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_minmax.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_multi.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_partition_error.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_partition_key.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_partition_list.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_partition_range.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_read_multi_range.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_rename.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_replace.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_restore.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_restore_partition.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_restore_print.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_row_format.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_single_user.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_sp.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_subquery.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_temporary.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_transaction.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_trigger.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_truncate.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_types.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_update.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndb_view.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ndbapi.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/ps_7ndb.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/rpl_ndb_commit_afterflush.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/rpl_ndb_innodb_trans.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode. mysql-test/t/rpl_ndb_stm_innodb.test: We need MIXED mode on slave since it is necessary to let the slave switch to row format when executing replicated statements. mysql-test/t/strict_autoinc_5ndb.test: NDB requires MIXED or ROW mode, but will switch to row format automatically, so we only run these tests under ROW mode.
-
- 13 Jun, 2007 1 commit
-
-
unknown authored
Post-merge fixes. BitKeeper/deleted/.del-ndb_binlog_basic2.test: Delete: mysql-test/t/ndb_binlog_basic2.test BitKeeper/deleted/.del-ndb_binlog_basic2.result: Delete: mysql-test/r/ndb_binlog_basic2.result mysql-test/r/binlog_innodb.result: Result change mysql-test/r/binlog_multi_engine.result: Result change mysql-test/t/binlog_multi_engine.test: Changed error code mysql-test/t/partition_hash.test: Changed error code sql/sql_class.h: Fixes to select_create constructor argument list.
-
- 28 May, 2007 1 commit
-
-
unknown authored
Adding support to allow engines to tell what formats they can handle. The server will generate an error if it is not possible to log the statement according to the logging mode in effect. Adding flags to several storage engines to state what they can handle. Changes to NDB handler removing code that forces row-based mode and adding flag saying that NDB can only handle row format. Adding check that binlog flags are only used for real tables that are opened for writing. BitKeeper/deleted/.del-binlog_row_blackhole.result: Rename: mysql-test/r/binlog_row_blackhole.result -> BitKeeper/deleted/.del-binlog_row_blackhole.result BitKeeper/deleted/.del-binlog_row_blackhole.test: Rename: mysql-test/t/binlog_row_blackhole.test -> BitKeeper/deleted/.del-binlog_row_blackhole.test mysql-test/t/partition_hash.test: Adding error check for statement that might fail. sql/ha_ndbcluster.cc: Removing statements that switch to row-based format. Adding row capabilities. sql/handler.h: Adding handler/table flags to indicate that the engine is row- and/or statement-logging capable. Adding typedef for table_flags type. sql/set_var.cc: Removing code that prevents changing binlog format when NDB is active. sql/share/errmsg.txt: Adding error messages for when row- and/or statement-based logging formats cannot be used. sql/sql_base.cc: Adding business logic in lock_tables() to decide when an error should be thrown because logging is not possible. Add logic to switch to row format when that is allowed and needed. --- Binlog flags should only be checked for real tables that are opened for writing. Adding code to check that. storage/archive/ha_archive.h: Adding row- and statement-logging capabilities to engine. storage/blackhole/ha_blackhole.h: Blackhole can handle statement-format only. storage/csv/ha_tina.h: Adding row- and statement-logging capabilities to engine. storage/example/ha_example.h: For the example engine, we arbitrarily decided that it only can handle row format. storage/federated/ha_federated.h: Adding row- and statement-logging capabilities to engine. storage/heap/ha_heap.h: Heap can handle both row- and statement-based logging format. storage/myisam/ha_myisam.cc: MyISAM can handle both row- and statement-based logging format. storage/myisammrg/ha_myisammrg.h: MyISAM can handle both row- and statement-based logging format. mysql-test/r/binlog_multi_engine.result: New BitKeeper file ``mysql-test/r/binlog_multi_engine.result'' mysql-test/t/binlog_multi_engine.test: New BitKeeper file ``mysql-test/t/binlog_multi_engine.test''
-