1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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.
This commit is contained in:
unknown
2007-01-11 16:45:38 +03:00
parent 0fdd3dce16
commit 52c100ae0c
4 changed files with 42 additions and 4 deletions

View File

@ -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