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
Consider the following test cases, the second query executes slowly. (I'm using MySQL client)
mysql>SELECT ROUND(3, -9999999);
+--------------------+
| ROUND(3, -9999999) |
+--------------------+
| 0 |
+--------------------+1 row inset (0.00 sec)
mysql>SELECT ROUND(3%5, -9999999); -- increasing the second argument would lead to server hang+----------------------+
| ROUND(3%5, -9999999) |
+----------------------+
| 0 |
+----------------------+1 row inset (3.19 sec)
I understand that the negative value for the second argument of ROUND is somewhat illegal. However, when it goes to -1e8, the query needs more than 1 minute to execute. MySQL takes less than 0.01 second.
I originally find this in the source code version 804f1c1. It could also be reproduced in 1.26.1.
Activity
timsehn commentedon Nov 30, 2023
This is very interesting. Keep the bugs coming. They are awesome.