Fix to bug #587, http://bugs.mariadb.com/show_bug.cgi?id=587
buffer.c:gwbuf_make_contiguous: hint wasn't duplicated to new GWBUF struct. As a result hints were lost if query rewriting resulted in longer query than the original.
This commit is contained in:
@ -569,7 +569,8 @@ int len;
|
||||
|
||||
if ((newbuf = gwbuf_alloc(gwbuf_length(orig))) != NULL)
|
||||
{
|
||||
gwbuf_type_t buftype = orig->gwbuf_type;
|
||||
newbuf->gwbuf_type = orig->gwbuf_type;
|
||||
newbuf->hint = hint_dup(orig->hint);
|
||||
ptr = GWBUF_DATA(newbuf);
|
||||
|
||||
while (orig)
|
||||
@ -579,7 +580,6 @@ int len;
|
||||
ptr += len;
|
||||
orig = gwbuf_consume(orig, len);
|
||||
}
|
||||
newbuf->gwbuf_type = buftype;
|
||||
}
|
||||
return newbuf;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user