summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_regexp_pcre.test
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mnogosearch.org>2013-10-03 14:24:16 +0400
committerAlexander Barkov <bar@mnogosearch.org>2013-10-03 14:24:16 +0400
commit01f833569b9d66b7abc1704037354b8e2727e504 (patch)
treea2a9cc1af8b45ba871f80a1a2b4c62806f942a7c /mysql-test/t/func_regexp_pcre.test
parentf37e0a885ab257b40159a81cdc2b3a7d70e7b691 (diff)
downloadmariadb-git-01f833569b9d66b7abc1704037354b8e2727e504.tar.gz
MDEV-4425 Regexp enhancements
Adding more tests for case sensitivity, with various collation and (?i) flags combinations.
Diffstat (limited to 'mysql-test/t/func_regexp_pcre.test')
-rw-r--r--mysql-test/t/func_regexp_pcre.test9
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/t/func_regexp_pcre.test b/mysql-test/t/func_regexp_pcre.test
index 6da050e1824..ff0ee569b1a 100644
--- a/mysql-test/t/func_regexp_pcre.test
+++ b/mysql-test/t/func_regexp_pcre.test
@@ -22,6 +22,15 @@ SELECT 'À' RLIKE '\\x{00E0}' COLLATE utf8_bin;
SELECT 'à' RLIKE '\\x{00C0}' COLLATE utf8_bin;
SELECT 'À' RLIKE '\\x{00C0}' COLLATE utf8_bin;
+# Checking how (?i) and (?-i) affect case sensitivity
+CREATE TABLE t1 (s VARCHAR(10) CHARACTER SET utf8);
+INSERT INTO t1 VALUES ('a'),('A');
+CREATE TABLE t2 (p VARCHAR(10) CHARACTER SET utf8);
+INSERT INTO t2 VALUES ('a'),('(?i)a'),('(?-i)a'),('A'),('(?i)A'),('(?-i)A');
+SELECT s,p,s RLIKE p, s COLLATE utf8_bin RLIKE p FROM t1,t2 ORDER BY BINARY s, BINARY p;
+DROP TABLE t1,t2;
+
+
# Checking Unicode character classes
CREATE TABLE t1 (ch VARCHAR(22)) CHARACTER SET utf8;
CREATE TABLE t2 (class VARCHAR(32)) CHARACTER SET utf8;