~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/heap/hp_info.cc

  • Committer: Brian Aker
  • Date: 2010-08-18 19:37:19 UTC
  • mto: This revision was merged to the branch mainline in revision 1720.
  • Revision ID: brian@tangent.org-20100818193719-bxxzn1pi22styowd
created function that can be used to simply crash the server.

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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
16
/* Returns info about database status */
17
17
 
32
32
  x->records         = info->getShare()->records;
33
33
  x->deleted         = info->getShare()->recordspace.del_chunk_count;
34
34
 
35
 
  x->reclength     = info->getShare()->recordspace.chunk_dataspace_length;
 
35
  if (info->getShare()->recordspace.is_variable_size)
 
36
  {
 
37
    if (info->getShare()->records)
 
38
      x->reclength   = (uint)(info->getShare()->recordspace.total_data_length / (uint64_t)info->getShare()->records);
 
39
    else
 
40
      x->reclength   = info->getShare()->recordspace.chunk_length;
 
41
  }
 
42
  else
 
43
  {
 
44
    x->reclength     = info->getShare()->recordspace.chunk_dataspace_length;
 
45
  }
36
46
 
37
47
  x->data_length     = info->getShare()->recordspace.total_data_length;
38
48
  x->index_length    = info->getShare()->index_length;