summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_str.test
diff options
context:
space:
mode:
authorevgen@moonbone.local <>2007-01-11 16:45:38 +0300
committerevgen@moonbone.local <>2007-01-11 16:45:38 +0300
commitfc0e206cb538d622abf1854a50a14836ac275b74 (patch)
tree34f917f8b95414b540f86d33b2f29d88a5c28feb /mysql-test/t/func_str.test
parentf35e10d43ca61eff7631d9ba95a4d9c4012f40b0 (diff)
downloadmariadb-git-fc0e206cb538d622abf1854a50a14836ac275b74.tar.gz
Bug#23409: Arguments of the ENCODE() and the DECODE() functions were not printed
correctly. The Item_func::print method was used to print the Item_func_encode and the Item_func_decode objects. The last argument to ENCODE and DECODE functions is a plain C string and thus Item_func::print wasn't able to print it. The print() method is added to the Item_func_encode class. It correctly prints the Item_func_encode and the Item_func_decode objects.
Diffstat (limited to 'mysql-test/t/func_str.test')
-rw-r--r--mysql-test/t/func_str.test8
1 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test
index 3c855a32eed..5897674d1d4 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -713,4 +713,12 @@ EXPLAIN EXTENDED SELECT s FROM t1 WHERE TRIM(BOTH 'y' FROM s) > 'ab';
DROP TABLE t1;
+#
+# Bug#23409: ENCODE() and DECODE() functions aren't printed correctly
+#
+create table t1(f1 varchar(4));
+explain extended select encode(f1,'zxcv') as 'enc' from t1;
+explain extended select decode(f1,'zxcv') as 'enc' from t1;
+drop table t1;
+
--echo End of 4.1 tests