~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/string_functions/tests/r/regex.result

  • Committer: Lee Bieber
  • Date: 2010-12-09 06:12:10 UTC
  • mfrom: (1976.7.4 real-trunk)
  • Revision ID: kalebral@gmail.com-20101209061210-hbre9gj1m12x0pl5
Merge Brian - Allow EXECUTE() to work with SELECT as well as stand alone.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
CREATE table t1 (xxx char(128));
 
2
INSERT into t1 (xxx) values('this is a test of some long text to see what happens');
 
3
SELECT * from t1 where xxx regexp('is a test of some long text to');
 
4
xxx
 
5
this is a test of some long text to see what happens
 
6
EXPLAIN EXTENDED SELECT * FROM t1 WHERE xxx REGEXP('is a test of some long text to');
 
7
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
 
8
1       SIMPLE  t1      ALL     NULL    NULL    NULL    NULL    1       100.00  Using where
 
9
Warnings:
 
10
Note    1003    select `test`.`t1`.`xxx` AS `xxx` from `test`.`t1` where regex(`test`.`t1`.`xxx`,'is a test of some long text to')
 
11
SELECT * from t1 where xxx regexp('is a test of some long text to ');
 
12
xxx
 
13
this is a test of some long text to see what happens
 
14
SELECT * from t1 where xxx regexp('is a test of some long text to s');
 
15
xxx
 
16
this is a test of some long text to see what happens
 
17
SELECT * from t1 where xxx regexp('is a test of some long text to se');
 
18
xxx
 
19
this is a test of some long text to see what happens
 
20
DROP table t1;
 
21
CREATE table t1 (xxx char(128));
 
22
INSERT into t1 (xxx) values('this is some text: to test - out.reg exp (22/45)');
 
23
SELECT * from t1 where xxx REGEXP '^this is some text: to test - out\\.regexp [[(][0-9]+[/\\][0-9]+[])][ ]*$';
 
24
xxx
 
25
DROP table t1;
 
26
SELECT 1 REGEXP NULL;
 
27
1 REGEXP NULL
 
28
1
 
29
SELECT '' REGEXP BINARY NULL;
 
30
'' REGEXP BINARY NULL
 
31
NULL
 
32
SELECT NULL REGEXP BINARY NULL;
 
33
NULL REGEXP BINARY NULL
 
34
NULL
 
35
SELECT 'A' REGEXP BINARY NULL;
 
36
'A' REGEXP BINARY NULL
 
37
1
 
38
SELECT "ABC" REGEXP BINARY NULL;
 
39
"ABC" REGEXP BINARY NULL
 
40
1
 
41
CREATE TABLE t1(a INT, b CHAR(4));
 
42
INSERT INTO t1 VALUES (1, '6.1'), (1, '7.0'), (1, '8.0');
 
43
SET @stmt1="SELECT a FROM t1 WHERE a=1 AND '7.0' REGEXP b LIMIT 1";
 
44
EXECUTE @stmt1;
 
45
a
 
46
1
 
47
EXECUTE @stmt1;
 
48
a
 
49
1
 
50
EXECUTE @stmt1;
 
51
a
 
52
1
 
53
EXECUTE @stmt1;
 
54
a
 
55
1
 
56
DROP TABLE t1;