12
12
You should have received a copy of the GNU General Public License
13
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
16
#include "heap_priv.h"
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
20
18
/* Read first record with the current key */
22
using namespace drizzled;
24
21
int heap_rlast(HP_INFO *info, unsigned char *record, int inx)
23
HP_SHARE *share= info->s;
24
HP_KEYDEF *keyinfo= share->keydef + inx;
26
26
info->lastinx= inx;
27
if (keyinfo->algorithm == HA_KEY_ALG_BTREE)
31
if ((pos = tree_search_edge(&keyinfo->rb_tree, info->parents,
32
&info->last_pos, offsetof(TREE_ELEMENT, right))))
34
memcpy(&pos, pos + (*keyinfo->get_key_length)(keyinfo, pos),
35
sizeof(unsigned char*));
36
info->current_ptr = pos;
37
hp_extract_record(share, record, pos);
38
info->update = HA_STATE_AKTIV;
42
my_errno = HA_ERR_END_OF_FILE;
28
49
info->current_ptr=0;
29
50
info->current_hash_ptr=0;