2
CREATE table t1 (xxx char(128));
3
INSERT into t1 (xxx) values('this is a test of some long text to see what happens');
4
SELECT * from t1 where xxx regexp('is a test of some long text to');
5
EXPLAIN EXTENDED SELECT * FROM t1 WHERE xxx REGEXP('is a test of some long text to');
6
SELECT * from t1 where xxx regexp('is a test of some long text to ');
7
SELECT * from t1 where xxx regexp('is a test of some long text to s');
8
SELECT * from t1 where xxx regexp('is a test of some long text to se');
11
CREATE table t1 (xxx char(128));
12
INSERT into t1 (xxx) values('this is some text: to test - out.reg exp (22/45)');
13
SELECT * from t1 where xxx REGEXP '^this is some text: to test - out\\.regexp [[(][0-9]+[/\\][0-9]+[])][ ]*$';
18
SELECT '' REGEXP BINARY NULL;
19
SELECT NULL REGEXP BINARY NULL;
20
SELECT 'A' REGEXP BINARY NULL;
21
SELECT "ABC" REGEXP BINARY NULL;
23
CREATE TABLE t1(a INT, b CHAR(4));
24
INSERT INTO t1 VALUES (1, '6.1'), (1, '7.0'), (1, '8.0');
25
SET @stmt1="SELECT a FROM t1 WHERE a=1 AND '7.0' REGEXP b LIMIT 1";