mariadb/mysql-test/suite
unknown f4d5dacf43 Merge the following patch from MySQL 5.6.10, in order to make perfschema.binlog_* tests work.
revno: 4559
committer: Marc Alff <marc.alff@oracle.com>
branch nick: mysql-5.6-bug14741537-v4
timestamp: Thu 2012-11-08 22:40:31 +0100
message:
  Bug#14741537 - MYSQL 5.6, GTID AND PERFORMANCE_SCHEMA
  
  Before this fix, statements using performance_schema tables:
  - were marked as unsafe for replication,
  - did cause warnings during execution,
  - were written to the binlog, either in STATEMENT or ROW format.
  
  When using replication with the new GTID feature,
  unsafe warnings are elevated to errors,
  which prevents to use both the performance_schema and GTID together.
  
  The root cause of the problem is not related to raising warnings/errors
  in some special cases, but deeper: statements involving the performance
  schema should not even be written to the binary log in the first place,
  because the content of the performance schema tables is 'local' to a server
  instance, and may differ greatly between nodes in a replication
  topology.
  
  In particular, the DBA should be able to configure (INSERT, UPDATE, DELETE)
  or flush (TRUNCATE) performance schema tables on one node,
  without affecting other nodes.
  
  This fix introduces the concept of a 'non-replicated' or 'local' table,
  and adjusts the replication logic to ignore tables that are not replicated
  when deciding if or how to log a statement to the binlog.
  
  Note that while this issue was detected using the performance_schema,
  other tables are also affected by the same problem.
  
  This fix define as 'local' the following tables, which are then never
  replicated:
  - performance_schema.*
  - mysql.general_log
  - mysql.slow_log
  - mysql.slave_relay_log_info
  - mysql.slave_master_info
  - mysql.slave_worker_info
  
  Existing behavior for information_schema.* is unchanged by this fix,
  to limit the scope of changes.
  
  Coding wise, this fix implements the following changes:
  
  1)
  
  Performance schema tables are not using any replication flags,
  since performance schema tables are not replicated.
  
  2)
  
  In open_table_from_share(),
  tables with no replication capabilities (performance_schema.*),
  tables with TABLE_CATEGORY_LOG (logs)
  and tables with TABLE_CATEGORY_RPL_INFO (replication)
  are marked as non replicated, with TABLE::no_replicate
  
  3)
  
  A new THD member, THD::m_binlog_filter_state,
  indicate if the current statement is written to the binlog
  (normal cases for most statements), or is to be discarded
  (because the statements affects non replicated tables).
  
  4)
  
  In THD::decide_logging_format(), the replication logic
  is changed to take into account non replicated tables.
  
  Statements that affect only non replicated tables are
  executed normally (no warning or errors), but not written
  to the binlog.
  
  Statements that affect (i.e., write to) a replicated table
  while also using (i.e., reading from or writing to) a non replicated table
  are executed normally in MIXED and ROW binlog format,
  and cause a new error in STATEMENT binlog format.
  
  THD::decide_logging_format() uses THD::m_binlog_filter_state
  to indicate if a statement is to be ignored, when writing to
  the binlog.
  
  5)
  
  In THD::binlog_query(), statements marked as ignored
  are not written to the binary log.
  
  6)
  
  For row based replication, the existing test for 'table->no_replicate',
  has been moved from binlog_log_row() to check_table_binlog_row_based().
2013-07-11 21:23:55 +03:00
..
archive Fixes after Serg's review of %M extenstions 2012-06-17 15:34:39 +03:00
binlog Post-merge buildbot fixes: 2013-07-05 19:57:48 +04:00
csv More trivial test result updates 2013-07-08 18:29:52 +04:00
engines MDEV-3990: engine tests went out of sync with current MariaDB code 2013-01-13 17:01:34 +04:00
federated Trivial test result updates. 2013-07-09 13:40:26 +04:00
funcs_1 More trivial test result updates 2013-07-08 18:29:52 +04:00
funcs_2 overlay support for mysql-test-run and mysqltest 2012-02-23 07:50:11 +01:00
handler 10.0-monty: trivial test result updates 2013-07-09 15:39:57 +04:00
heap 5.3->5.5 merge 2012-11-22 10:19:31 +01:00
innodb Trivial test result updates. 2013-07-09 13:40:26 +04:00
jp overlay support for mysql-test-run and mysqltest 2012-02-23 07:50:11 +01:00
large_tests BUG#11877618: rpl_slave_net_timeout fails in rpl_sync.inc (at sync_slave_with_master) 2011-03-17 11:31:42 +01:00
manual BUG#49978: Replication tests don't clean up replication state at the end 2010-12-19 18:07:28 +01:00
maria More trivial test result updates 2013-07-08 18:29:52 +04:00
mtr/t overlay support for mysql-test-run and mysqltest 2012-02-23 07:50:11 +01:00
mtr2 MDEV-399 Combinations defined in the base suite cannot be skipped by overlay 2012-08-01 19:57:36 +02:00
multi_source 10.0-base merge 2013-01-31 09:48:19 +01:00
optimizer_unfixed_bugs 10.0-monty: trivial test result updates 2013-07-09 15:39:57 +04:00
oqgraph Update test results to fix trivial test failures in parts testsuite 2013-07-07 14:09:52 +04:00
parts More trivial test result updates 2013-07-08 18:29:52 +04:00
percona Fixing test cases 2012-08-23 00:32:25 +03:00
perfschema Merge the following patch from MySQL 5.6.10, in order to make perfschema.binlog_* tests work. 2013-07-11 21:23:55 +03:00
perfschema_stress mysql-5.5 merge 2012-01-16 20:16:35 +01:00
plugins Skip cassandra_qcache.test if there is no Cassandra cluster running. 2013-02-04 10:38:31 +04:00
rpl Update test results to fix trivial test failures in parts testsuite 2013-07-07 14:09:52 +04:00
sphinx 10.0-base merge 2013-01-31 09:48:19 +01:00
storage_engine MDEV-3990: engine tests went out of sync with current MariaDB code 2013-01-13 17:01:34 +04:00
stress Bug #11751927 42960: MTR2: NO MORE --STRESS PARAMETERS 2011-09-15 12:34:32 +02:00
sys_vars 10.0-monty: trivial test result updates 2013-07-09 15:39:57 +04:00
unit post-merge changes to the mysql-test suite 2011-10-19 23:01:15 +02:00
vcol 10.0-base merge 2013-01-31 09:48:19 +01:00