summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_like.test
diff options
context:
space:
mode:
authorunknown <bar@mysql.com>2005-09-06 16:16:10 +0500
committerunknown <bar@mysql.com>2005-09-06 16:16:10 +0500
commit965afd45a18f0af3395c4750c072788e1f9b2ee1 (patch)
treef5e60a5cc5b8f3d74322e27c60478d1b679f3f79 /mysql-test/t/func_like.test
parente254105bec21fc101326ca366ef85cd0d8d4ed98 (diff)
downloadmariadb-git-965afd45a18f0af3395c4750c072788e1f9b2ee1.tar.gz
func_like.result, func_like.test:
adding test case. item_cmpfunc.cc: Bug#12611 ESCAPE + LIKE do not work when the escape char is a multibyte one Additional fix for 8bit character sets: escape character must be converted into operation character set. sql/item_cmpfunc.cc: Bug#12611 ESCAPE + LIKE do not work when the escape char is a multibyte one Additional fix for 8bit character sets: escape character must be converted into operation character set. mysql-test/t/func_like.test: adding test case. mysql-test/r/func_like.result: adding test case.
Diffstat (limited to 'mysql-test/t/func_like.test')
-rw-r--r--mysql-test/t/func_like.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/t/func_like.test b/mysql-test/t/func_like.test
index 684d7032038..4e1183afeff 100644
--- a/mysql-test/t/func_like.test
+++ b/mysql-test/t/func_like.test
@@ -96,4 +96,21 @@ DROP TABLE t1;
#
select _cp866'aaaaaaaaa' like _cp866'%aaaa%' collate cp866_bin;
+#
+# Check 8bit escape character
+#
+set names koi8r;
+select 'andre%' like 'andreÊ%' escape 'Ê';
+
+# Check 8bit escape character with charset conversion:
+# For "a LIKE b ESCAPE c" expressions,
+# escape character is converted into the operation character set,
+# which is result of aggregation of character sets of "a" and "b".
+# "c" itself doesn't take part in aggregation, because its collation
+# doesn't matter, escape character is always compared binary.
+# In the example below, escape character is converted from koi8r into cp1251:
+#
+select _cp1251'andre%' like convert('andreÊ%' using cp1251) escape 'Ê';
+
+#
# End of 4.1 tests