~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mi_checksum.cc

  • Committer: Monty Taylor
  • Date: 2009-04-14 19:16:51 UTC
  • mto: (997.2.5 mordred)
  • mto: This revision was merged to the branch mainline in revision 994.
  • Revision ID: mordred@inaugust.com-20090414191651-ltbww6hpqks8k7qk
Clarified instructions in README.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 
16
16
/* Calculate a checksum for a row */
17
17
 
18
 
#include "myisam_priv.h"
19
 
 
20
 
using namespace drizzled;
21
 
 
22
 
internal::ha_checksum mi_checksum(MI_INFO *info, const unsigned char *buf)
 
18
#include "myisamdef.h"
 
19
 
 
20
ha_checksum mi_checksum(MI_INFO *info, const unsigned char *buf)
23
21
{
24
22
  uint32_t i;
25
 
  internal::ha_checksum crc=0;
 
23
  ha_checksum crc=0;
26
24
  MI_COLUMNDEF *rec=info->s->rec;
27
25
 
28
26
  for (i=info->s->base.fields ; i-- ; buf+=(rec++)->length)
53
51
      pos=buf;
54
52
      break;
55
53
    }
56
 
    crc=internal::my_checksum(crc, pos ? pos : (unsigned char*) "", length);
 
54
    crc=my_checksum(crc, pos ? pos : (unsigned char*) "", length);
57
55
  }
58
56
  return crc;
59
57
}
60
58
 
61
59
 
62
 
internal::ha_checksum mi_static_checksum(MI_INFO *info, const unsigned char *pos)
 
60
ha_checksum mi_static_checksum(MI_INFO *info, const unsigned char *pos)
63
61
{
64
 
  return internal::my_checksum(0, pos, info->s->base.reclength);
 
62
  return my_checksum(0, pos, info->s->base.reclength);
65
63
}