pt-table-checksum uses REPLACE ... SELECT to create a checksum of chunks of data, I believe the wsrep_consistency_check was introduced to ensure the isolation would support this process, however it looks like the wsrep_consistency_check is only handled on SQLCOM_INSERT_SELECT and not SQLCOM_REPLACE_SELECT.
pt-table-checksum uses REPLACE ... SELECT to create a checksum of chunks of data, I believe the wsrep_consisten cy_check was introduced to ensure the isolation would support this process, however it looks like the wsrep_consisten cy_check is only handled on SQLCOM_ INSERT_ SELECT and not SQLCOM_ REPLACE_ SELECT.
modified sql_parse.cc: INSERT_ SELECT && consistency_ check == CONSISTENCY_ CHECK_DECLARED) >wsrep_ consistency_ check = CONSISTENCY_ CHECK_RUNNING; TO_ISOLATION_ BEGIN(first_ table-> db, first_table- >table_ name, NULL);
#ifdef WITH_WSREP
if (lex->sql_command == SQLCOM_
thd->wsrep_
{
thd-
WSREP_
}
....
if (lex->sql_command == SQLCOM_ REPLACE_ SELECT) >set_stmt_ unsafe( LEX::BINLOG_ STMT_UNSAFE_ REPLACE_ SELECT) ;
lex-
pt-table-checksum code
my $checksum_dml = "REPLACE INTO $repl_table "
. "(db, tbl, chunk, chunk_index,"
. " lower_boundary, upper_boundary, this_cnt, this_crc) "
. "SELECT"
. ($cluster- >is_cluster_ node($master_ cxn) ? ' /*!99997*/' : '')
. " ?, ?, ?, ?, ?, ?,";