# -------------------------------------------------------------- # # Test case migrated from regression test suite: MCOL-1246.sql # # Author: Daniel Lee, daniel.lee@mariadb.com # -------------------------------------------------------------- # # --source ../include/have_columnstore.inc # USE tpch1; # #-- Support SQL-92 matching for spaces --disable_warnings drop table if exists mcol1246a; drop table if exists mcol1246b; drop table if exists mcol1246c; --enable_warnings #-- varchar(7) for extent elimination check create table mcol1246a (a int, b varchar(7)) engine=columnstore; create table mcol1246b (a int, b varchar(20)) engine=columnstore; create table mcol1246c (a int, b text) engine=columnstore; #-- space, tab, no padding insert into mcol1246a values (1, 'ABC '), (2, 'ABC '), (3, 'ABC'); insert into mcol1246b values (1, 'ABC '), (2, 'ABC '), (3, 'ABC'); insert into mcol1246c values (1, 'ABC '), (2, 'ABC '), (3, 'ABC'); #-- each should return 2 rows select * from mcol1246a where b = 'ABC'; select * from mcol1246b where b = 'ABC'; select * from mcol1246c where b = 'ABC'; #-- each should return 2 rows select * from mcol1246a where b = 'ABC '; select * from mcol1246b where b = 'ABC '; select * from mcol1246c where b = 'ABC '; #-- each should return 1 row (tab match) select * from mcol1246a where b = 'ABC '; select * from mcol1246b where b = 'ABC '; select * from mcol1246c where b = 'ABC '; #-- each should return 1 row select * from mcol1246a where b LIKE 'ABC'; select * from mcol1246b where b LIKE 'ABC'; select * from mcol1246c where b LIKE 'ABC'; --disable_warnings drop table mcol1246a; drop table mcol1246b; drop table mcol1246c; --enable_warnings #