mirror of
https://github.com/MariaDB/server.git
synced 2025-01-28 01:34:17 +01:00
3db50925c7
Add optional second parameter to password() function. It can be used to force password() to return fixed values. mysql-test/r/func_crypt.result: New test results mysql-test/t/func_crypt.test: new tests sql/item_strfunc.cc: Add optional second argument to password() function sql/item_strfunc.h: New method sql/sql_yacc.yy: Handling of password with 2 arguments
15 lines
898 B
Text
15 lines
898 B
Text
select length(encrypt('foo', 'ff')) <> 0;
|
|
length(encrypt('foo', 'ff')) <> 0
|
|
1
|
|
select password("a",""), password("a",NULL), password("","a"), password(NULL,"a");
|
|
password("a","") password("a",NULL) password("","a") password(NULL,"a")
|
|
*2517f7235d68d4ba2e5019c93420523101157a792c01 NULL NULL
|
|
select password("aaaaaaaaaaaaaaaa","a"), password("a","aaaaaaaaaaaaaaaa");
|
|
password("aaaaaaaaaaaaaaaa","a") password("a","aaaaaaaaaaaaaaaa")
|
|
*2cd3b9a44e9a9994789a30f935c92f45a96c5472f381 *37c7c5c794ff144819f2531bf03c57772cd84e40db09
|
|
select old_password('test'), length(password("1")), length(encrypt('test')), encrypt('test','aa');
|
|
old_password('test') length(password("1")) length(encrypt('test')) encrypt('test','aa')
|
|
378b243e220ca493 45 13 aaqPiZY5xR5l.
|
|
select old_password(""), old_password(NULL), password(""), password(NULL);
|
|
old_password("") old_password(NULL) password("") password(NULL)
|
|
NULL NULL
|