ClickHouse/tests/queries/0_stateless/02111_json_column_name_encoding.sql
Kevin Michel edbeeaf6ec
Fix invalid JSON in column names
If the column name contains invalid UTF-8 sequences
and the output data types are all considered safe,
then the output will not be sanitized and the generated
JSON will be invalid.

A minimal reproduction case is :
`SELECT length('\x80') FORMAT JSONCompact`
where we auto-generate a non-UTF-8 column name with only
integer outputs, whereas :
`SELECT '\x80' FORMAT JSONCompact`
would be sanitized because the column type is String and
will trigger UTF-8 sanitization over the entire document.
2021-11-20 12:35:41 +01:00

8 lines
113 B
SQL

-- Tags: no-fasttest
SET output_format_write_statistics = 0;
SELECT
length('\x80')
FORMAT JSONCompact;