mirror of
https://github.com/MariaDB/server.git
synced 2025-05-29 21:42:28 +03:00
After merge fixes. Now code compiles, but there is still some valgrind warnings that needs to be fixed myisam/mi_rnext_same.c: handle case where rtree_find_next() returns an error (assume this means that there was no more keys) myisam/rt_index.c: Code cleanup mysql-test/r/func_crypt.result: Update results mysql-test/r/func_group.result: Update results mysql-test/r/null_key.result: Update results mysql-test/r/order_by.result: Update results mysql-test/r/query_cache.result: Update results mysql-test/r/range.result: Update results mysql-test/r/rpl_trunc_binlog.result: Update results mysql-test/t/fulltext.test: Fix error numbers mysql-test/t/func_crypt.test: Fixed test for 4.1 mysql-test/t/range.test: Moved tests to be in sync with 4.0 mysys/test_charset.c: Removed acccess to non existing functions sql-common/client.c: Merge fix sql/item_strfunc.cc: Simple code cleanup Don't call ->c_ptr() when you don't need a 0 terminated string (Causes warnings from valgrind) sql/log_event.cc: After merge fixes sql/protocol.cc: Change default catalog name to 'def' sql/spatial.cc: Code cleanup sql/sql_class.cc: After merge fixes sql/time.cc: Ensure that time object is cleared on error sql/unireg.cc: Removed warning reported by valgrind
49 lines
1.3 KiB
Plaintext
49 lines
1.3 KiB
Plaintext
-- 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(64));
|
|
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');
|
|
select old_password('');
|
|
select password('gabbagabbahey');
|
|
select old_password('idkfa');
|
|
select length(password('1'));
|
|
select length(encrypt('test'));
|
|
select encrypt('test','aa');
|
|
select old_password(NULL);
|
|
select password(NULL);
|
|
set global old_passwords=on;
|
|
select password('');
|
|
select old_password('');
|
|
select password('idkfa');
|
|
select old_password('idkfa');
|
|
set old_passwords=on;
|
|
select password('idkfa');
|
|
select old_password('idkfa');
|
|
set global old_passwords=off;
|
|
select password('idkfa');
|
|
select old_password('idkfa');
|
|
|
|
# this test shows that new scrambles honor spaces in passwords:
|
|
set old_passwords=off;
|
|
select password('idkfa ');
|
|
select password('idkfa');
|
|
select password(' idkfa');
|
|
select old_password('idkfa');
|
|
select old_password(' i d k f a ');
|