~linuxjedi/drizzle/trunk-bug-667053

« back to all changes in this revision

Viewing changes to mysql-test/t/func_regexp.test

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Some regexp tests
 
3
#
 
4
 
 
5
--disable_warnings
 
6
drop table if exists t1;
 
7
--enable_warnings
 
8
 
 
9
set names latin1;
 
10
--source include/ctype_regex.inc
 
11
 
 
12
 
 
13
#
 
14
# This test a bug in regexp on Alpha
 
15
#
 
16
 
 
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');
 
24
drop table t1;
 
25
 
 
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]+[])][ ]*$';
 
29
drop table t1;
 
30
 
 
31
#
 
32
# Check with different character sets and collations
 
33
#
 
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;
 
38
 
 
39
select _latin1 0xF7 regexp _latin1 '[[:alpha:]]';
 
40
select _koi8r  0xF7 regexp _koi8r  '[[:alpha:]]';
 
41
 
 
42
select _latin1'a' regexp _latin1'A' collate latin1_general_ci;
 
43
select _latin1'a' regexp _latin1'A' collate latin1_bin;
 
44
 
 
45
--echo End of 4.1 tests
 
46
 
 
47
 
 
48
#
 
49
# Bug #31440: 'select 1 regex null' asserts debug server
 
50
#
 
51
 
 
52
SELECT 1 REGEXP NULL;
 
53
 
 
54
--echo End of 5.0 tests