1
-- source include/have_crypt.inc
4
drop table if exists t1;
7
select length(encrypt('foo', 'ff')) <> 0;
8
--replace_result $1$aa$4OSUA5cjdx0RUQ08opV27/ aaqPiZY5xR5l.
10
create table t1 (name varchar(50), pw varchar(64));
11
insert into t1 values ('tom', password('my_pass'));
13
select name from t1 where name='tom' and pw=password(@pass);
14
select name from t1 where name='tom' and pw=password(@undefined);
17
# Test new and old password handling functions
19
select password('abc');
21
select old_password('abc');
22
select old_password('');
23
select password('gabbagabbahey');
24
select old_password('idkfa');
25
select length(password('1'));
26
select length(encrypt('test'));
27
select encrypt('test','aa');
28
select old_password(NULL);
29
select password(NULL);
30
set global old_passwords=on;
32
select old_password('');
33
select password('idkfa');
34
select old_password('idkfa');
36
select password('idkfa');
37
select old_password('idkfa');
38
set global old_passwords=off;
39
select password('idkfa');
40
select old_password('idkfa');
42
# this test shows that new scrambles honor spaces in passwords:
43
set old_passwords=off;
44
select password('idkfa ');
45
select password('idkfa');
46
select password(' idkfa');
47
select old_password('idkfa');
48
select old_password(' i d k f a ');
50
explain extended select password('idkfa '), old_password('idkfa');
53
# Bug #13619: Crash on FreeBSD with salt like '_.'
56
select encrypt('1234','_.');