summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_crypt.test
diff options
context:
space:
mode:
authorpeter@mysql.com <>2002-12-27 19:47:23 +0300
committerpeter@mysql.com <>2002-12-27 19:47:23 +0300
commit6bc97ffaeea90ef3d82604454fb3ea38ee5605e4 (patch)
tree6485cac5dd20c207af3147a5cc6823cdf90b98f6 /mysql-test/t/func_crypt.test
parent6e35c1a95e3f818f80453d441397c0f079ada189 (diff)
downloadmariadb-git-6bc97ffaeea90ef3d82604454fb3ea38ee5605e4.tar.gz
SCRUM
Add optional second parameter to password() function. It can be used to force password() to return fixed values.
Diffstat (limited to 'mysql-test/t/func_crypt.test')
-rw-r--r--mysql-test/t/func_crypt.test7
1 files changed, 6 insertions, 1 deletions
diff --git a/mysql-test/t/func_crypt.test b/mysql-test/t/func_crypt.test
index 812bdade39f..af0ef661d06 100644
--- a/mysql-test/t/func_crypt.test
+++ b/mysql-test/t/func_crypt.test
@@ -1,3 +1,8 @@
select length(encrypt('foo', 'ff')) <> 0;
--replace_result $1$aa$4OSUA5cjdx0RUQ08opV27/ aaqPiZY5xR5l.
-select old_password('test'),length(password("1")),length(encrypt('test')),encrypt('test','aa');
+
+# Test new and old password handling functions
+select password("a",""), password("a",NULL), password("","a"), password(NULL,"a");
+select password("aaaaaaaaaaaaaaaa","a"), password("a","aaaaaaaaaaaaaaaa");
+select old_password('test'), length(password("1")), length(encrypt('test')), encrypt('test','aa');
+select old_password(""), old_password(NULL), password(""), password(NULL);