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