ClickHouse/dbms/tests/queries/0_stateless/00568_empty_function_with_fixed_string.sql
Daniel Dao eb91b19a99
Fix buffer overflow for EmptyImpl with FixedString
Signed-off-by: Daniel Dao <dqminh89@gmail.com>
2018-11-30 02:17:01 +00:00

9 lines
397 B
SQL

SELECT toFixedString('', 4) AS str, empty(str) AS is_empty;
SELECT toFixedString('\0abc', 4) AS str, empty(str) AS is_empty;
DROP TABLE IF EXISTS test.defaulted;
CREATE TABLE test.defaulted (v6 FixedString(16)) ENGINE=Memory;
INSERT INTO test.defaulted SELECT toFixedString('::0', 16) FROM numbers(32768);
SELECT count(), notEmpty(v6) e FROM test.defaulted GROUP BY e;
DROP TABLE test.defaulted;