Drizzled Public API Documentation

hp_rfirst.cc

00001 /* Copyright (C) 2000-2002, 2004 MySQL AB
00002 
00003    This program is free software; you can redistribute it and/or modify
00004    it under the terms of the GNU General Public License as published by
00005    the Free Software Foundation; version 2 of the License.
00006 
00007    This program is distributed in the hope that it will be useful,
00008    but WITHOUT ANY WARRANTY; without even the implied warranty of
00009    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010    GNU General Public License for more details.
00011 
00012    You should have received a copy of the GNU General Public License
00013    along with this program; if not, write to the Free Software
00014    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
00015 
00016 #include "heap_priv.h"
00017 
00018 #include <string.h>
00019 #include <cassert>
00020 
00021 using namespace drizzled;
00022 
00023 /* Read first record with the current key */
00024 
00025 int heap_rfirst(HP_INFO *info, unsigned char *record, int inx)
00026 {
00027   info->lastinx= inx;
00028   {
00029     if (!(info->getShare()->records))
00030     {
00031       errno=HA_ERR_END_OF_FILE;
00032       return(errno);
00033     }
00034     assert(0); /* TODO fix it */
00035     info->current_record=0;
00036     info->current_hash_ptr=0;
00037     info->update=HA_STATE_PREV_FOUND;
00038     return(heap_rnext(info,record));
00039   }
00040 }