Fix to bug #585, http://bugs.mariadb.com/show_bug.cgi?id=585
buffer.c:gwbuf_make_contiguous: when new buffer is created, copy original buffer's type to new buffer modutil.c:modutil_replace_SQL: when new bugger is added to GWBUF, copy original buffer's type to new buffer In all filters, merge all buffers of GWBUF to one before calling modutil:extract_SQL
This commit is contained in:
@ -569,7 +569,9 @@ int len;
|
||||
|
||||
if ((newbuf = gwbuf_alloc(gwbuf_length(orig))) != NULL)
|
||||
{
|
||||
gwbuf_type_t buftype = orig->gwbuf_type;
|
||||
ptr = GWBUF_DATA(newbuf);
|
||||
|
||||
while (orig)
|
||||
{
|
||||
len = GWBUF_LENGTH(orig);
|
||||
@ -577,6 +579,7 @@ int len;
|
||||
ptr += len;
|
||||
orig = gwbuf_consume(orig, len);
|
||||
}
|
||||
newbuf->gwbuf_type = buftype;
|
||||
}
|
||||
return newbuf;
|
||||
}
|
||||
|
Reference in New Issue
Block a user