ClickHouse/tests/queries/0_stateless/02113_base64encode_trailing_bytes.reference
Kevin Michel f05aaa4651
Add test case for base64Encode returning corrupted data
Sometimes, base64Encode returns data that belongs to the next string
in the buffer. This test, when failing, shows something like that:

    -SELECT * FROM tabl_1 SETTINGS log_comment = ?;
    -SELECT * FROM tabl_2 SETTINGS log_comment = ?;
    +SELECT * FROM tabl_1 SETTINGS log_comment = ?;\0S
    +SELECT * FROM tabl_2 SETTINGS log_comment = ?;\0c

 Where the S at the end of the first string is the first S of the next
 string in the buffer.

 I don't know exactly why, but reading from query_log is how I manage
 to reliably trigger the bug. The same code on literals, or even on
 a different table, did not trigger the bug, something related to
 alignment maybe.
2021-11-25 15:24:10 +01:00

3 lines
94 B
Plaintext

SELECT * FROM tabl_1 SETTINGS log_comment = ?;
SELECT * FROM tabl_2 SETTINGS log_comment = ?;