mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / mysql-test / r / func_encrypt.result
blob8fbf36b45b94505197393f84efde2f2f9941dce8
1 drop table if exists t1;
2 create table t1 (x blob);
3 insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','The quick red fox jumped over the lazy brown dog'));
4 insert into t1 values (des_encrypt('a','The quick red fox jumped over the lazy brown dog'));
5 insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','a'));
6 insert into t1 values (des_encrypt('ab','The quick red fox jumped over the lazy brown dog'));
7 insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','ab'));
8 insert into t1 values (des_encrypt('abc','The quick red fox jumped over the lazy brown dog'));
9 insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abc'));
10 insert into t1 values (des_encrypt('abcd','The quick red fox jumped over the lazy brown dog'));
11 insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcd'));
12 insert into t1 values (des_encrypt('abcde','The quick red fox jumped over the lazy brown dog'));
13 insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcde'));
14 insert into t1 values (des_encrypt('abcdef','The quick red fox jumped over the lazy brown dog'));
15 insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcdef'));
16 insert into t1 values (des_encrypt('abcdefg','The quick red fox jumped over the lazy brown dog'));
17 insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcdefg'));
18 insert into t1 values (des_encrypt('abcdefgh','The quick red fox jumped over the lazy brown dog'));
19 insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcdefgh'));
20 insert into t1 values (des_encrypt('abcdefghi','The quick red fox jumped over the lazy brown dog'));
21 insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcdefghi'));
22 insert into t1 values (des_encrypt('abcdefghij','The quick red fox jumped over the lazy brown dog'));
23 insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcdefghij'));
24 insert into t1 values (des_encrypt('abcdefghijk','The quick red fox jumped over the lazy brown dog'));
25 insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcdefghijk'));
26 insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','sabakala'));
27 insert into t1 values (des_encrypt('quick red fox jumped over the lazy brown dog','sabakala'));
28 insert into t1 values (des_encrypt('red fox jumped over the lazy brown dog','sabakala'));
29 insert into t1 values (des_encrypt('fox jumped over the lazy brown dog','sabakala'));
30 insert into t1 values (des_encrypt('jumped over the lazy brown dog','sabakala'));
31 insert into t1 values (des_encrypt('over the lazy brown dog','sabakala'));
32 insert into t1 values (des_encrypt('the lazy brown dog','sabakala'));
33 insert into t1 values (des_encrypt('lazy brown dog','sabakala'));
34 insert into t1 values (des_encrypt('brown dog','sabakala'));
35 insert into t1 values (des_encrypt('dog','sabakala'));
36 insert into t1 values (des_encrypt('dog!','sabakala'));
37 insert into t1 values (des_encrypt('dog!!','sabakala'));
38 insert into t1 values (des_encrypt('dog!!!','sabakala'));
39 insert into t1 values (des_encrypt('dog!!!!','sabakala'));
40 insert into t1 values (des_encrypt('dog!!!!!','sabakala'));
41 insert into t1 values (des_encrypt('jumped over the lazy brown dog','sabakala'));
42 insert into t1 values (des_encrypt('jumped over the lazy brown dog','sabakala'));
43 select hex(x), hex(des_decrypt(x,'sabakala')) from t1;
44 hex(x)  hex(des_decrypt(x,'sabakala'))
45 FFA185A4656D113445E31D7A5B31BB57671A4CA9E21E63FE5D9C801E0CC7AA6190C13E269C2AE8D8060D3FB3FEA94FEC7FB006B9DCAC3E3E41      NULL
46 FFC620C3B84E926A54      NULL
47 FFA4F77D4220A16C980AF7CB576F8DC0A864F357825C16F329F24F66EBA775765B7C1538B90970740F853B556AEBD35AC31B962EA9B12B5AD4      NULL
48 FFACFF5921BB876A90      NULL
49 FFA6F18760E7CC5A4C325244B8486F692AAA11D229AF9ED4E4C9D56D7C0278C0DDA58F73E15E2B5F6C1DDD19B22B8071C454C930585449AAEB      NULL
50 FF3736DFEDC4B765F4      NULL
51 FF598681EA5F03CD6D6AEA2B118DF4885DD78BECDFB012BBB05386E436DC403D3CB9DE3BE8D5D3BB7FD90A1F9F9A3E055BB3B4FD3F6A869473      NULL
52 FF15B8B5952D630CAE      NULL
53 FF11EE3A400685226B76D5EC567681FA90247CE3C9DBE43341311C22F74562B1199957D80E300737791F6345BBC61AE03F28F52E5A6DCC78B2      NULL
54 FF0A832AE10DC85483      NULL
55 FF6F5C0BF4C5F899B4E7C091D9B1F1E92A7623B651B150CA3E7F420B4DD316D2C1BF76FCF9F9A046C000A9E21C106591E8C1930201B1750269      NULL
56 FFA08D5FB849A9FC90      NULL
57 FFF7331312FE153A39B1EC0D65BC1D3A0B6FCD49DA8C95D6161F53B11D297BAE142BCA6B9492DAE9A02AF455F16CA2C1CF4E1AD17297E947E2      NULL
58 FFDEE60A938478E059      NULL
59 FF95A729E73D5D87416A53055029E8CAA95B4F7B49F3D2D821A95D1FCE70F4B7A3226077176723F3DCC0A44D3B2EE9EFBC4D31AA87C948916C      NULL
60 FF1C78557F542A1FDC91943761B2EED14F      NULL
61 FF1E35B0775EEE512544A75BDAF58EA1655F5C899D3C5191A47263E2D11C3E688F662AB79F66D3B1DF9C75BD869EB8E04FDAE85719CB573A43      NULL
62 FF1C78557F542A1FDCDC4182B5314185E5      NULL
63 FF783123DCB36F98A51C39A560C92E129F1DDEEAB170825406A61260FBFBBFB0F2E48DB3282588A975C9C71E0EACA71A2B642A8C9C2E921A9F      NULL
64 FF1C78557F542A1FDCAC4B1B6B47206306      NULL
65 FF6D9B450837017D06CA1F1C9A0E700D03DEF06A4F954527A961CA805F70320E9F3F0007636B80768A253A5F7ADABC18B78F1A2FA560CC0B21      NULL
66 FF1C78557F542A1FDCE9038BD99DD43F2E      NULL
67 FF23FD03BA7548DD0957EBA7A8FBF7A18589762F3913E9A935BDA72F6F28202DC64572E0D633A54EA55BFD2C749E408C8632CCE36A7AE00619      NULL
68 FFD8DD3C4ABCB02FCDFE1383ECC0F61E7D02CD3BA72BBAEA26384D14835796501B3DC9A2F7EC2FC1633BDA6D56464536FE12010049C53A1991      54686520717569636B2072656420666F78206A756D706564206F76657220746865206C617A792062726F776E20646F67
69 FFACC5C5479575CBCA518B05778139B1BFC10F07299C98D04F580BC2F816828722D65A89C1831BD29DA626D319813BD374      717569636B2072656420666F78206A756D706564206F76657220746865206C617A792062726F776E20646F67
70 FF128D5517241DEEC631ABD2A47FA66E57930001417F18204328B0B2CB13F7AD2F50B8336EFAE7DE21      72656420666F78206A756D706564206F76657220746865206C617A792062726F776E20646F67
71 FF7CF971283B4DC2D050B3DB22684737B74B5B1CF12CF2FAC5A5995A298505F56D82BBFB9FC3E70059      666F78206A756D706564206F76657220746865206C617A792062726F776E20646F67
72 FF8333F3DD21E4488F967E03DD12394813A49F72848BB49473D3CB1C8A1AACF220      6A756D706564206F76657220746865206C617A792062726F776E20646F67
73 FFE8CB7FD80E6262C5FEB042A2DCC73B699CEEDCA6DC4458A0      6F76657220746865206C617A792062726F776E20646F67
74 FFA29334D7CDB1B403DF3EB992067DD524C7D568E8D98EBFE5      746865206C617A792062726F776E20646F67
75 FF4F0C5858FE2358D400E38831D5577C85      6C617A792062726F776E20646F67
76 FFB370CD6BAFD1CB95974D21DCCA2DD9D7      62726F776E20646F67
77 FF8F7777B28C7A459A      646F67
78 FF75213A4D7D01D715      646F6721
79 FF2DCAF574B173FB4D      646F672121
80 FFFA775787BE776B15      646F67212121
81 FF3FC2E42D7C840905      646F6721212121
82 FF9723312D26D9E6DA01D01A784A64DB9D      646F672121212121
83 FF8333F3DD21E4488F967E03DD12394813A49F72848BB49473D3CB1C8A1AACF220      6A756D706564206F76657220746865206C617A792062726F776E20646F67
84 FF8333F3DD21E4488F967E03DD12394813A49F72848BB49473D3CB1C8A1AACF220      6A756D706564206F76657220746865206C617A792062726F776E20646F67
85 select des_decrypt(x,'sabakala') as s from t1 having s like '%dog%';
87 The quick red fox jumped over the lazy brown dog
88 quick red fox jumped over the lazy brown dog
89 red fox jumped over the lazy brown dog
90 fox jumped over the lazy brown dog
91 jumped over the lazy brown dog
92 over the lazy brown dog
93 the lazy brown dog
94 lazy brown dog
95 brown dog
96 dog
97 dog!
98 dog!!
99 dog!!!
100 dog!!!!
101 dog!!!!!
102 jumped over the lazy brown dog
103 jumped over the lazy brown dog
104 drop table t1;
105 select hex(des_encrypt("hello")),des_decrypt(des_encrypt("hello"));
106 hex(des_encrypt("hello"))       des_decrypt(des_encrypt("hello"))
107 85D6DC8859F9759BBB      hello
108 select des_decrypt(des_encrypt("hello",4));
109 des_decrypt(des_encrypt("hello",4))
110 hello
111 select des_decrypt(des_encrypt("hello",'test'),'test');
112 des_decrypt(des_encrypt("hello",'test'),'test')
113 hello
114 select hex(des_encrypt("hello")),hex(des_encrypt("hello",5)),hex(des_encrypt("hello",'default_password'));
115 hex(des_encrypt("hello"))       hex(des_encrypt("hello",5))     hex(des_encrypt("hello",'default_password'))
116 85D6DC8859F9759BBB      85D6DC8859F9759BBB      FFD6DC8859F9759BBB
117 select des_decrypt(des_encrypt("hello"),'default_password');
118 des_decrypt(des_encrypt("hello"),'default_password')
119 hello
120 select des_decrypt(des_encrypt("hello",4),'password4');
121 des_decrypt(des_encrypt("hello",4),'password4')
122 hello
123 select des_encrypt("hello",10);
124 des_encrypt("hello",10)
125 NULL
126 Warnings:
127 Error   1108    Incorrect parameters to procedure 'des_encrypt'
128 select des_encrypt(NULL);
129 des_encrypt(NULL)
130 NULL
131 select des_encrypt(NULL, 10);
132 des_encrypt(NULL, 10)
133 NULL
134 select des_encrypt(NULL, NULL);
135 des_encrypt(NULL, NULL)
136 NULL
137 select des_encrypt(10, NULL);
138 des_encrypt(10, NULL)
139 NULL
140 Warnings:
141 Error   1108    Incorrect parameters to procedure 'des_encrypt'
142 select des_encrypt("hello", NULL);
143 des_encrypt("hello", NULL)
144 NULL
145 Warnings:
146 Error   1108    Incorrect parameters to procedure 'des_encrypt'
147 select des_decrypt("hello",10);
148 des_decrypt("hello",10)
149 hello
150 select des_decrypt(NULL);
151 des_decrypt(NULL)
152 NULL
153 select des_decrypt(NULL, 10);
154 des_decrypt(NULL, 10)
155 NULL
156 select des_decrypt(NULL, NULL);
157 des_decrypt(NULL, NULL)
158 NULL
159 select des_decrypt(10, NULL);
160 des_decrypt(10, NULL)
162 select des_decrypt("hello", NULL);
163 des_decrypt("hello", NULL)
164 hello
165 SET @a=des_decrypt(des_encrypt("hello"));
166 flush des_key_file;
167 select @a = des_decrypt(des_encrypt("hello"));
168 @a = des_decrypt(des_encrypt("hello"))
170 select hex("hello");
171 hex("hello")
172 68656C6C6F
173 select hex(des_decrypt(des_encrypt("hello",4),'password2'));
174 hex(des_decrypt(des_encrypt("hello",4),'password2'))
175 NULL
176 select hex(des_decrypt(des_encrypt("hello","hidden")));
177 hex(des_decrypt(des_encrypt("hello","hidden")))
178 NULL
179 Warnings:
180 Error   1108    Incorrect parameters to procedure 'des_decrypt'
181 explain extended select des_decrypt(des_encrypt("hello",4),'password2'), des_decrypt(des_encrypt("hello","hidden"));
182 id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
183 1       SIMPLE  NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    No tables used
184 Warnings:
185 Note    1003    select des_decrypt(des_encrypt('hello',4),'password2') AS `des_decrypt(des_encrypt("hello",4),'password2')`,des_decrypt(des_encrypt('hello','hidden')) AS `des_decrypt(des_encrypt("hello","hidden"))`
186 drop table if exists t1;
187 create table t1 (f1 smallint(6) default null, f2  mediumtext character set utf8)
188 engine=myisam default charset=latin1;
189 insert into t1 values (null,'contraction\'s');
190 insert into t1 values (-15818,'requirement\'s');
191 select encrypt(f1,f2) as a from t1,(select encrypt(f1,f2) as b from t1) a;
192 drop table t1;