You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The DES_ENCRYPT() and DES_DECRYPT() functions are deprecated as of MySQL 5.7.6, will be removed in a future MySQL release, and should no longer be used. Consider using AES_ENCRYPT() and AES_DECRYPT() instead.
When I run SELECT BENCHMARK(1000000,ENCODE('hello',RAND())); in command line, it generates 65535 warnings. I think the warnings slows down the execution to 14 seconds. If I change to use AES_DECRYPT, the command returns in 2 seconds.
mysql> status;
--------------
mysql Ver 14.14 Distrib 5.7.25, for Linux (x86_64) using EditLine wrapper
Connection id: 4
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.7.25-0ubuntu0.16.04.2 (Ubuntu)
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /var/run/mysqld/mysqld.sock
Uptime: 25 min 2 sec
Threads: 1 Questions: 11 Slow queries: 0 Opens: 107 Flush tables: 1 Open tables: 26 Queries per second avg: 0.007
--------------
mysql> SELECT BENCHMARK(1000000,ENCODE('hello',RAND()));
+-------------------------------------------+
| BENCHMARK(1000000,ENCODE('hello',RAND())) |
+-------------------------------------------+
| 0 |
+-------------------------------------------+
1 row in set, 65535 warnings (14.95 sec)
mysql> SELECT BENCHMARK(1000000,AES_ENCRYPT('hello',RAND()));
+------------------------------------------------+
| BENCHMARK(1000000,AES_ENCRYPT('hello',RAND())) |
+------------------------------------------------+
| 0 |
+------------------------------------------------+
1 row in set (2.78 sec)
I think you may want to use AES_ENCRYPT.
The text was updated successfully, but these errors were encountered:
https://dev.mysql.com/doc/refman/5.7/en/encryption-functions.html#function_decode
When I run
SELECT BENCHMARK(1000000,ENCODE('hello',RAND()));
in command line, it generates 65535 warnings. I think the warnings slows down the execution to 14 seconds. If I change to use AES_DECRYPT, the command returns in 2 seconds.I think you may want to use AES_ENCRYPT.
The text was updated successfully, but these errors were encountered: