Comment 1 for bug 1536663

Revision history for this message
Przemek (pmalkowski) wrote :

Verified. Looks like the tokudb_rpl_lookup_rows disabled alone leads to inconsistency in a table without PK on a slave.

master [localhost] {msandbox} (world) > show create table City\G
*************************** 1. row ***************************
       Table: City
Create Table: CREATE TABLE `City` (
  `Name` char(35) NOT NULL DEFAULT '',
  `CountryCode` char(3) NOT NULL DEFAULT '',
  `District` char(20) NOT NULL DEFAULT '',
  `Population` int(11) NOT NULL DEFAULT '0',
  KEY `CountryCode` (`CountryCode`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1
1 row in set (0.00 sec)

master [localhost] {msandbox} (world) > update City set Population = Population + 10 where Name = 'Poznan';
Query OK, 1 row affected (0.03 sec)
Rows matched: 1 Changed: 1 Warnings: 0

slave1 [localhost] {msandbox} (world) > show global variables like 'tokudb_rpl_%';
+--------------------------------+-------+
| Variable_name | Value |
+--------------------------------+-------+
| tokudb_rpl_check_readonly | ON |
| tokudb_rpl_lookup_rows | ON |
| tokudb_rpl_lookup_rows_delay | 0 |
| tokudb_rpl_unique_checks | ON |
| tokudb_rpl_unique_checks_delay | 0 |
+--------------------------------+-------+
5 rows in set (0.00 sec)

slave1 [localhost] {msandbox} (world) > select * from City where Name = 'Poznan';
+--------+-------------+---------------+------------+
| Name | CountryCode | District | Population |
+--------+-------------+---------------+------------+
| Poznan | POL | Wielkopolskie | 576909 |
+--------+-------------+---------------+------------+
1 row in set (0.00 sec)

slave2 [localhost] {msandbox} (world) > show global variables like 'tokudb_rpl_%';
+--------------------------------+-------+
| Variable_name | Value |
+--------------------------------+-------+
| tokudb_rpl_check_readonly | ON |
| tokudb_rpl_lookup_rows | OFF |
| tokudb_rpl_lookup_rows_delay | 0 |
| tokudb_rpl_unique_checks | ON |
| tokudb_rpl_unique_checks_delay | 0 |
+--------------------------------+-------+
5 rows in set (0.00 sec)

slave2 [localhost] {msandbox} (world) > select * from City where Name = 'Poznan';
+--------+-------------+---------------+------------+
| Name | CountryCode | District | Population |
+--------+-------------+---------------+------------+
| Poznan | POL | Wielkopolskie | 576899 |
| Poznan | POL | Wielkopolskie | 576909 |
+--------+-------------+---------------+------------+
2 rows in set (0.00 sec)

slave2 [localhost] {msandbox} (world) > select @@version,@@version_comment;
+-------------+------------------------------------------------------+
| @@version | @@version_comment |
+-------------+------------------------------------------------------+
| 5.6.28-76.1 | Percona Server (GPL), Release 76.1, Revision 5759e76 |
+-------------+------------------------------------------------------+
1 row in set (0.00 sec)