MXS-2569: Always terminate schemas with newlines
If the stored file didn't have a newline in the schema, the schema and the first row would be on the same line.
This commit is contained in:
@ -586,6 +586,8 @@ GWBUF* read_avro_json_schema(std::string avrofile, std::string dir)
|
|||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << file.rdbuf();
|
ss << file.rdbuf();
|
||||||
std::string text = ss.str();
|
std::string text = ss.str();
|
||||||
|
mxs::rtrim(text);
|
||||||
|
text += '\n';
|
||||||
mxs::Buffer buffer(std::vector<uint8_t>(text.begin(), text.end()));
|
mxs::Buffer buffer(std::vector<uint8_t>(text.begin(), text.end()));
|
||||||
rval = buffer.release();
|
rval = buffer.release();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user