ClickHouse/tests/queries/0_stateless/02293_ilike_on_fixed_strings.sql
Robert Schulze 7232f47c68
Fix Bug 37114 - ilike on FixedString(N) columns produces wrong results
The main fix is in MatchImpl.h where the "case_insensitive" parameter is
added to Regexps::get().

Also made "case_insensitive" a non-default template parameter to reduce
the risk of future bugs.

The remainder of this commit are minor random code improvements.

resoves #37114
2022-05-11 14:30:21 +02:00

11 lines
305 B
SQL

DROP TABLE IF EXISTS tab;
CREATE TABLE tab (col FixedString(2)) engine = MergeTree() ORDER BY col;
INSERT INTO tab VALUES ('AA') ('Aa');
SELECT col, col LIKE '%a', col ILIKE '%a' FROM tab WHERE col = 'AA';
SELECT col, col LIKE '%a', col ILIKE '%a' FROM tab WHERE col = 'Aa';
DROP TABLE IF EXISTS tab;