Bug #65295 | COT() Function returns wrong result | ||
---|---|---|---|
Submitted: | 12 May 2012 17:43 | Modified: | 13 May 2012 8:00 |
Reporter: | Kimo Maru | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: Data Types | Severity: | S2 (Serious) |
Version: | 5.5 | OS: | Linux (Wrong results returned) |
Assigned to: | CPU Architecture: | Any |
[12 May 2012 17:43]
Kimo Maru
[13 May 2012 7:59]
MySQL Verification Team
Marking as a duplicate. I already filed this bug months ago, internally. Bug 12878196 - COT (0) GIVES ERROR AND 1/TAN(0) GIVES NULL + WARNING ? The devs wrote this: It is not consistent with the SQL standard. Generally, the strategy used in the standard is to raise an exception when there is an arithmetic error. Besides, it means that users must be prepared for two error tests when processing queries: 1) Check for exception, and 2) check for NULL value and/or a warning. Having just the exception test is much simpler.
[5 Aug 2013 3:36]
Roberto Spadim
why not continue with the documented standard? cot(0) = null maybe add a warning, but don't create a 'error' or, change the documents see this bug: http://bugs.mysql.com/bug.php?id=69916 i didn't read the cot function code, but maybe a sql_mode could be used too... like the invalid_dates mode