summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_crypt.test
blob: e612405c5e9f5e2df12a5978745f4c0c1d6dc76b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
-- source include/have_crypt.inc

select length(encrypt('foo', 'ff')) <> 0;
--replace_result $1$aa$4OSUA5cjdx0RUQ08opV27/ aaqPiZY5xR5l.
select old_password('test'), password('test');
select length(encrypt('test')), encrypt('test','aa');

drop table if exists t1;
create table t1 (name varchar(50), pw varchar(16));
insert into t1 values ('tom', password('my_pass'));
set @pass='my_pass';
select name from t1 where name='tom' and pw=password(@pass);
select name from t1 where name='tom' and pw=password(@undefined);
drop table t1;