mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.0
into c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.1
This commit is contained in:

commit
02056f8e3a
@ -240,11 +240,11 @@ struct xid_t {
|
||||
char data[XIDDATASIZE]; // not \0-terminated !
|
||||
|
||||
bool eq(struct xid_t *xid)
|
||||
{ return !memcmp(this, xid, sizeof(long)*3+gtrid_length+bqual_length); }
|
||||
{ return !memcmp(this, xid, length()); }
|
||||
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)
|
||||
{ memcpy(this, xid, sizeof(long)*3+xid->gtrid_length+xid->bqual_length); }
|
||||
{ memcpy(this, xid, xid->length()); }
|
||||
void set(long f, const char *g, long gl, const char *b, long bl)
|
||||
{
|
||||
formatID= f;
|
||||
@ -283,6 +283,11 @@ struct xid_t {
|
||||
!memcmp(data, MYSQL_XID_PREFIX, MYSQL_XID_PREFIX_LEN) ?
|
||||
quick_get_my_xid() : 0;
|
||||
}
|
||||
uint length()
|
||||
{
|
||||
return sizeof(formatID)+sizeof(gtrid_length)+sizeof(bqual_length)+
|
||||
gtrid_length+bqual_length;
|
||||
}
|
||||
};
|
||||
typedef struct xid_t XID;
|
||||
|
||||
|
Reference in New Issue
Block a user