6
drop table if exists t1;
10
--source include/ctype_regex.inc
14
# This test a bug in regexp on Alpha
17
create table t1 (xxx char(128));
18
insert into t1 (xxx) values('this is a test of some long text to see what happens');
19
select * from t1 where xxx regexp('is a test of some long text to');
20
explain extended select * from t1 where xxx regexp('is a test of some long text to');
21
select * from t1 where xxx regexp('is a test of some long text to ');
22
select * from t1 where xxx regexp('is a test of some long text to s');
23
select * from t1 where xxx regexp('is a test of some long text to se');
26
create table t1 (xxx char(128));
27
insert into t1 (xxx) values('this is some text: to test - out.reg exp (22/45)');
28
select * from t1 where xxx REGEXP '^this is some text: to test - out\\.reg exp [[(][0-9]+[/\\][0-9]+[])][ ]*$';
32
# Check with different character sets and collations
34
select _latin1 0xFF regexp _latin1 '[[:lower:]]' COLLATE latin1_bin;
35
select _koi8r 0xFF regexp _koi8r '[[:lower:]]' COLLATE koi8r_bin;
36
select _latin1 0xFF regexp _latin1 '[[:upper:]]' COLLATE latin1_bin;
37
select _koi8r 0xFF regexp _koi8r '[[:upper:]]' COLLATE koi8r_bin;
39
select _latin1 0xF7 regexp _latin1 '[[:alpha:]]';
40
select _koi8r 0xF7 regexp _koi8r '[[:alpha:]]';
42
select _latin1'a' regexp _latin1'A' collate latin1_general_ci;
43
select _latin1'a' regexp _latin1'A' collate latin1_bin;
45
--echo End of 4.1 tests
49
# Bug #31440: 'select 1 regex null' asserts debug server
54
--echo End of 5.0 tests