Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No warning for invalid usage of function LN() #17992

Closed
zhangysh1995 opened this issue Jun 12, 2020 · 1 comment · Fixed by #18668
Closed

No warning for invalid usage of function LN() #17992

zhangysh1995 opened this issue Jun 12, 2020 · 1 comment · Fixed by #18668
Labels
component/expression type/bug The issue is confirmed as a bug.

Comments

@zhangysh1995
Copy link

Bug Report

LN(0) should result in a warning or an error

1. Minimal reproduce step (Required)

select LN(0);

2. What did you expect to see? (Required)

A warning is raised or the error is returned.

-- MySQL 5.7
mysql> select LN(0);
+-------+
| LN(0) |
+-------+
|  NULL |
+-------+
1 row in set, 1 warning (0.00 sec)

mysql> show warnings;
+---------+------+--------------------------------+
| Level   | Code | Message                        |
+---------+------+--------------------------------+
| Warning | 3020 | Invalid argument for logarithm |
+---------+------+--------------------------------+
1 row in set (0.00 sec)

3. What did you see instead (Required)

mysql> select LN(0);
+-------+
| LN(0) |
+-------+
|  NULL |
+-------+
1 row in set (0.00 sec)

4. Affected version (Required)

commit 4e74d40392e9b81f2a90cbc2f7777fd35f87b2e7 (HEAD -> master, origin/master, origin/HEAD)
Author: Arenatlx <ailinsilence4@gmail.com>
Date:   Fri Jun 12 16:58:00 2020 +0800

5. Root Cause Analysis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants