2007-03-05 10:03:42 +01:00
|
|
|
-- source include/have_ssl.inc
|
2005-07-07 20:49:44 +02:00
|
|
|
|
|
|
|
# This test can't be in func_encrypt.test, because it requires
|
|
|
|
# --des-key-file to not be set.
|
|
|
|
|
|
|
|
#
|
|
|
|
# Bug #11643: des_encrypt() causes server to die
|
|
|
|
#
|
|
|
|
select des_encrypt('hello');
|
2005-07-28 02:22:47 +02:00
|
|
|
|
|
|
|
# End of 4.1 tests
|
2009-04-17 17:52:57 +02:00
|
|
|
|
|
|
|
--echo #
|
|
|
|
--echo # Bug #11643: des_encrypt() causes server to die
|
|
|
|
--echo #
|
|
|
|
|
|
|
|
CREATE TABLE t1 (des VARBINARY(200) NOT NULL DEFAULT '') ENGINE=MyISAM;
|
|
|
|
|
|
|
|
INSERT INTO t1 VALUES ('1234'), ('12345'), ('123456'), ('1234567');
|
|
|
|
|
|
|
|
UPDATE t1 SET des=DES_ENCRYPT('1234');
|
|
|
|
|
|
|
|
SELECT LENGTH(des) FROM t1;
|
|
|
|
SELECT DES_DECRYPT(des) FROM t1;
|
|
|
|
|
|
|
|
SELECT
|
|
|
|
LENGTH(DES_ENCRYPT('1234')),
|
|
|
|
LENGTH(DES_ENCRYPT('12345')),
|
|
|
|
LENGTH(DES_ENCRYPT('123456')),
|
|
|
|
LENGTH(DES_ENCRYPT('1234567'));
|
|
|
|
SELECT
|
|
|
|
DES_DECRYPT(DES_ENCRYPT('1234')),
|
|
|
|
DES_DECRYPT(DES_ENCRYPT('12345')),
|
|
|
|
DES_DECRYPT(DES_ENCRYPT('123456')),
|
|
|
|
DES_DECRYPT(DES_ENCRYPT('1234567'));
|
|
|
|
|
|
|
|
DROP TABLE t1;
|
|
|
|
|
|
|
|
--Echo End of 5.0 tests
|