diff options
author | unknown <holyfoot/hf@mysql.com/hfmain.(none)> | 2007-09-07 18:41:49 +0500 |
---|---|---|
committer | unknown <holyfoot/hf@mysql.com/hfmain.(none)> | 2007-09-07 18:41:49 +0500 |
commit | afd34c69be22a45a85799297894d5725637d1dd5 (patch) | |
tree | e185e8a3f93c15c79cf45d5b9438585bc3dda5aa /sql/handler.h | |
parent | a3dc9569e983db92ca1ace1f3fe66428cd8098e2 (diff) | |
download | mariadb-git-afd34c69be22a45a85799297894d5725637d1dd5.tar.gz |
Bug #28430 Failure in replication of innodb partitioned tables on row/mixed format.
In the ha_partition::position() we don't calculate the number
of the partition of the record, but use m_last_part value instead,
relying on that it's previously set by some other call like ::write_row().
Delete_rows_log_event::do_exec_row() calls find_and_fetch_row(),
where we used position() + rnd_pos() call for the InnoDB-based PARTITION-ed
table as there HA_PRIMARY_KEY_REQUIRED_FOR_POSITION enabled.
fixed by introducing new handler::rnd_pos_by_record() method to be
used for random record-based positioning
sql/ha_partition.cc:
Bug #28430 Failure in replication of innodb partitioned tables on row/mixed format.
ha_partition::rnd_pos_by_record() implemented
sql/ha_partition.h:
Bug #28430 Failure in replication of innodb partitioned tables on row/mixed format.
ha_partition::rnd_pos_by_record() declared
sql/handler.h:
Bug #28430 Failure in replication of innodb partitioned tables on row/mixed format.
handler::rnd_pos_by_record() introduced
sql/log_event.cc:
Bug #28430 Failure in replication of innodb partitioned tables on row/mixed format.
handler::rnd_pos_by_record used instead of position() + rnd_pos() call
Diffstat (limited to 'sql/handler.h')
-rw-r--r-- | sql/handler.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/handler.h b/sql/handler.h index 557b9fd7887..b91d8a39b88 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -1343,6 +1343,17 @@ public: virtual int ft_read(uchar *buf) { return HA_ERR_WRONG_COMMAND; } 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 + */ + virtual int rnd_pos_by_record(uchar *record) + { + position(record); + return rnd_pos(record, ref); + } virtual int read_first_row(uchar *buf, uint primary_key); /* The following function is only needed for tables that may be temporary |