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

SHOW WARNINGS fails to fetch the error from the POW function #33292

Open
sayJason opened this issue Mar 21, 2022 · 1 comment
Open

SHOW WARNINGS fails to fetch the error from the POW function #33292

sayJason opened this issue Mar 21, 2022 · 1 comment
Labels
severity/minor sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@sayJason
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

DROP TABLE IF EXISTS t0;
CREATE TABLE t0(c0 INT);
INSERT INTO t0 VALUES (1);
SELECT c0 FROM t0 WHERE POW(0, -1);
SHOW WARNINGS;

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

SHOW WARNINGS should return the error message as following.

+-------+------+-----------------------------------------------+
| Level | Code | Message                                       |
+-------+------+-----------------------------------------------+
| Error | 1690 | DOUBLE value is out of range in 'pow(0,-(1))' |
+-------+------+-----------------------------------------------+

3. What did you see instead (Required)

SHOW WARNINGS returns an empty set

4. What is your TiDB version? (Required)

+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()

                                   |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v5.4.0
Edition: Community
Git Commit Hash: 55f3b24c1c9f506bd652ef1d162283541e428872
Git Branch: heads/refs/tags/v5.4.0
UTC Build Time: 2022-01-25 08:39:26
GoVersion: go1.16.4
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
@sayJason sayJason added the type/bug The issue is confirmed as a bug. label Mar 21, 2022
@sayJason
Copy link
Author

I've noticed that there are two similar issues #33232 and #31719, where the SHOW WARNINGS statement fails to return the error message when the error happened in a function.
Does the same reason cause these problems?

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

No branches or pull requests

2 participants