summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2004-06-19 13:26:39 +0300
committerunknown <bell@sanja.is.com.ua>2004-06-19 13:26:39 +0300
commit49aebb9891f075e0a5c53bdf76aba72fc6019e52 (patch)
treede0668df4035239b5c431106c9ad56c9a3a43d47 /mysql-test
parent94f36589c72c7c916802e2c8da9cb2f3ecc72b4a (diff)
downloadmariadb-git-49aebb9891f075e0a5c53bdf76aba72fc6019e52.tar.gz
cleanup for Item_func_regex (Bug #4199)
mysql-test/r/func_regexp.result: test of cleaning regex in PS mysql-test/t/func_regexp.test: test of cleaning regex in PS sql/item_cmpfunc.cc: cleanup for Item_func_regex sql/item_cmpfunc.h: cleanup for Item_func_regex
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/func_regexp.result17
-rw-r--r--mysql-test/t/func_regexp.test13
2 files changed, 30 insertions, 0 deletions
diff --git a/mysql-test/r/func_regexp.result b/mysql-test/r/func_regexp.result
index 7f977e2782b..8228d6982d3 100644
--- a/mysql-test/r/func_regexp.result
+++ b/mysql-test/r/func_regexp.result
@@ -81,3 +81,20 @@ _latin1'a' regexp _latin1'A' collate latin1_general_ci
select _latin1'a' regexp _latin1'A' collate latin1_bin;
_latin1'a' regexp _latin1'A' collate latin1_bin
0
+create table t1 (a varchar(40));
+insert into t1 values ('C1'),('C2'),('R1'),('C3'),('R2'),('R3');
+prepare stmt1 from 'select a from t1 where a rlike ? order by a';
+set @a="^C.*";
+execute stmt1 using @a;
+a
+C1
+C2
+C3
+set @a="^R.*";
+execute stmt1 using @a;
+a
+R1
+R2
+R3
+deallocate prepare stmt1;
+drop table t1;
diff --git a/mysql-test/t/func_regexp.test b/mysql-test/t/func_regexp.test
index edfa9afcfa6..1a771d466fa 100644
--- a/mysql-test/t/func_regexp.test
+++ b/mysql-test/t/func_regexp.test
@@ -60,3 +60,16 @@ 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;
+
+#
+# regexp cleanup()
+#
+create table t1 (a varchar(40));
+insert into t1 values ('C1'),('C2'),('R1'),('C3'),('R2'),('R3');
+prepare stmt1 from 'select a from t1 where a rlike ? order by a';
+set @a="^C.*";
+execute stmt1 using @a;
+set @a="^R.*";
+execute stmt1 using @a;
+deallocate prepare stmt1;
+drop table t1;