1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-15242 Poor RBR update performance with partitioned tables

Observed and described
partitioned engine execution time difference
between master and slave was caused by excessive invocation
of base_engine::rnd_init which was done also for partitions
uninvolved into Rows-event operation.
The bug's slave slowdown therefore scales with the number of partitions.

Fixed with applying an upstream patch.

References:
----------
https://bugs.mysql.com/bug.php?id=73648
Bug#25687813 REPLICATION REGRESSION WITH RBR AND PARTITIONED TABLES
This commit is contained in:
Andrei Elkin
2018-06-19 18:14:47 +03:00
parent 364a20fe0b
commit 28e1f1453f
3 changed files with 11 additions and 6 deletions

View File

@ -3042,9 +3042,17 @@ private:
*/
virtual int rnd_pos_by_record(uchar *record)
{
int error;
DBUG_ASSERT(table_flags() & HA_PRIMARY_KEY_REQUIRED_FOR_POSITION);
error = ha_rnd_init(false);
if (error != 0)
return error;
position(record);
return rnd_pos(record, ref);
error = ha_rnd_pos(record, ref);
ha_rnd_end();
return error;
}
virtual int read_first_row(uchar *buf, uint primary_key);
public: