-
unknown authored
With this patch, statements that change metadata (in the mysql database) is logged as statements, while normal changes (e.g., using INSERT, DELETE, and/or UPDATE) is logged according to the format in effect. The log tables (i.e., general_log and slow_log) are not replicated at all. With this patch, the following statements are replicated as statements: GRANT, REVOKE (ALL), CREATE USER, DROP USER, and RENAME USER. mysql-test/extra/binlog_tests/binlog.test: Added test to check that normal INSERT, DELETE, and UPDATE to a table in the mysql database is replicated both under row-based and statement-based replication. mysql-test/r/binlog_row_binlog.result: Result change. mysql-test/r/binlog_stm_binlog.result: Result change. sql/handler.cc: Removed hardcoded check for mysql database. Added table-specific flag for non-replication (used by log tables). sql/log.cc: Adding flag that a table shall not be replicated and set it for log tables. sql/sp.cc: Turning row-based replication off for statements that change metadata. sql/sql_acl.cc: Turning row-based replication off for statements that change metadata. sql/table.h: Adding flag that a table shall not be replicated.
cdfc516d