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:
@ -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;
|
||||
|
Reference in New Issue
Block a user