~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/memory/hp_info.cc

  • Committer: Monty Taylor
  • Date: 2011-02-13 17:26:39 UTC
  • mfrom: (2157.2.2 give-in-to-pkg-config)
  • mto: This revision was merged to the branch mainline in revision 2166.
  • Revision ID: mordred@inaugust.com-20110213172639-nhy7i72sfhoq13ms
Merged in pkg-config fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
14
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
15
15
 
16
16
/* Returns info about database status */
17
17
 
29
29
 
30
30
int heap_info(register HP_INFO *info, register HEAPINFO *x, int flag )
31
31
{
32
 
  x->records         = info->s->records;
33
 
  x->deleted         = info->s->recordspace.del_chunk_count;
34
 
 
35
 
  if (info->s->recordspace.is_variable_size)
36
 
  {
37
 
    if (info->s->records)
38
 
      x->reclength   = (uint)(info->s->recordspace.total_data_length / (uint64_t)info->s->records);
39
 
    else
40
 
      x->reclength   = info->s->recordspace.chunk_length;
41
 
  }
42
 
  else
43
 
  {
44
 
    x->reclength     = info->s->recordspace.chunk_dataspace_length;
45
 
  }
46
 
 
47
 
  x->data_length     = info->s->recordspace.total_data_length;
48
 
  x->index_length    = info->s->index_length;
49
 
  x->max_records     = info->s->max_records;
 
32
  x->records         = info->getShare()->records;
 
33
  x->deleted         = info->getShare()->recordspace.del_chunk_count;
 
34
 
 
35
  x->reclength     = info->getShare()->recordspace.chunk_dataspace_length;
 
36
 
 
37
  x->data_length     = info->getShare()->recordspace.total_data_length;
 
38
  x->index_length    = info->getShare()->index_length;
 
39
  x->max_records     = info->getShare()->max_records;
50
40
  x->errkey          = info->errkey;
51
41
  if (flag & HA_STATUS_AUTO)
52
 
    x->auto_increment= info->s->auto_increment + 1;
 
42
    x->auto_increment= info->getShare()->auto_increment + 1;
53
43
  return(0);
54
44
} /* heap_info */