1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

regexp worked only with the default character set.

Now it can work with any character set.
This commit is contained in:
unknown
2003-09-24 13:57:26 +05:00
parent 4e09f14b18
commit e9299e6da9
4 changed files with 73 additions and 21 deletions

View File

@ -45,3 +45,17 @@ create table t1 (xxx char(128));
insert into t1 (xxx) values('this is some text: to test - out.reg exp (22/45)');
select * from t1 where xxx REGEXP '^this is some text: to test - out\\.reg exp [[(][0-9]+[/\\][0-9]+[])][ ]*$';
drop table t1;
#
# Check with different character sets and collations
#
select _latin1 0xFF regexp _latin1 '[[:lower:]]' COLLATE latin1_bin;
select _koi8r 0xFF regexp _koi8r '[[:lower:]]' COLLATE koi8r_bin;
select _latin1 0xFF regexp _latin1 '[[:upper:]]' COLLATE latin1_bin;
select _koi8r 0xFF regexp _koi8r '[[:upper:]]' COLLATE koi8r_bin;
select _latin1 0xF7 regexp _latin1 '[[:alpha:]]';
select _koi8r 0xF7 regexp _koi8r '[[:alpha:]]';
select _latin1'a' regexp _latin1'A' collate latin1_general_ci;
select _latin1'a' regexp _latin1'A' collate latin1_bin;