~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/xid.cc

  • Committer: Olaf van der Spek
  • Date: 2011-04-19 13:18:03 UTC
  • mto: This revision was merged to the branch mainline in revision 2287.
  • Revision ID: olafvdspek@gmail.com-20110419131803-vns5ltmraa4fuffq
Prune

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
namespace drizzled {
29
29
 
30
 
bool XID::eq(XID *xid)
31
 
{
32
 
  return eq(xid->gtrid_length, xid->bqual_length, xid->data);
33
 
}
34
 
 
35
 
bool XID::eq(long g, long b, const char *d)
36
 
{
37
 
  return g == gtrid_length && b == bqual_length && !memcmp(d, data, g+b);
38
 
}
39
 
 
40
 
void XID::set(XID *xid)
41
 
{
42
 
  memcpy(this, xid, xid->length());
43
 
}
44
 
 
45
 
void XID::set(long f, const char *g, long gl, const char *b, long bl)
46
 
{
47
 
  formatID= f;
48
 
  memcpy(data, g, gtrid_length= gl);
49
 
  memcpy(data+gl, b, bqual_length= bl);
50
 
}
51
 
 
52
30
void XID::set(uint64_t xid)
53
31
{
54
32
  formatID= 1;