mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Bug#52517: Regression in ROW level replication performance with partitions
In bug-28430 HA_PRIMARY_KEY_REQUIRED_FOR_POSITION was disabled in the partitioning engine in the first patch, That bug was later fixed a second time, but that flag was not removed. No need to disable this flag, as it leads to bad choise in row replication. sql/ha_partition.h: Not disabling HA_PRIMARY_KEY_REQUIRED_FOR_POSITION flag. Updated comment (has nothing to do with hidden key. sql/handler.h: Updated comments to about HA_PRIMARY_KEY_REQUIRED_FOR_POSITION.
This commit is contained in:
@@ -93,7 +93,10 @@
|
||||
#define HA_PRIMARY_KEY_IN_READ_INDEX (1 << 15)
|
||||
/*
|
||||
If HA_PRIMARY_KEY_REQUIRED_FOR_POSITION is set, it means that to position()
|
||||
uses a primary key. Without primary key, we can't call position().
|
||||
uses a primary key given by the record argument.
|
||||
Without primary key, we can't call position().
|
||||
If not set, the position is returned as the current rows position
|
||||
regardless of what argument is given.
|
||||
*/
|
||||
#define HA_PRIMARY_KEY_REQUIRED_FOR_POSITION (1 << 16)
|
||||
#define HA_CAN_RTREEKEYS (1 << 17)
|
||||
@@ -1446,10 +1449,9 @@ public:
|
||||
virtual int rnd_next(uchar *buf)=0;
|
||||
virtual int rnd_pos(uchar * buf, uchar *pos)=0;
|
||||
/**
|
||||
One has to use this method when to find
|
||||
random position by record as the plain
|
||||
position() call doesn't work for some
|
||||
handlers for random position.
|
||||
This function only works for handlers having
|
||||
HA_PRIMARY_KEY_REQUIRED_FOR_POSITION set.
|
||||
It will return the row with the PK given in the record argument.
|
||||
*/
|
||||
virtual int rnd_pos_by_record(uchar *record)
|
||||
{
|
||||
@@ -1467,6 +1469,12 @@ public:
|
||||
{ return HA_ERR_WRONG_COMMAND; }
|
||||
virtual ha_rows records_in_range(uint inx, key_range *min_key, key_range *max_key)
|
||||
{ return (ha_rows) 10; }
|
||||
/*
|
||||
If HA_PRIMARY_KEY_REQUIRED_FOR_POSITION is set, then it sets ref
|
||||
(reference to the row, aka position, with the primary key given in
|
||||
the record).
|
||||
Otherwise it set ref to the current row.
|
||||
*/
|
||||
virtual void position(const uchar *record)=0;
|
||||
virtual int info(uint)=0; // see my_base.h for full description
|
||||
virtual void get_dynamic_partition_info(PARTITION_INFO *stat_info,
|
||||
|
||||
Reference in New Issue
Block a user