You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unexpected results when matching empty string with indexing disabled #16567
Consider the test case below. It is unexpected that the last query returns an empty result, because the result of the second query is TRUE, which means that the WHERE clause in the last query should be evaluated to TRUE and thus return the row in the table.
Steps to Reproduce
DROPTABLE IF EXISTS t0;
CREATETABLEt0(c0 VARCHAR(500) INDEX OFF, PRIMARY KEY(c0)); -- INDEX OFF is importantINSERT INTO t0(c0) VALUES ('');
REFRESH TABLE t0;
SELECTt0.c0FROM t0; -- ''SELECT (t0.c0LIKE'') FROM t0; -- TRUESELECTt0.c0FROM t0 WHERE (t0.c0LIKE'');
-- Expected: ''-- Actual: empty table
Activity
matriv commentedon Sep 4, 2024
It also returns 0 rows without defining
c0asPRIMARY KEY.Fix issue with LIKE/ILIKE on INDEX OFF cols with empty pattern
Fix issue with LIKE/ILIKE on INDEX OFF cols with empty pattern
Fix issue with LIKE/ILIKE on INDEX OFF cols with empty pattern
matriv commentedon Sep 4, 2024
Thank you for reporting the issue @suyZhong ! The fix will be available with the next hotfix release.
Fix issue with LIKE/ILIKE on INDEX OFF cols with empty pattern
Fix issue with LIKE/ILIKE on INDEX OFF cols with empty pattern