summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_crypt.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/func_crypt.test')
-rw-r--r--mysql-test/t/func_crypt.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/t/func_crypt.test b/mysql-test/t/func_crypt.test
index c1c7090cab3..3cf1e15e3ef 100644
--- a/mysql-test/t/func_crypt.test
+++ b/mysql-test/t/func_crypt.test
@@ -1,9 +1,21 @@
-- source include/have_crypt.inc
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
select length(encrypt('foo', 'ff')) <> 0;
--replace_result $1$aa$4OSUA5cjdx0RUQ08opV27/ aaqPiZY5xR5l.
+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;
+
# Test new and old password handling functions
+
select password('abc');
select password('');
select old_password('abc');