Commit 3c5286c3 authored by bell@sanja.is.com.ua's avatar bell@sanja.is.com.ua

fixed encrypt() print (BUG#7024)

parent a771b571
......@@ -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