1
drop table if exists t1;
3
drop table if exists t1;
5
select repeat(' ', 64) as s1, repeat(' ',64) as s2
10
t1 CREATE TABLE "t1" (
13
) ENGINE=MyISAM DEFAULT CHARSET=latin1
15
insert into t1 values('aaa','aaa');
16
insert into t1 values('aaa|qqq','qqq');
17
insert into t1 values('gheis','^[^a-dXYZ]+$');
18
insert into t1 values('aab','^aa?b');
19
insert into t1 values('Baaan','^Ba*n');
20
insert into t1 values('aaa','qqq|aaa');
21
insert into t1 values('qqq','qqq|aaa');
22
insert into t1 values('bbb','qqq|aaa');
23
insert into t1 values('bbb','qqq');
24
insert into t1 values('aaa','aba');
25
insert into t1 values(null,'abc');
26
insert into t1 values('def',null);
27
insert into t1 values(null,null);
28
insert into t1 values('ghi','ghi[');
29
select HIGH_PRIORITY s1 regexp s2 from t1;
46
create table t1 (xxx char(128));
47
insert into t1 (xxx) values('this is a test of some long text to see what happens');
48
select * from t1 where xxx regexp('is a test of some long text to');
50
this is a test of some long text to see what happens
51
explain extended select * from t1 where xxx regexp('is a test of some long text to');
52
id select_type table type possible_keys key key_len ref rows filtered Extra
53
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
55
Note 1003 select 'this is a test of some long text to see what happens' AS "xxx" from "test"."t1" where ('this is a test of some long text to see what happens' regexp 'is a test of some long text to')
56
select * from t1 where xxx regexp('is a test of some long text to ');
58
this is a test of some long text to see what happens
59
select * from t1 where xxx regexp('is a test of some long text to s');
61
this is a test of some long text to see what happens
62
select * from t1 where xxx regexp('is a test of some long text to se');
64
this is a test of some long text to see what happens
66
create table t1 (xxx char(128));
67
insert into t1 (xxx) values('this is some text: to test - out.reg exp (22/45)');
68
select * from t1 where xxx REGEXP '^this is some text: to test - out\\.reg exp [[(][0-9]+[/\\][0-9]+[])][ ]*$';
70
this is some text: to test - out.reg exp (22/45)
72
select _latin1 0xFF regexp _latin1 '[[:lower:]]' COLLATE latin1_bin;
73
_latin1 0xFF regexp _latin1 '[[:lower:]]' COLLATE latin1_bin
75
select _koi8r 0xFF regexp _koi8r '[[:lower:]]' COLLATE koi8r_bin;
76
_koi8r 0xFF regexp _koi8r '[[:lower:]]' COLLATE koi8r_bin
78
select _latin1 0xFF regexp _latin1 '[[:upper:]]' COLLATE latin1_bin;
79
_latin1 0xFF regexp _latin1 '[[:upper:]]' COLLATE latin1_bin
81
select _koi8r 0xFF regexp _koi8r '[[:upper:]]' COLLATE koi8r_bin;
82
_koi8r 0xFF regexp _koi8r '[[:upper:]]' COLLATE koi8r_bin
84
select _latin1 0xF7 regexp _latin1 '[[:alpha:]]';
85
_latin1 0xF7 regexp _latin1 '[[:alpha:]]'
87
select _koi8r 0xF7 regexp _koi8r '[[:alpha:]]';
88
_koi8r 0xF7 regexp _koi8r '[[:alpha:]]'
90
select _latin1'a' regexp _latin1'A' collate latin1_general_ci;
91
_latin1'a' regexp _latin1'A' collate latin1_general_ci
93
select _latin1'a' regexp _latin1'A' collate latin1_bin;
94
_latin1'a' regexp _latin1'A' collate latin1_bin