Bug #36268 | Documentation : LOG() : "Arbitrary base" | ||
---|---|---|---|
Submitted: | 22 Apr 2008 22:31 | Modified: | 25 Apr 2008 15:24 |
Reporter: | Carsten Pedersen | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Documentation | Severity: | S3 (Non-critical) |
Version: | OS: | Any | |
Assigned to: | Jon Stephens | CPU Architecture: | Any |
[22 Apr 2008 22:31]
Carsten Pedersen
[22 Apr 2008 23:06]
Jon Stephens
The logarithm of X to the base B is obtained as log(X) / log(B). log(0) is defined as -[infinity], and log(X) where X < 0 is undefined (NaN). Division by either of these values is not permitted. Thus, attempting to use a base of 0 or less should return anything - it should instead fail with an error. Thus, this is a bug in the server.
[22 Apr 2008 23:07]
Jon Stephens
Previous comment should read "should NOT return anything".
[23 Apr 2008 6:56]
Carsten Pedersen
I don't see why this would be a server bug. NULL is what I expect for illegal values, such as division by zero or sqrt(-1). Defining LOG() as only taking positive values is fine, but it should of course be documented.
[25 Apr 2008 10:52]
Sveta Smirnova
Thank you for the report. I don't see real bug here. But it is no harm to reflect this in documentation. So verified as documentation bug. Nothing inconsistent with server as it handles division by zero (for example) in same way.
[25 Apr 2008 15:24]
Jon Stephens
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.