MXS-2238: Fix reading of large Avro schemas
The schemas were read incorrectly which resulted in large schemas having multiple newlines in them.
This commit is contained in:
@ -853,8 +853,6 @@ GWBUF* read_avro_json_schema(const char *avrofile, const char* dir)
|
|||||||
nread--;
|
nread--;
|
||||||
}
|
}
|
||||||
|
|
||||||
buffer[nread++] = '\n';
|
|
||||||
|
|
||||||
GWBUF* newbuf = gwbuf_alloc_and_load(nread, buffer);
|
GWBUF* newbuf = gwbuf_alloc_and_load(nread, buffer);
|
||||||
|
|
||||||
if (newbuf)
|
if (newbuf)
|
||||||
@ -863,6 +861,8 @@ GWBUF* read_avro_json_schema(const char *avrofile, const char* dir)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rval = gwbuf_append(rval, gwbuf_alloc_and_load(1, "\n"));
|
||||||
|
|
||||||
fclose(file);
|
fclose(file);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user