2014-07-17 10:48:01 |
Ben Mildren |
bug |
|
|
added bug |
2014-07-17 10:49:53 |
Ben Mildren |
description |
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.
modified sql_parse.cc:
#ifdef WITH_WSREP
if (lex->sql_command == SQLCOM_INSERT_SELECT &&
thd->wsrep_consistency_check == CONSISTENCY_CHECK_DECLARED)
{
thd->wsrep_consistency_check = CONSISTENCY_CHECK_RUNNING;
WSREP_TO_ISOLATION_BEGIN(first_table->db, first_table->table_name, NULL);
}
....
if (lex->sql_command == SQLCOM_REPLACE_SELECT)
lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_REPLACE_SELECT);
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*/' : '')
. " ?, ?, ?, ?, ?, ?,"; |
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.
----------------------
modified sql_parse.cc:
----------------------
#ifdef WITH_WSREP
if (lex->sql_command == SQLCOM_INSERT_SELECT &&
thd->wsrep_consistency_check == CONSISTENCY_CHECK_DECLARED)
{
thd->wsrep_consistency_check = CONSISTENCY_CHECK_RUNNING;
WSREP_TO_ISOLATION_BEGIN(first_table->db, first_table->table_name, NULL);
}
....
if (lex->sql_command == SQLCOM_REPLACE_SELECT)
lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_REPLACE_SELECT);
-----------------------
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*/' : '')
. " ?, ?, ?, ?, ?, ?,"; |
|
2014-07-17 11:18:24 |
Ben Mildren |
description |
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.
----------------------
modified sql_parse.cc:
----------------------
#ifdef WITH_WSREP
if (lex->sql_command == SQLCOM_INSERT_SELECT &&
thd->wsrep_consistency_check == CONSISTENCY_CHECK_DECLARED)
{
thd->wsrep_consistency_check = CONSISTENCY_CHECK_RUNNING;
WSREP_TO_ISOLATION_BEGIN(first_table->db, first_table->table_name, NULL);
}
....
if (lex->sql_command == SQLCOM_REPLACE_SELECT)
lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_REPLACE_SELECT);
-----------------------
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*/' : '')
. " ?, ?, ?, ?, ?, ?,"; |
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.
In order for pt-table-checksum to be re-runnable it makes sense for it to use SQLCOM_REPLACE_SELECT as opposed to SQLCOM_INSERT_SELECT, so it looks like the wsrep_consistency_check should also/alternatively be applied to the SQLCOM_REPLACE_SELECT.
----------------------
modified sql_parse.cc:
----------------------
#ifdef WITH_WSREP
if (lex->sql_command == SQLCOM_INSERT_SELECT &&
thd->wsrep_consistency_check == CONSISTENCY_CHECK_DECLARED)
{
thd->wsrep_consistency_check = CONSISTENCY_CHECK_RUNNING;
WSREP_TO_ISOLATION_BEGIN(first_table->db, first_table->table_name, NULL);
}
....
if (lex->sql_command == SQLCOM_REPLACE_SELECT)
lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_REPLACE_SELECT);
-----------------------
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*/' : '')
. " ?, ?, ?, ?, ?, ?,"; |
|
2014-07-17 13:38:21 |
Marco Tusa |
bug |
|
|
added subscriber Marco Tusa |
2014-07-17 13:45:20 |
Alex Yurchenko |
codership-mysql: assignee |
|
Seppo Jaakola (seppo-jaakola) |
|
2014-07-17 19:08:29 |
Raghavendra D Prabhu |
bug task added |
|
percona-xtradb-cluster |
|
2014-07-22 13:23:21 |
Valerii Kravchuk |
nominated for series |
|
percona-xtradb-cluster/5.6 |
|
2014-07-22 13:23:21 |
Valerii Kravchuk |
bug task added |
|
percona-xtradb-cluster/5.6 |
|
2014-07-22 13:23:21 |
Valerii Kravchuk |
nominated for series |
|
percona-xtradb-cluster/trunk |
|
2014-07-22 13:23:21 |
Valerii Kravchuk |
bug task added |
|
percona-xtradb-cluster/trunk |
|
2014-07-23 05:41:33 |
Nilnandan Joshi |
percona-xtradb-cluster/5.6: status |
New |
Confirmed |
|
2014-07-23 05:41:37 |
Nilnandan Joshi |
percona-xtradb-cluster/trunk: status |
New |
Confirmed |
|
2014-07-23 06:08:12 |
Nilnandan Joshi |
bug |
|
|
added subscriber Nilnandan Joshi |
2014-07-30 21:15:16 |
Seppo Jaakola |
codership-mysql: status |
New |
In Progress |
|
2014-07-30 21:15:40 |
Seppo Jaakola |
nominated for series |
|
codership-mysql/5.5 |
|
2014-07-30 21:15:40 |
Seppo Jaakola |
bug task added |
|
codership-mysql/5.5 |
|
2014-07-30 21:15:40 |
Seppo Jaakola |
nominated for series |
|
codership-mysql/5.6 |
|
2014-07-30 21:15:40 |
Seppo Jaakola |
bug task added |
|
codership-mysql/5.6 |
|
2014-07-30 21:16:01 |
Seppo Jaakola |
codership-mysql/5.5: status |
New |
In Progress |
|
2014-07-30 21:16:04 |
Seppo Jaakola |
codership-mysql/5.5: assignee |
|
Seppo Jaakola (seppo-jaakola) |
|
2014-07-30 21:16:13 |
Seppo Jaakola |
codership-mysql/5.5: milestone |
|
5.5.38-25.11 |
|
2014-07-30 21:16:19 |
Seppo Jaakola |
codership-mysql/5.6: milestone |
|
5.6.19-25.6 |
|
2014-07-30 21:18:14 |
Seppo Jaakola |
codership-mysql/5.5: status |
In Progress |
Fix Committed |
|
2014-07-30 21:18:18 |
Seppo Jaakola |
codership-mysql/5.6: status |
In Progress |
Fix Committed |
|
2014-08-14 16:57:39 |
Raghavendra D Prabhu |
percona-xtradb-cluster/5.6: milestone |
|
5.6.20-25.7 |
|
2014-08-14 16:57:41 |
Raghavendra D Prabhu |
percona-xtradb-cluster/5.5: milestone |
|
5.5.38-25.11 |
|
2014-08-18 17:26:49 |
Raghavendra D Prabhu |
percona-xtradb-cluster/5.6: status |
Confirmed |
Fix Committed |
|
2014-08-22 12:20:15 |
Raghavendra D Prabhu |
percona-xtradb-cluster/5.5: status |
Confirmed |
Fix Committed |
|
2014-09-01 19:51:05 |
Hrvoje Matijakovic |
percona-xtradb-cluster/5.6: status |
Fix Committed |
Fix Released |
|
2014-09-05 18:02:33 |
Hrvoje Matijakovic |
percona-xtradb-cluster/5.5: status |
Fix Committed |
Fix Released |
|
2015-02-09 22:42:55 |
Alex Yurchenko |
codership-mysql/5.6: status |
Fix Committed |
Fix Released |
|
2015-02-09 22:43:01 |
Alex Yurchenko |
codership-mysql/5.6: milestone |
5.6.20-25.6 |
5.6.21-25.9 |
|