1
1
select des_encrypt('hello');
2
2
des_encrypt('hello')
3
3
��2nV��}
4
+ Warnings:
5
+ Note 1287 'des_encrypt' is deprecated and will be removed in a future release
4
6
#
5
7
# Bug #11643: des_encrypt() causes server to die
6
8
#
7
9
CREATE TABLE t1 (des VARBINARY(200) NOT NULL DEFAULT '') ENGINE=MyISAM;
8
10
INSERT INTO t1 VALUES ('1234'), ('12345'), ('123456'), ('1234567');
9
11
UPDATE t1 SET des=DES_ENCRYPT('1234');
12
+ Warnings:
13
+ Note 1287 'des_encrypt' is deprecated and will be removed in a future release
10
14
SELECT LENGTH(des) FROM t1;
11
15
LENGTH(des)
12
16
9
@@ -19,20 +23,36 @@ DES_DECRYPT(des)
19
23
1234
20
24
1234
21
25
1234
26
+ Warnings:
27
+ Note 1287 'des_decrypt' is deprecated and will be removed in a future release
22
28
SELECT
23
29
LENGTH(DES_ENCRYPT('1234')),
24
30
LENGTH(DES_ENCRYPT('12345')),
25
31
LENGTH(DES_ENCRYPT('123456')),
26
32
LENGTH(DES_ENCRYPT('1234567'));
27
33
LENGTH(DES_ENCRYPT('1234')) LENGTH(DES_ENCRYPT('12345')) LENGTH(DES_ENCRYPT('123456')) LENGTH(DES_ENCRYPT('1234567'))
28
34
9 9 9 9
35
+ Warnings:
36
+ Note 1287 'des_encrypt' is deprecated and will be removed in a future release
37
+ Note 1287 'des_encrypt' is deprecated and will be removed in a future release
38
+ Note 1287 'des_encrypt' is deprecated and will be removed in a future release
39
+ Note 1287 'des_encrypt' is deprecated and will be removed in a future release
29
40
SELECT
30
41
DES_DECRYPT(DES_ENCRYPT('1234')),
31
42
DES_DECRYPT(DES_ENCRYPT('12345')),
32
43
DES_DECRYPT(DES_ENCRYPT('123456')),
33
44
DES_DECRYPT(DES_ENCRYPT('1234567'));
34
45
DES_DECRYPT(DES_ENCRYPT('1234')) DES_DECRYPT(DES_ENCRYPT('12345')) DES_DECRYPT(DES_ENCRYPT('123456')) DES_DECRYPT(DES_ENCRYPT('1234567'))
35
46
1234 12345 123456 1234567
47
+ Warnings:
48
+ Note 1287 'des_encrypt' is deprecated and will be removed in a future release
49
+ Note 1287 'des_decrypt' is deprecated and will be removed in a future release
50
+ Note 1287 'des_encrypt' is deprecated and will be removed in a future release
51
+ Note 1287 'des_decrypt' is deprecated and will be removed in a future release
52
+ Note 1287 'des_encrypt' is deprecated and will be removed in a future release
53
+ Note 1287 'des_decrypt' is deprecated and will be removed in a future release
54
+ Note 1287 'des_encrypt' is deprecated and will be removed in a future release
55
+ Note 1287 'des_decrypt' is deprecated and will be removed in a future release
36
56
DROP TABLE t1;
37
57
End of 5.0 tests
38
58
#
@@ -64,12 +84,29 @@ i NULL
64
84
j 000000000009
65
85
j NULL
66
86
NULL NULL
87
+ Warnings:
88
+ Note 1287 'des_decrypt' is deprecated and will be removed in a future release
67
89
DROP TABLE t1;
68
90
CREATE TABLE t1 (a INT);
69
91
INSERT t1 VALUES (1),(2);
70
92
SELECT CHAR_LENGTH(a), DES_DECRYPT(a) FROM (SELECT _utf8 0xC2A2 AS a FROM t1) AS t2;
71
93
CHAR_LENGTH(a) DES_DECRYPT(a)
72
94
1 �
73
95
1 �
96
+ Warnings:
97
+ Note 1287 'des_decrypt' is deprecated and will be removed in a future release
74
98
DROP TABLE t1;
75
- End of 10.5 tests
99
+ #
100
+ # End of 10.5 tests
101
+ #
102
+ #
103
+ # MDEV-27104 deprecate DES_ENCRYPT/DECRYPT functions
104
+ #
105
+ # just show how to disable deprecation note
106
+ set sql_notes=0;
107
+ select hex(des_encrypt('a'));
108
+ hex(des_encrypt('a'))
109
+ 80E4DE4136BA6CD7F3
110
+ #
111
+ # End of 10.10 tests
112
+ #
0 commit comments