diff options
Diffstat (limited to 'sql/handler.h')
-rw-r--r-- | sql/handler.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/handler.h b/sql/handler.h index 0aa56afe1a5..96f2836c921 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -584,8 +584,10 @@ struct xid_t { void set(long f, const char *g, long gl, const char *b, long bl) { formatID= f; - memcpy(data, g, gtrid_length= gl); - memcpy(data+gl, b, bqual_length= bl); + if ((gtrid_length= gl)) + memcpy(data, g, gl); + if ((bqual_length= bl)) + memcpy(data+gl, b, bl); } void set(ulonglong xid) { |