~stewart/drizzle/embedded-innodb-create-select-transaction-arrgh

« back to all changes in this revision

Viewing changes to mysql-test/t/func_crypt.test

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-- source include/have_crypt.inc
 
2
 
 
3
--disable_warnings
 
4
drop table if exists t1;
 
5
--enable_warnings
 
6
 
 
7
select length(encrypt('foo', 'ff')) <> 0;
 
8
--replace_result $1$aa$4OSUA5cjdx0RUQ08opV27/ aaqPiZY5xR5l.
 
9
 
 
10
create table t1 (name varchar(50), pw varchar(64));
 
11
insert into t1 values ('tom', password('my_pass'));
 
12
set @pass='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);
 
15
drop table t1;
 
16
 
 
17
# Test new and old password handling functions 
 
18
 
 
19
select password('abc');
 
20
select password('');
 
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;
 
31
select password('');
 
32
select old_password('');
 
33
select password('idkfa');
 
34
select old_password('idkfa');
 
35
set old_passwords=on;
 
36
select password('idkfa');
 
37
select old_password('idkfa');
 
38
set global old_passwords=off;
 
39
select password('idkfa');
 
40
select old_password('idkfa');
 
41
 
 
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 ');
 
49
 
 
50
explain extended select password('idkfa '), old_password('idkfa');
 
51
 
 
52
#
 
53
# Bug #13619: Crash on FreeBSD with salt like '_.'
 
54
#
 
55
--replace_column 1 #
 
56
select encrypt('1234','_.');
 
57
 
 
58
# End of 4.1 tests