Commit 52d76c5f authored by unknown's avatar unknown

fixed encrypt() print (BUG#7024)


mysql-test/r/view.result:
  using encrypt & substring_index in view
mysql-test/t/view.test:
  using encrypt & substring_index in view
sql/item_strfunc.h:
  fixed encrypt() print
parent 0dd60645
......@@ -1831,3 +1831,11 @@ select * from v1;
t
01:00
drop view v1;
CREATE VIEW v1 AS SELECT ENCRYPT("dhgdhgd");
SELECT * FROM v1;
drop view v1;
CREATE VIEW v1 AS SELECT SUBSTRING_INDEX("dkjhgd:kjhdjh", ":", 1);
SELECT * FROM v1;
SUBSTRING_INDEX("dkjhgd:kjhdjh", ":", 1)
dkjhgd
drop view v1;
......@@ -1673,3 +1673,15 @@ create view v1(k, K) as select 1,2;
create view v1 as SELECT TIME_FORMAT(SEC_TO_TIME(3600),'%H:%i') as t;
select * from v1;
drop view v1;
#
# using encrypt & substring_index in view (BUG#7024)
#
CREATE VIEW v1 AS SELECT ENCRYPT("dhgdhgd");
disable_result_log;
SELECT * FROM v1;
enable_result_log;
drop view v1;
CREATE VIEW v1 AS SELECT SUBSTRING_INDEX("dkjhgd:kjhdjh", ":", 1);
SELECT * FROM v1;
drop view v1;
......@@ -322,7 +322,7 @@ class Item_func_encrypt :public Item_str_func
Item_func_encrypt(Item *a, Item *b): Item_str_func(a,b) {}
String *val_str(String *);
void fix_length_and_dec() { maybe_null=1; max_length = 13; }
const char *func_name() const { return "ecrypt"; }
const char *func_name() const { return "encrypt"; }
};
#include "sql_crypt.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment