summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_str.test
diff options
context:
space:
mode:
authorunknown <evgen@moonbone.local>2007-01-11 16:45:38 +0300
committerunknown <evgen@moonbone.local>2007-01-11 16:45:38 +0300
commit52c100ae0cfbf5588fe3fa1917aba3934241e3f6 (patch)
tree34f917f8b95414b540f86d33b2f29d88a5c28feb /mysql-test/t/func_str.test
parent0fdd3dce16caf33148bcc42b98b5d5d6142182f6 (diff)
downloadmariadb-git-52c100ae0cfbf5588fe3fa1917aba3934241e3f6.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. mysql-test/t/func_str.test: Added a test case for bug#23409: Arguments of the ENCODE() and the > DECODE() functionswere not printed correctly. mysql-test/r/func_str.result: Added a test case for bug#23409: Arguments of the ENCODE() and the DECODE() functions were not printed correctly. sql/item_strfunc.h: Bug#23409: Arguments of the ENCODE() and the DECODE() functions were not printed correctly. The print() method is added to the Item_func_encode class. sql/item_strfunc.cc: Bug#23409: Arguments of the ENCODE() and the DECODE() functions were not printed correctly. 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