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,9 +853,7 @@ GWBUF* read_avro_json_schema(const char *avrofile, const char* dir)
|
||||
nread--;
|
||||
}
|
||||
|
||||
buffer[nread++] = '\n';
|
||||
|
||||
GWBUF * newbuf = gwbuf_alloc_and_load(nread, buffer);
|
||||
GWBUF* newbuf = gwbuf_alloc_and_load(nread, buffer);
|
||||
|
||||
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);
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user