Drizzled Public API Documentation

hp_info.cc
00001 /* Copyright (C) 2000-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 /* Returns info about database status */
00017 
00018 #include "heap_priv.h"
00019 
00020 
00021 unsigned char *heap_position(HP_INFO *info)
00022 {
00023   return ((info->update & HA_STATE_AKTIV) ? info->current_ptr :
00024     (HEAP_PTR) 0);
00025 }
00026 
00027 /* Note that heap_info does NOT return information about the
00028    current position anymore;  Use heap_position instead */
00029 
00030 int heap_info(register HP_INFO *info, register HEAPINFO *x, int flag )
00031 {
00032   x->records         = info->getShare()->records;
00033   x->deleted         = info->getShare()->recordspace.del_chunk_count;
00034 
00035   x->reclength     = info->getShare()->recordspace.chunk_dataspace_length;
00036 
00037   x->data_length     = info->getShare()->recordspace.total_data_length;
00038   x->index_length    = info->getShare()->index_length;
00039   x->max_records     = info->getShare()->max_records;
00040   x->errkey          = info->errkey;
00041   if (flag & HA_STATUS_AUTO)
00042     x->auto_increment= info->getShare()->auto_increment + 1;
00043   return(0);
00044 } /* heap_info */