mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Bug#13143 - formatID should not affect XID's uniqueness
This commit is contained in:
@ -228,7 +228,7 @@ struct xid_t {
|
||||
char data[XIDDATASIZE]; // not \0-terminated !
|
||||
|
||||
bool eq(struct xid_t *xid)
|
||||
{ return !memcmp(this, xid, length()); }
|
||||
{ return eq(xid->gtrid_length, xid->bqual_length, xid->data); }
|
||||
bool eq(long g, long b, const char *d)
|
||||
{ return g == gtrid_length && b == bqual_length && !memcmp(d, data, g+b); }
|
||||
void set(struct xid_t *xid)
|
||||
@ -276,6 +276,14 @@ struct xid_t {
|
||||
return sizeof(formatID)+sizeof(gtrid_length)+sizeof(bqual_length)+
|
||||
gtrid_length+bqual_length;
|
||||
}
|
||||
byte *key()
|
||||
{
|
||||
return (byte *)>rid_length;
|
||||
}
|
||||
uint key_length()
|
||||
{
|
||||
return sizeof(gtrid_length)+sizeof(bqual_length)+gtrid_length+bqual_length;
|
||||
}
|
||||
};
|
||||
typedef struct xid_t XID;
|
||||
|
||||
|
Reference in New Issue
Block a user