diff options
author | unknown <holyfoot/hf@hfmain.(none)> | 2007-09-10 10:21:55 +0500 |
---|---|---|
committer | unknown <holyfoot/hf@hfmain.(none)> | 2007-09-10 10:21:55 +0500 |
commit | 1e3be8ca64b9eb1bbac36e31a88390a6e1d2d349 (patch) | |
tree | 7c875e6feb9d16c087c8dddf1f3d70b59a6f4d85 /sql/ha_partition.cc | |
parent | 9d016335711970ed17bc1380f71a6335af04b933 (diff) | |
parent | afd34c69be22a45a85799297894d5725637d1dd5 (diff) | |
download | mariadb-git-1e3be8ca64b9eb1bbac36e31a88390a6e1d2d349.tar.gz |
Merge bk@192.168.21.1:mysql-5.1-opt
into mysql.com:/home/hf/work/28430/my51-28430
sql/ha_partition.h:
Auto merged
sql/ha_partition.cc:
merging
sql/log_event.cc:
merging
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r-- | sql/ha_partition.cc | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 42cbaa1cdb0..ac105855c02 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -3235,14 +3235,9 @@ end_dont_reset_start_part: void ha_partition::position(const uchar *record) { - handler *file; + handler *file= m_file[m_last_part]; DBUG_ENTER("ha_partition::position"); - if (unlikely(get_part_for_delete(record, m_rec0, m_part_info, &m_last_part))) - m_last_part= 0; - - file= m_file[m_last_part]; - file->position(record); int2store(ref, m_last_part); memcpy((ref + PARTITION_BYTES_IN_POS), file->ref, @@ -3300,6 +3295,36 @@ int ha_partition::rnd_pos(uchar * buf, uchar *pos) } +/* + Read row using position using given record to find + + SYNOPSIS + rnd_pos_by_record() + record Current record in MySQL Row Format + + RETURN VALUE + >0 Error code + 0 Success + + DESCRIPTION + this works as position()+rnd_pos() functions, but does some extra work, + calculating m_last_part - the partition to where the 'record' + should go. + + called from replication (log_event.cc) +*/ + +int ha_partition::rnd_pos_by_record(uchar *record) +{ + DBUG_ENTER("ha_partition::rnd_pos_by_record"); + + if (unlikely(get_part_for_delete(record, m_rec0, m_part_info, &m_last_part))) + DBUG_RETURN(1); + + DBUG_RETURN(handler::rnd_pos_by_record(record)); +} + + /**************************************************************************** MODULE index scan ****************************************************************************/ |