Hi, Tom! On Jan 31, Tom Worster wrote:
I think we're getting lost in the detail. Beyond dispute are two facts:
1. BINARY is a valid datatype in dynamic columns. 2. JSON cannot represent binary data.
It follows that:
COLUMN_JSON() cannot (correctly) represent all dynamic column values.
So I ask the question is:
What *should* COLUMN_JSON() do when a dynamic column contains BINARY values?
When I file a bug report, I like to give an expected result. I don't know what it is in this case. Every other decent JSON encoder errors on such input. Is that what Maria should do?
I suppose MariaDB could either return a NULL (meaning "failed", "invalid input", "not possible to convert to JSON") or, may be, base64 this binary data in the output. But base64 looks like an arbitrary choice, and it, technically, returns something that is *not* the original binary data. Regards, Sergei