2000-12-28 02:56:38 +01:00
|
|
|
#
|
|
|
|
# Test of like
|
|
|
|
#
|
|
|
|
|
2001-09-14 01:54:33 +02:00
|
|
|
drop table if exists t1;
|
2000-12-28 02:56:38 +01:00
|
|
|
create table t1 (a varchar(10), key(a));
|
|
|
|
insert into t1 values ("a"),("abc"),("abcd"),("hello"),("test");
|
|
|
|
select * from t1 where a like "abc%";
|
2001-09-14 01:54:33 +02:00
|
|
|
select * from t1 where a like "ABC%";
|
2000-12-28 02:56:38 +01:00
|
|
|
select * from t1 where a like "test%";
|
|
|
|
select * from t1 where a like "te_t";
|
2002-05-17 15:45:00 +02:00
|
|
|
|
|
|
|
#
|
2002-05-21 00:07:09 +02:00
|
|
|
# The following will test the Turbo Boyer-Moore code
|
2002-05-17 15:45:00 +02:00
|
|
|
#
|
|
|
|
select * from t1 where a like "%a%";
|
|
|
|
select * from t1 where a like "%abcd%";
|
|
|
|
select * from t1 where a like "%abc\d%";
|
|
|
|
|
2000-12-28 02:56:38 +01:00
|
|
|
drop table t1;
|