{"id":19628,"date":"2019-10-30T14:30:00","date_gmt":"2019-10-30T05:30:00","guid":{"rendered":"https:\/\/labs.gree.jp\/blog\/?p=19628"},"modified":"2019-10-30T14:34:06","modified_gmt":"2019-10-30T05:34:06","slug":"post19628","status":"publish","type":"post","link":"https:\/\/labs.gree.jp\/blog\/2019\/10\/19628\/","title":{"rendered":"\u30c1\u30e7\u30c3\u30c8\u30ef\u30ab\u30eb Row-Based Replication\u30fb\u305d\u306e\uff12"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u308f\u3002\u305b\u3058\u307e\u3067\u3059\u3002\u4eca\u56de\u3082 replication \u306e\u8a71\u3092\u3057\u307e\u3059\u3002<\/p>\n<h2>\u306f\u3058\u3081\u306b<\/h2>\n<p>\u7b2c\u4e8c\u56de\u3067\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306e\u4e3b\u306a\u304a\u984c\u306f\u3001 THD::decide_logging_format() \u3068\u3044\u3046\u95a2\u6570\u306b\u306a\u308a\u307e\u3059\u3002 THD::decide_logging_format() \u306e\u4ed5\u69d8\u304c\u308f\u304b\u308b\u3068\u3001binlog_format \u304c\u539f\u56e0\u3067 replication \u6b62\u307e\u308b\u7406\u7531\u304c\u3001\uff08\u305d\u3053\u305d\u3053\uff09\u308f\u304b\u308b\u3088\u3046\u306b\u306a\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u307e\u305f\u3001Row-Based Replication \u306b\u79fb\u884c\u3057\u305f\u3068\u304d\u3001 THD::decide_logging_format() \u4ee5\u5916\u3067 replication \u304c\u505c\u6b62\u3057\u3066\u3057\u307e\u3046\u30b1\u30fc\u30b9\u306a\u3069\u306b\u3064\u3044\u3066\u3082\u3001\u8efd\u304f\u30e1\u30e2\u7a0b\u5ea6\u306b\u66f8\u3044\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<h2>THD::decide_logging_format() \u306b\u3064\u3044\u3066<\/h2>\n<p>\uff08MySQL Internals \u306f\u5fae\u5999\u306b\u5185\u5bb9\u304c\u53e4\u304b\u3063\u305f\u308a\u3059\u308b\u3093\u3067\u3059\u304c\uff09\u3001\u53c2\u8003\u307e\u3067\u306b\u3001\u307e\u305a\u306f <a href=\"https:\/\/dev.mysql.com\/doc\/internals\/en\/determining-logging-format.html\">19.4.1 Determining the Logging Format<\/a> \u3092\u8aad\u3093\u3067\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<blockquote><p>\n  At parse time, it is detected if the statement is unsafe to log in statement format (that is, requires row format). If this is the case, the THD::Lex::set_stmt_unsafe() function is called. This must be done prior to the call to THD::decide_logging_format() (that is, prior to lock_tables). As a special case, some types of unsafeness are detected inside THD::decide_logging_format(), before the logging format is decided. Note that statements shall be marked unsafe even if binlog_format!=mixed.\n<\/p><\/blockquote>\n<p>\u6b21\u306f\u3001\u5177\u4f53\u7684\u306b\u3001 SQLCOM_UPDATE \u53d7\u3051\u305f\u3068\u3053\u308d\u304b\u3089\u3001 THD::decide_logging_format() \u3092\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002\u4eca\u56de\u3082 MySQL 8.0.12 \u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u30d9\u30fc\u30b9\u306b\u8aad\u3093\u3067\u3044\u304d\u307e\u3059\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/mysql\/mysql-server\/blob\/mysql-8.0.12\/sql\/sql_parse.cc#L3218\">https:\/\/github.com\/mysql\/mysql-server\/blob\/mysql-8.0.12\/sql\/sql_parse.cc#L3218<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/mysql\/mysql-server\/blob\/mysql-8.0.12\/sql\/sql_parse.cc#L3228\">https:\/\/github.com\/mysql\/mysql-server\/blob\/mysql-8.0.12\/sql\/sql_parse.cc#L3228<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/mysql\/mysql-server\/blob\/mysql-8.0.12\/sql\/sql_select.cc#L469\">https:\/\/github.com\/mysql\/mysql-server\/blob\/mysql-8.0.12\/sql\/sql_select.cc#L469<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/mysql\/mysql-server\/blob\/mysql-8.0.12\/sql\/sql_select.cc#L550\">https:\/\/github.com\/mysql\/mysql-server\/blob\/mysql-8.0.12\/sql\/sql_select.cc#L550<\/a><\/li>\n<\/ul>\n<pre class=\"start-line:543 lang:c++\" ><code>  \/*\n    Locking of tables is done after preparation but before optimization.\n    This allows to do better partition pruning and avoid locking unused\n    partitions. As a consequence, in such a case, prepare stage can rely only\n    on metadata about tables used and not data from them.\n  *\/\n  if (!is_empty_query()) {\n    if (lock_tables(thd, lex->query_tables, lex->table_count, 0)) goto err;\n  }\n\n  \/\/ Perform statement-specific execution\n  if (execute_inner(thd)) goto err;<\/pre>\n<p>\u3053\u3093\u306a\u304b\u3093\u3058\u3067 statement \u3092\u5b9f\u884c\u3059\u308b\u524d\u306b\u3044\u3063\u305f\u3093 lock_tables() \u3092\u5b9f\u884c\u3057\u3066\u304a\u308a\u307e\u3057\u3066<\/p>\n<p>lock_tables() \u306e\u4e2d\u3067 THD::decide_logging_format() \u304c\u547c\u3070\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/mysql\/mysql-server\/blob\/mysql-8.0.12\/sql\/sql_base.cc#L6436\">https:\/\/github.com\/mysql\/mysql-server\/blob\/mysql-8.0.12\/sql\/sql_base.cc#L6436<\/a><\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/mysql\/mysql-server\/blob\/mysql-8.0.12\/sql\/sql_base.cc#L6461\">https:\/\/github.com\/mysql\/mysql-server\/blob\/mysql-8.0.12\/sql\/sql_base.cc#L6461<\/a> \u3068\u304b<\/li>\n<li><a href=\"https:\/\/github.com\/mysql\/mysql-server\/blob\/mysql-8.0.12\/sql\/sql_base.cc#L6581\">https:\/\/github.com\/mysql\/mysql-server\/blob\/mysql-8.0.12\/sql\/sql_base.cc#L6581<\/a> \u3068\u304b<\/li>\n<\/ul>\n<p>THD::decide_logging_format() \u3068\u3044\u3046\u95a2\u6570\u306b\u3064\u3044\u3066\u3067\u3059\u304c\u3001<a href=\"https:\/\/github.com\/mysql\/mysql-server\/blob\/mysql-8.0.12\/sql\/binlog.cc#L9654-L9752\">\u30b3\u30e1\u30f3\u30c8<\/a>\u304c\u3051\u3063\u3053\u3046\u5145\u5b9f\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3056\u3063\u304f\u308a\u307e\u3068\u3081\u306f\u30b3\u30e1\u30f3\u30c8\u306e\u3068\u304a\u308a\u3067<\/p>\n<pre class=\"start-line:9678 lang:c++\" ><code>  Decision table for logging format\n  ---------------------------------\n\n  The following table summarizes how the format and generated\n  warning\/error depends on the tables' capabilities, the statement\n  type, and the current binlog_format.\n\n     Row capable        N NNNNNNNNN YYYYYYYYY YYYYYYYYY\n     Statement capable  N YYYYYYYYY NNNNNNNNN YYYYYYYYY\n\n     Statement type     * SSSUUUIII SSSUUUIII SSSUUUIII\n\n     binlog_format      * SMRSMRSMR SMRSMRSMR SMRSMRSMR\n\n     Logged format      - SS-S----- -RR-RR-RR SRRSRR-RR\n     Warning\/Error      1 --2732444 5--5--6-- ---7--6--\n\n  Legend\n  ------\n\n  Row capable:    N - Some table not row-capable, Y - All tables row-capable\n  Stmt capable:   N - Some table not stmt-capable, Y - All tables stmt-capable\n  Statement type: (S)afe, (U)nsafe, or Row (I)njection\n  binlog_format:  (S)TATEMENT, (M)IXED, or (R)OW\n  Logged format:  (S)tatement or (R)ow\n  Warning\/Error:  Warnings and error messages are as follows:\n\n  1. Error: Cannot execute statement: binlogging impossible since both\n     row-incapable engines and statement-incapable engines are\n     involved.\n\n  2. Error: Cannot execute statement: binlogging impossible since\n     BINLOG_FORMAT = ROW and at least one table uses a storage engine\n     limited to statement-logging.\n\n  3. Error: Cannot execute statement: binlogging of unsafe statement\n     is impossible when storage engine is limited to statement-logging\n     and BINLOG_FORMAT = MIXED.\n\n  4. Error: Cannot execute row injection: binlogging impossible since\n     at least one table uses a storage engine limited to\n     statement-logging.\n\n  5. Error: Cannot execute statement: binlogging impossible since\n     BINLOG_FORMAT = STATEMENT and at least one table uses a storage\n     engine limited to row-logging.\n\n  6. Error: Cannot execute row injection: binlogging impossible since\n     BINLOG_FORMAT = STATEMENT.\n\n  7. Warning: Unsafe statement binlogged in statement format since\n     BINLOG_FORMAT = STATEMENT.\n\n  In addition, we can produce the following error (not depending on\n  the variables of the decision diagram):\n\n  8. Error: Cannot execute statement: binlogging impossible since more\n     than one engine is involved and at least one engine is\n     self-logging.\n\n  9. Error: Do not allow users to modify a gtid_executed table\n     explicitly by a XA transaction.\n\n  For each error case above, the statement is prevented from being\n  logged, we report an error, and roll back the statement.  For\n  warnings, we set the thd->binlog_flags variable: the warning will be\n  printed only if the statement is successfully logged.<\/code><\/pre>\n<p>Row Injection \u3068\u3044\u3046\u306e\u306f\u3001 binlog_format=ROW \u306b\u3057\u305f\u3068\u304d binlog \u306b\u51fa\u529b\u3055\u308c\u308b\u3001UPDATE_ROWS_EVENT \u306a\u3069\u306e\u3053\u3068\u3067\u3057\u3087\u3046\u306d\u3002\u305d\u308c\u3089\u3092 SQL_Thread \u306a\u3069\u3067\u5b9f\u884c\u3059\u308b\u5834\u5408\u304c Statement Type = I \u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u9806\u3092\u8ffd\u3063\u3066\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>Row capable \u3067\u3082 Stmt capable \u3067\u3082\u306a\u3044 storage engine \u306e\u4f8b\u306e\u4e00\u3064\u306f\u3001 performance schema \u3067\u3059\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/mysql\/mysql-server\/blob\/mysql-8.0.12\/storage\/perfschema\/ha_perfschema.h#L73-L97\">https:\/\/github.com\/mysql\/mysql-server\/blob\/mysql-8.0.12\/storage\/perfschema\/ha_perfschema.h#L73-L97<\/a><\/p>\n<pre class=\"start-line:94 lang:c++\" ><code>    return HA_NO_TRANSACTIONS | HA_NO_AUTO_INCREMENT |\n           HA_PRIMARY_KEY_REQUIRED_FOR_DELETE | HA_NULL_IN_KEY |\n           HA_NULL_PART_KEY;<\/code><\/pre>\n<p>\u300c\u9593\u9055\u3063\u3066\u3082 replication \u3067\u304d\u308b\u3068\u601d\u3046\u306a\u3088\uff1f\u300d\u3068\u3044\u3046\u3053\u3068\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>Stmt capable \u3067\u3042\u308a Row capable \u3067\u306a\u3044 storage engine \u3067\u3059\u304c\u3001\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u4e0a\u3067\u306f\u30c6\u30b9\u30c8\u306e\u305f\u3081\u306b \u5b58\u5728\u3057\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u3002 \u306a\u306e\u3067\u3001\u3053\u308c\u306f\u3044\u3063\u305f\u3093\u5fd8\u308c\u3066\u3082\u826f\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/mysql\/mysql-server\/blob\/mysql-8.0.12\/storage\/example\/ha_example.h#L100\">https:\/\/github.com\/mysql\/mysql-server\/blob\/mysql-8.0.12\/storage\/example\/ha_example.h#L100<\/a><\/p>\n<pre class=\"start-line:90 lang:c++\" ><code>  \/** @brief\n    This is a list of flags that indicate what functionality the storage engine\n    implements. The current table flags are documented in handler.h\n  *\/\n  ulonglong table_flags() const {\n    \/*\n      We are saying that this engine is just statement capable to have\n      an engine that can only handle statement-based logging. This is\n      used in testing.\n    *\/\n    return HA_BINLOG_STMT_CAPABLE;\n  }<\/code><\/pre>\n<p>Row capable \u3067\u3042\u308a Stmt capable \u3067\u306a\u3044 storage engine \u3067\u3059\u304c\u3001\u8eab\u8fd1\u306a\u3068\u3053\u308d\u3067\u3044\u3046\u3068\u3001  READ COMMITTED or READ UNCOMMITTED \u306a InnoDB \u304c\u8a72\u5f53\u3057\u307e\u3059\u3002InnoDB \u304c Stmt capable \u3067\u3042\u308b\u306e\u306f\u3001 Isolation level \u304c REPEATABLE READ \u304b SERIALIZABLE \u306e\u3068\u304d\u306b\u9650\u3089\u308c\u308b\u308f\u3051\u3067\u3059\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/mysql\/mysql-server\/blob\/mysql-8.0.12\/storage\/innobase\/handler\/ha_innodb.cc#L5215-L5244\">https:\/\/github.com\/mysql\/mysql-server\/blob\/mysql-8.0.12\/storage\/innobase\/handler\/ha_innodb.cc#L5215-L5244<\/a><\/li>\n<\/ul>\n<pre class=\"start-line:5215 lang:c++\" ><code>handler::Table_flags ha_innobase::table_flags() const {\n  THD *thd = ha_thd();\n  handler::Table_flags flags = m_int_table_flags;\n\n  \/* If querying the table flags when no table_share is given,\n  then we must check if the table to be created\/checked is partitioned.\n  *\/\n  if (table_share == NULL && thd_get_work_part_info(thd) != NULL) {\n    \/* Currently ha_innopart does not support\n    all InnoDB features such as GEOMETRY, FULLTEXT etc. *\/\n    flags &= ~(HA_INNOPART_DISABLED_TABLE_FLAGS);\n  }\n\n  \/* Temporary table provides accurate record count *\/\n  if (table_share != NULL &&\n      table_share->table_category == TABLE_CATEGORY_TEMPORARY) {\n    flags |= HA_STATS_RECORDS_IS_EXACT;\n  }\n\n  \/* Need to use tx_isolation here since table flags is (also)\n  called before prebuilt is inited. *\/\n\n  ulong const tx_isolation = thd_tx_isolation(thd);\n\n  if (tx_isolation <= ISO_READ_COMMITTED) {\n    return (flags);\n  }\n\n  return (flags | HA_BINLOG_STMT_CAPABLE);\n}<\/code><\/pre>\n<p>\u3068\u3044\u3063\u305f\u3053\u3068\u3092\u8e0f\u307e\u3048\u308b\u3068\u3001\u60f3\u5b9a\u3059\u3079\u304d\u73fe\u5b9f\u7684\u306a Decision table for logging format \u306f\u3001\u6b21\u306e\u3088\u3046\u306a\u3082\u306e\u3067\u3057\u3087\u3046\u3002<\/p>\n<ul>\n<li>InnoDB \u3067 READ COMMITTED or READ UNCOMMITTED \u306a\u3068\u304d<\/li>\n<\/ul>\n<table>\n<thead>\n<tr>\n<th><\/th>\n<th align=\"center\"><\/th>\n<th align=\"center\"><\/th>\n<th align=\"center\"><\/th>\n<th align=\"center\"><\/th>\n<th align=\"center\"><\/th>\n<th align=\"center\"><\/th>\n<th align=\"center\"><\/th>\n<th align=\"center\"><\/th>\n<th align=\"center\"><\/th>\n<th align=\"center\"><\/th>\n<th align=\"center\"><\/th>\n<th align=\"center\"><\/th>\n<th align=\"center\"><\/th>\n<th align=\"center\"><\/th>\n<th align=\"center\"><\/th>\n<th align=\"center\"><\/th>\n<th align=\"center\"><\/th>\n<th align=\"center\"><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Row capable<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<\/tr>\n<tr>\n<td>Statement capable<\/td>\n<td align=\"center\">N<\/td>\n<td align=\"center\">N<\/td>\n<td align=\"center\">N<\/td>\n<td align=\"center\">N<\/td>\n<td align=\"center\">N<\/td>\n<td align=\"center\">N<\/td>\n<td align=\"center\">N<\/td>\n<td align=\"center\">N<\/td>\n<td align=\"center\">N<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<\/tr>\n<tr>\n<td>Statement type<\/td>\n<td align=\"center\">S<\/td>\n<td align=\"center\">S<\/td>\n<td align=\"center\">S<\/td>\n<td align=\"center\">U<\/td>\n<td align=\"center\">U<\/td>\n<td align=\"center\">U<\/td>\n<td align=\"center\">I<\/td>\n<td align=\"center\">I<\/td>\n<td align=\"center\">I<\/td>\n<td align=\"center\">S<\/td>\n<td align=\"center\">S<\/td>\n<td align=\"center\">S<\/td>\n<td align=\"center\">U<\/td>\n<td align=\"center\">U<\/td>\n<td align=\"center\">U<\/td>\n<td align=\"center\">I<\/td>\n<td align=\"center\">I<\/td>\n<td align=\"center\">I<\/td>\n<\/tr>\n<tr>\n<td>binlog_format<\/td>\n<td align=\"center\">S<\/td>\n<td align=\"center\">M<\/td>\n<td align=\"center\">R<\/td>\n<td align=\"center\">S<\/td>\n<td align=\"center\">M<\/td>\n<td align=\"center\">R<\/td>\n<td align=\"center\">S<\/td>\n<td align=\"center\">M<\/td>\n<td align=\"center\">R<\/td>\n<td align=\"center\">S<\/td>\n<td align=\"center\">M<\/td>\n<td align=\"center\">R<\/td>\n<td align=\"center\">S<\/td>\n<td align=\"center\">M<\/td>\n<td align=\"center\">R<\/td>\n<td align=\"center\">S<\/td>\n<td align=\"center\">M<\/td>\n<td align=\"center\">R<\/td>\n<\/tr>\n<tr>\n<td>Logged format<\/td>\n<td align=\"center\">-<\/td>\n<td align=\"center\">R<\/td>\n<td align=\"center\">R<\/td>\n<td align=\"center\">-<\/td>\n<td align=\"center\">R<\/td>\n<td align=\"center\">R<\/td>\n<td align=\"center\">-<\/td>\n<td align=\"center\">R<\/td>\n<td align=\"center\">R<\/td>\n<td align=\"center\">S<\/td>\n<td align=\"center\">R<\/td>\n<td align=\"center\">R<\/td>\n<td align=\"center\">S<\/td>\n<td align=\"center\">R<\/td>\n<td align=\"center\">R<\/td>\n<td align=\"center\">-<\/td>\n<td align=\"center\">R<\/td>\n<td align=\"center\">R<\/td>\n<\/tr>\n<tr>\n<td>Warning\/Error<\/td>\n<td align=\"center\">5<\/td>\n<td align=\"center\">-<\/td>\n<td align=\"center\">-<\/td>\n<td align=\"center\">5<\/td>\n<td align=\"center\">-<\/td>\n<td align=\"center\">-<\/td>\n<td align=\"center\">6<\/td>\n<td align=\"center\">-<\/td>\n<td align=\"center\">-<\/td>\n<td align=\"center\">-<\/td>\n<td align=\"center\">-<\/td>\n<td align=\"center\">-<\/td>\n<td align=\"center\">7<\/td>\n<td align=\"center\">-<\/td>\n<td align=\"center\">-<\/td>\n<td align=\"center\">6<\/td>\n<td align=\"center\">-<\/td>\n<td align=\"center\">-<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ul>\n<li>InnoDB \u3067 READ COMMITTED \u3084 READ UNCOMMITTED \u3092\u4f7f\u7528\u3057\u306a\u3044\u3068\u304d\u3001\u3042\u308b\u3044\u306f MyISAM \u3084 ARCHIVE ENGINE \u306a\u3069\u4f7f\u3046\u3068\u304d<\/li>\n<\/ul>\n<table>\n<thead>\n<tr>\n<th><\/th>\n<th align=\"center\"><\/th>\n<th align=\"center\"><\/th>\n<th align=\"center\"><\/th>\n<th align=\"center\"><\/th>\n<th align=\"center\"><\/th>\n<th align=\"center\"><\/th>\n<th align=\"center\"><\/th>\n<th align=\"center\"><\/th>\n<th align=\"center\"><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Row capable<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<\/tr>\n<tr>\n<td>Statement capable<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<td align=\"center\">Y<\/td>\n<\/tr>\n<tr>\n<td>Statement type<\/td>\n<td align=\"center\">S<\/td>\n<td align=\"center\">S<\/td>\n<td align=\"center\">S<\/td>\n<td align=\"center\">U<\/td>\n<td align=\"center\">U<\/td>\n<td align=\"center\">U<\/td>\n<td align=\"center\">I<\/td>\n<td align=\"center\">I<\/td>\n<td align=\"center\">I<\/td>\n<\/tr>\n<tr>\n<td>binlog_format<\/td>\n<td align=\"center\">S<\/td>\n<td align=\"center\">M<\/td>\n<td align=\"center\">R<\/td>\n<td align=\"center\">S<\/td>\n<td align=\"center\">M<\/td>\n<td align=\"center\">R<\/td>\n<td align=\"center\">S<\/td>\n<td align=\"center\">M<\/td>\n<td align=\"center\">R<\/td>\n<\/tr>\n<tr>\n<td>Logged format<\/td>\n<td align=\"center\">S<\/td>\n<td align=\"center\">R<\/td>\n<td align=\"center\">R<\/td>\n<td align=\"center\">S<\/td>\n<td align=\"center\">R<\/td>\n<td align=\"center\">R<\/td>\n<td align=\"center\">-<\/td>\n<td align=\"center\">R<\/td>\n<td align=\"center\">R<\/td>\n<\/tr>\n<tr>\n<td>Warning\/Error<\/td>\n<td align=\"center\">-<\/td>\n<td align=\"center\">-<\/td>\n<td align=\"center\">-<\/td>\n<td align=\"center\">7<\/td>\n<td align=\"center\">-<\/td>\n<td align=\"center\">-<\/td>\n<td align=\"center\">6<\/td>\n<td align=\"center\">-<\/td>\n<td align=\"center\">-<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u307e\u3041\u3001THD::decide_logging_format() \u306e\u4e2d\u3067\u306f THD::is_dml_gtid_compatible() \u3082\u547c\u3093\u3067\u3044\u3066\u3001 GTID \u3068\u306e\u4e92\u63db\u6027\u3092\u78ba\u8a8d\u3057\u3066\u3044\u305f\u308a\u3082\u3059\u308b\u306e\u3067\u3001\u5c06\u6765 GTID \u5bfe\u5fdc\u306b\u3057\u305f\u3044\u306a\u3089\u3001InnoDB \u4ee5\u5916\u306f\u8003\u3048\u306a\u3044\u307b\u3046\u304c\u3044\u3044\u3067\u3057\u3087\u3046\u306d\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b decide_logging_format() \u306e\u4e2d\u3067 HA_HAS_OWN_BINLOGGING \u3068\u3044\u3046\u30d5\u30e9\u30b0\u304c\u51fa\u3066\u304d\u3066 own_binlogging \u3063\u3066\u306a\u3093\u3060\u3088\u3063\u3066\u8a71\u306b\u306a\u308a\u307e\u3059\u304c\u3001 ndbcluster\u3001\u3044\u308f\u3086\u308b MySQL NDB Cluster \u306e\u3053\u3068\u3067\u3059\u306d\u3002<\/p>\n<p>Decision table \u306b\u51fa\u3066\u3053\u306a\u3044\u6b21\u306e error \u306b\u3064\u3044\u3066\u3067\u3059\u304c<\/p>\n<pre class=\"start-line:9731 lang:c++\" ><code>  In addition, we can produce the following error (not depending on\n  the variables of the decision diagram):\n\n  8. Error: Cannot execute statement: binlogging impossible since more\n     than one engine is involved and at least one engine is\n     self-logging.\n\n  9. Error: Do not allow users to modify a gtid_executed table\n     explicitly by a XA transaction.<\/code><\/pre>\n<p>8 \u306f own_binlogging \u306a ndbcluster \u306e\u8a71\u3067\u3059\u306d<\/p>\n<p><a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/ja\/mysql-cluster-replication-issues.html\">18.6.3 MySQL Cluster \u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u65e2\u77e5\u306e\u554f\u984c<\/a><\/p>\n<blockquote><p>\n  \u30d0\u30a4\u30ca\u30ea\u30ed\u30ae\u30f3\u30b0\u3092\u5b9f\u884c\u3057\u3066\u3044\u306a\u3044\u30b9\u30ec\u30fc\u30d6\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u30a8\u30f3\u30b8\u30f3\u3078\u306e NDB \u306e\u8907\u88fd<br \/>\n  \u72ec\u81ea\u306e\u30d0\u30a4\u30ca\u30ea\u30ed\u30ae\u30f3\u30b0\u3092\u51e6\u7406\u3057\u306a\u3044\u30b9\u30c8\u30ec\u30fc\u30b8\u30a8\u30f3\u30b8\u30f3\u3092\u4f7f\u7528\u3059\u308b\u30b9\u30ec\u30fc\u30d6\u306b MySQL Cluster \u304b\u3089\u8907\u88fd\u3092\u8a66\u307f\u308b\u3068\u3001\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d7\u30ed\u30bb\u30b9\u306f\u6b21\u306e\u30a8\u30e9\u30fc\u306b\u3088\u308a\u505c\u6b62\u3057\u307e\u3059: Binary logging not possible ... Statement cannot be written atomically since more than one engine involved and at least one engine is self-logging (\u30a8\u30e9\u30fc 1595)\u3002\u6b21\u306e\u65b9\u6cd5\u306e\u3044\u305a\u308c\u304b\u3067\u3001\u3053\u306e\u554f\u984c\u3092\u56de\u907f\u3067\u304d\u307e\u3059\u3002\n<\/p><\/blockquote>\n<p>9 \u306f\u3053\u3053\u3067\u3057\u3087\u3046\u306d<\/p>\n<p><a href=\"https:\/\/github.com\/mysql\/mysql-server\/blob\/mysql-8.0.12\/sql\/binlog.cc#L9911-L9920\">https:\/\/github.com\/mysql\/mysql-server\/blob\/mysql-8.0.12\/sql\/binlog.cc#L9911-L9920<\/a><\/p>\n<pre class=\"start-line:9911 lang:c++\" ><code>      if (table->table->no_replicate) {\n        if (!warned_gtid_executed_table) {\n          warned_gtid_executed_table =\n              gtid_state->warn_or_err_on_modify_gtid_table(this, table);\n          \/*\n            Do not allow users to modify the gtid_executed table\n            explicitly by a XA transaction.\n          *\/\n          if (warned_gtid_executed_table == 2) DBUG_RETURN(-1);\n        }<\/code><\/pre>\n<p><a href=\"https:\/\/github.com\/mysql\/mysql-server\/blob\/mysql-8.0.12\/sql\/rpl_gtid_persist.h#L192-L231\">https:\/\/github.com\/mysql\/mysql-server\/blob\/mysql-8.0.12\/sql\/rpl_gtid_persist.h#L192-L231<\/a><\/p>\n<pre class=\"start-line:192 lang:c++\" ><code>  \/**\n    Push a warning to client if user is modifying the gtid_executed\n    table explicitly by a non-XA transaction. Push an error to client\n    if user is modifying it explicitly by a XA transaction.\n\n    @param thd Thread requesting to access the table\n    @param table The table is being accessed.\n\n    @retval 0 No warning or error was pushed to the client.\n    @retval 1 Push a warning to client.\n    @retval 2 Push an error to client.\n  *\/\n  int warn_or_err_on_explicit_modification(THD *thd, TABLE_LIST *table) {\n    DBUG_ENTER(\"Gtid_table_persistor::warn_or_err_on_explicit_modification\");\n\n\n    if (!thd->is_operating_gtid_table_implicitly &&\n        table->lock_descriptor().type >= TL_WRITE_ALLOW_WRITE &&\n        !strcmp(table->table_name, Gtid_table_access_context::TABLE_NAME.str)) {\n      if (thd->get_transaction()->xid_state()->has_state(\n              XID_STATE::XA_ACTIVE)) {\n        \/*\n          Push an error to client if user is modifying the gtid_executed\n          table explicitly by a XA transaction.\n        *\/\n        thd->raise_error_printf(ER_ERROR_ON_MODIFYING_GTID_EXECUTED_TABLE,\n                                table->table_name);\n        DBUG_RETURN(2);\n      } else {\n        \/*\n          Push a warning to client if user is modifying the gtid_executed\n          table explicitly by a non-XA transaction.\n        *\/\n        thd->raise_warning_printf(ER_WARN_ON_MODIFYING_GTID_EXECUTED_TABLE,\n                                  table->table_name);\n        DBUG_RETURN(1);\n      }\n    }\n\n\n    DBUG_RETURN(0);\n  }<\/code><\/pre>\n<h3>\u88dc\u8db3<\/h3>\n<p>Storage Engine \u306e \u30ec\u30a4\u30e4\u30fc\u3067 Row capable \u304b\u3069\u3046\u304b\u5224\u65ad\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3068\u3044\u3046\u8a71\u306f\u3001\u3053\u306e bug report \u304c\u767a\u7aef\u306e\u3088\u3046\u3067\u3059\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/bugs.mysql.com\/bug.php?id=23051\">Bug #23051 READ COMMITTED breaks mixed and statement-based replication<\/a><\/li>\n<\/ul>\n<p>WorkLog 3303 \u306b\u3088\u3063\u3066\u3001 Row capable \u3084 Statement capable \u3068\u3044\u3046\u6982\u5ff5\u304c\u3082\u305f\u3089\u3055\u308c\u305f\u3088\u3046\u3067\u3059\u304c<\/p>\n<ul>\n<li><a href=\"https:\/\/dev.mysql.com\/worklog\/task\/?id=3339\">WL#3339: Issue warnings when statement-based replication may fail<\/a><\/li>\n<li><a href=\"https:\/\/dev.mysql.com\/worklog\/task\/?id=3303\">WL#3303: RBR: Engine-controlled logging format<\/a><\/li>\n<\/ul>\n<p>WorkLog 3303 \u306e SETTINGS FOR CURRENT ENGINES \u3068\u3001\u73fe\u72b6\u306e\u4ed5\u69d8\u306f\u7570\u306a\u3063\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u3002\u3053\u306e\u3042\u305f\u308a\u3001\u5b9f\u969b\u306b\u30b3\u30fc\u30c9\u66f8\u3044\u3066\u305f\u3089\u4ed5\u69d8\u5909\u3048\u305f\u307b\u3046\u304c\u826f\u3044\u3068\u308f\u304b\u3063\u305f\u3063\u3066\u3053\u3068\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u306d\u3002<\/p>\n<h2>THD::decide_logging_format() \u4ee5\u5916\u3067 Replication \u304c\u505c\u6b62\u3057\u3066\u3057\u307e\u3046\u30b1\u30fc\u30b9\u306a\u3069\u306b\u3064\u3044\u3066<\/h2>\n<p>\u3044\u3061\u304a\u3046\u8efd\u304f\u89e6\u308c\u3066\u304a\u304d\u307e\u3059\u3002\u3059\u3054\u3044\u96d1\u306b\u307e\u3068\u3081\u308b\u3068<\/p>\n<ul>\n<li>MySQL 5.6 \u3067 SBR \u304b\u3089 RBR \u306b\u79fb\u884c\u3059\u308b\u5834\u5408\u306f\u3001\u5272\u3068\u6ce8\u610f\u3057\u305f\u307b\u3046\u304c\u3044\u3044\u3002\u7279\u306b\u3001 SET GLOBAL \u3067 binlog_format \u5909\u66f4\u3059\u308b\u306e\u306f\u3001\u3088\u307b\u3069\u305d\u306e\u74b0\u5883\u3092\u7406\u89e3\u3057\u3066\u3044\u306a\u3044\u9650\u308a\u3001\u6b62\u3081\u3066\u304a\u3044\u305f\u65b9\u304c\u7121\u96e3\u306a\u306e\u3067\u306f\u3002 master \u3068 slave \u3067\u578b\u304c\u9055\u3063\u305f\u308a\u3001 TIMESTAMP\u578b\u304cmicroseconds\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u308b\u304b\u3057\u3066\u3044\u306a\u3044\u304b\u3067\u3082\u3001 replication \u306b\u5f71\u97ff\u3059\u308b\u3002<\/li>\n<li>MySQL 5.7 \u3067  SBR \u304b\u3089 RBR \u306b\u79fb\u884c\u3059\u308b\u5834\u5408\u3001\u3060\u3044\u3076\u3044\u308d\u3044\u308d\u3068\u6539\u5584\u3055\u308c\u3066\u3044\u308b\u3002\u305f\u3060\u3001 binlog_rows_query_log_events \u3068\u3001MySQL 5.7 \u3067\u8ffd\u52a0\u3055\u308c\u305f Multi-Source Replication \u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3068\u3001\u30e1\u30e2\u30ea\u30ea\u30fc\u30af\u3059\u308b\u306a\u3069\u306e\u30d0\u30b0\u304c\u6709\u3063\u305f\u3002\u30de\u30a4\u30ca\u30fc\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u53e4\u3081\u306e MySQL5.7\u3092\u4f7f\u3063\u3066\u3044\u308b\u5834\u5408\u3001 SBR \u304b\u3089 RBR \u3078\u306e\u79fb\u884c\u306f\u3001\u6ce8\u610f\u304c\u5fc5\u8981\u3002<\/li>\n<li>MySQL 8.0 \u3067\u306f\u3053\u306e\u3042\u305f\u308a\u306e\u30d0\u30b0\u306a\u3069\u3060\u3044\u3076\u76f4\u3063\u3066\u3044\u308b\u3089\u3057\u3044\u3002 MySQL8.0 \u306b\u304a\u3044\u3066\u3001RBR\u3078\u306e\u79fb\u884c\u306e\u30cf\u30fc\u30c9\u30eb\u306f\u3060\u3044\u3076\u4e0b\u304c\u3063\u3066\u3044\u308b\u611f\u304c\u3042\u308b\u3002\uff08\u305f\u3060\u3001 MySQL 8.0 \u3092\u4f7f\u3063\u3066\u308b\u6642\u70b9\u3067\u3001 SBR \u306f\u3082\u3046\u3084\u3081\u3066\u3044\u308b\u6c17\u3082\u3059\u308b\u3057\u30018.0 \u306b\u79fb\u884c\u3059\u308b\u3053\u3068\u81ea\u4f53\u306e\u65b9\u304c\u3001RBR\u3078\u306e\u79fb\u884c\u3088\u308a\u30cf\u30fc\u30c9\u30eb\u9ad8\u3044\u6c17\u304c\u3059\u308b\uff09<\/li>\n<\/ul>\n<h3>\u6642\u523b\u578b\u3084 slave_type_conversions<\/h3>\n<p>MySQL5.6 \u304b\u3089 DATETIME \u3084 TIMESTAMP \u304c microseconds \u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/ja\/datetime.html\">11.3.1 DATE\u3001DATETIME\u3001\u304a\u3088\u3073 TIMESTAMP \u578b<\/a><\/li>\n<\/ul>\n<p>\u540c\u3058TIMESTAMP\u578b\u3067\u3082\u30015.5\u4ee5\u524d\u30685.6\u4ee5\u964d\u3067\u306f\u5185\u90e8\u7684\u306b\u7570\u306a\u308b\u30c7\u30fc\u30bf\u578b\u3068\u306a\u3063\u305f\u5834\u5408\u3001replication\u6b62\u307e\u308b\u30b1\u30fc\u30b9\u304c\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/bugs.mysql.com\/bug.php?id=70124\">Bug #70124   Timestamp and datetimes self-incompatible during replication<\/a><\/li>\n<\/ul>\n<p>5.7.5 or 5.6.20 \u4ee5\u964d\u3067\u306a\u304a\u3063\u305f\u305d\u3046\u3067\u3059\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/dev.mysql.com\/doc\/relnotes\/mysql\/5.7\/en\/news-5-7-5.html\">Changes in MySQL 5.7.5 (2014-09-25, Milestone 15<\/a><\/li>\n<\/ul>\n<blockquote><p>\n  Replication: Replication of tables that contained temporal type fields (such as TIMESTAMP, DATETIME, and TIME) from different MySQL versions failed due to incompatible TIMESTAMP types. The fractional TIMESTAMP format added in MySQL 5.6.4 was not being correctly converted. You can now replicate a TIMESTAMP in either format correctly according to the slave_type_conversions variable. (Bug #70124, Bug #17532932)\n<\/p><\/blockquote>\n<ul>\n<li><a href=\"https:\/\/dev.mysql.com\/doc\/relnotes\/mysql\/5.6\/en\/news-5-6-20.html\">Changes in MySQL 5.6.20 (2014-07-31, General Availability)<\/a><\/li>\n<\/ul>\n<blockquote><p>\n  Replication: Replication of tables that contained temporal type fields (such as TIMESTAMP, DATETIME, and TIME) from different MySQL versions failed due to incompatible TIMESTAMP types. The fractional TIMESTAMP format added in MySQL 5.6.4 was not being correctly converted. You can now replicate a TIMESTAMP in either format correctly according to the slave_type_conversions variable. (Bug #70124, Bug #17532932)\n<\/p><\/blockquote>\n<p>\u5177\u4f53\u7684\u306b\u306f<a href=\"https:\/\/github.com\/mysql\/mysql-server\/commit\/2b02475991d3ca02a56408565b93b5572960ffe6\">\u3053\u306e commit<\/a>\u3067\u3059\u306d\u3002<\/p>\n<p>\u3055\u3089\u306b\u3001\u3055\u3044\u304d\u3093\u306eMySQL\u306f\u578b\u5909\u63db\u3059\u308b\u305f\u3081\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u304c\u8ffd\u52a0\u3055\u308c\u3066\u3001 5.7.2 \u4ee5\u964d\u3067\u8a2d\u5b9a\u3067\u304d\u308b\u5024\u304c\u5897\u3048\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.7\/en\/replication-options-slave.html#sysvar_slave_type_conversions\">slave_type_conversions<\/a><\/li>\n<li><a href=\"http:\/\/gihyo.jp\/dev\/serial\/01\/mysql-road-construction-news\/0040\">MySQL\u9053\u666e\u8acb\u4fbf\u308a | \u7b2c40\u56de\u3000\u30ab\u30e9\u30e0\u306e\u30c7\u30fc\u30bf\u578b\u306e\u7570\u306a\u308b\u884c\u30d9\u30fc\u30b9\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u6319\u52d5<\/a><\/li>\n<\/ul>\n<p>\u3053\u306e\u3078\u3093\u3082\u53c2\u8003\u307e\u3067\u306b<\/p>\n<ul>\n<li><a href=\"https:\/\/www.percona.com\/blog\/2014\/05\/06\/row-based-replication-mysql-5-6-upgrades-and-temporal-data-types\/\">Row-based replication, MySQL 5.6 upgrades and temporal data types<\/a><\/li>\n<li><a href=\"https:\/\/yakst.com\/ja\/posts\/12\">MySQL 5.6\u306b\u304a\u3051\u308b\u6642\u523b\u578b\u306e\u30ea\u30ab\u30d0\u30ea<\/a><\/li>\n<li><a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.7\/en\/replication-features-differing-tables.html#replication-features-attribute-promotion\">16.4.1.10.1 Replication with More Columns on Master or Slave<\/a><\/li>\n<\/ul>\n<h3>rbr_exec_mode<\/h3>\n<p>mysqlbinlog\u7528\u306b\u3001 5.7 \u304b\u3089\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002\u8a73\u3057\u304f\u306f\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u30de\u30cb\u30e5\u30a2\u30eb\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.7\/en\/server-system-variables.html#sysvar_rbr_exec_mode\">rbr_exec_mode<\/a><\/li>\n<\/ul>\n<h3>Bug #85371 Memory leak in multi-source replication when binlog_rows_query_log_events=1<\/h3>\n<ul>\n<li><a href=\"https:\/\/bugs.mysql.com\/bug.php?id=85371\">https:\/\/bugs.mysql.com\/bug.php?id=85371<\/a><\/li>\n<\/ul>\n<p>Multi-Source Replication \u3068binlog_rows_query_log_events=1 \u3092\u7d44\u307f\u5408\u308f\u305b\u305f\u5834\u5408\u3001\u30e1\u30e2\u30ea\u30ea\u30fc\u30af\u3059\u308b\u3053\u3068\u304c\u3042\u3063\u305f\u305d\u3046\u3067\u3001MySQL 5.7.21 \u3068 8.0.4 \u4ee5\u964d\u3067\u306a\u304a\u3063\u305f\u305d\u3046\u3067\u3059\u3002<\/p>\n<h2>\u4eca\u65e5\u306f\u3053\u308c\u307e\u3067<\/h2>\n<p>decide_logging_format() \u306e Warning\/Error \u306f\u3001\u6614\u306e MySQL \u3088\u308a\u6700\u8fd1\u306e MySQL \u306e\u65b9\u304c\u3001 error code \u304c\u5897\u3048\u3066\u3044\u305f\u308a\u3057\u307e\u3059\u3002\u3055\u3044\u304d\u3093\u306e THD::decide_logging_format() \u3092\u524d\u63d0\u306b\u8003\u3048\u305f\u65b9\u304c\u3001\u3088\u308a\u53b3\u683c\u3067\u5b89\u5168\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u8208\u5473\u306e\u3042\u308b\u65b9\u306f\u3001\u3080\u304b\u3057\u306e MySQL \u3068\u3055\u3044\u304d\u3093\u306e MySQL \u3067\u3001decide_logging_format() \u3092\u8aad\u307f\u6bd4\u3079\u3066\u3082\u3089\u3046\u3068\u826f\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>MySQL \u306e replication \u306f\u3001 storage engine \u3068\u5354\u8abf\u52d5\u4f5c\u3057\u306a\u304c\u3089\u3001\u305d\u306e\u6574\u5408\u6027\u3092\u4fdd\u3064\u3088\u3046\u3001\u6539\u5584\u3055\u308c\u7d9a\u3051\u3066\u304d\u307e\u3057\u305f\u3002\u3053\u306e\u3042\u305f\u308a\u306e\u7d4c\u7def\u306a\u3069\u306b\u8208\u5473\u306e\u3042\u308b\u65b9\u306f\u3001\u4eca\u56de\u53d6\u308a\u4e0a\u3052\u305f\u95a2\u6570\u3084WorkLog\u306a\u3069\u3092\u3044\u308d\u3044\u308d\u8aad\u3093\u3067\u3082\u3089\u3046\u3068\u3001\u7406\u89e3\u304c\u6df1\u307e\u308b\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>Row-Based Replication \u306f\u3001 Statement-Based Replicaiton \u3067\u767a\u751f\u3057\u3066\u3044\u305f\u4e0d\u5177\u5408\u3092\u6539\u5584\u3059\u308b\u3082\u306e\u3068\u3057\u3066\u5c0e\u5165\u3055\u308c\u305f\u90e8\u5206\u3082\u3042\u308b\u306e\u3067\u3059\u304c\u3001 SBR \u3067\u52d5\u3044\u3066\u3044\u305f\u3082\u306e\u3092 RBR \u306b\u79fb\u884c\u3059\u308b\u3068\u304d\u3001\u306a\u3093\u3089\u304b\u306e\u526f\u4f5c\u7528\u304c\u767a\u751f\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 SET GLOBAL \u3067 binlog_format \u5909\u66f4\u3059\u308b\u3053\u3068\u304c\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u30de\u30cb\u30e5\u30a2\u30eb\u3067\u63a8\u5968\u3055\u308c\u3066\u3044\u306a\u3044\u306e\u306f\u3001\u305d\u306e\u3042\u305f\u308a\u306e\u526f\u4f5c\u7528\u3060\u3063\u305f\u308a\u632f\u308b\u821e\u3044\u3092\u628a\u63e1\u3059\u308b\u306e\u304c\u3001\u306a\u304b\u306a\u304b\u96e3\u3057\u3044\u3068\u3044\u3046\u554f\u984c\u304c\u3042\u308b\u306e\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u6b21\u56de\u4ee5\u964d\u3082 RBR \u306e\u8a71\u306f\u7d9a\u304d\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u308f\u3002\u305b\u3058\u307e\u3067\u3059\u3002\u4eca\u56de\u3082 replication \u306e\u8a71\u3092\u3057\u307e\u3059\u3002 \u306f\u3058\u3081\u306b \u7b2c\u4e8c\u56de\u3067\u3059\u3002 \u4eca\u56de\u306e\u4e3b\u306a\u304a\u984c\u306f\u3001 THD::decide_logging_format() \u3068\u3044\u3046\u95a2\u6570\u306b\u306a\u308a\u307e\u3059\u3002 THD::decide [&hellip;]<\/p>\n","protected":false},"author":137,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9],"tags":[17],"class_list":["post-19628","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-info","tag-mysql"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/19628","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/users\/137"}],"replies":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/comments?post=19628"}],"version-history":[{"count":3,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/19628\/revisions"}],"predecessor-version":[{"id":19701,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/19628\/revisions\/19701"}],"wp:attachment":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/media?parent=19628"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/categories?post=19628"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/tags?post=19628"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}