[Maria-developers] COT() function
Hi SELECT COT(0) returns: ERROR 1690 (22003): DOUBLE value is out of range in 'cot(0)' in both MariaDB 10 and 5.5, but in MySQL 5.1 it returns NULL. I can't find a changelog reference to this, but I see it's still documented as returning NULL in MySQL 5.5 (I don't have this to test on). Is this a MariaDB-specific change? When did this change in behaviour happen? thanks, ian
I just checked in (Oracle) MySQL 5.5.32 and 5.6.13. SELECT COT(0) -- returns Error CODE: 1690 DOUBLE VALUE IS OUT of RANGE IN 'cot(0)' So this change in behaviour has its origin in (Oracle) MySQL 5.5. On Thu, Aug 1, 2013 at 9:56 PM, Ian Gilfillan <launchpad@greenman.co.za>wrote:
Hi
SELECT COT(0) returns:
ERROR 1690 (22003): DOUBLE value is out of range in 'cot(0)'
in both MariaDB 10 and 5.5, but in MySQL 5.1 it returns NULL.
I can't find a changelog reference to this, but I see it's still documented as returning NULL in MySQL 5.5 (I don't have this to test on). Is this a MariaDB-specific change? When did this change in behaviour happen?
thanks, ian
______________________________**_________________ Mailing list: https://launchpad.net/~maria-**developers<https://launchpad.net/~maria-developers> Post to : maria-developers@lists.**launchpad.net<maria-developers@lists.launchpad.net> Unsubscribe : https://launchpad.net/~maria-**developers<https://launchpad.net/~maria-developers> More help : https://help.launchpad.net/**ListHelp<https://help.launchpad.net/ListHelp>
from mysql 5.1, 5.5, 5.6, 5.7 manual http://dev.mysql.com/doc/refman/5.1/en/mathematical-functions.html#function_... http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html#function_... http://dev.mysql.com/doc/refman/5.6/en/mathematical-functions.html#function_... http://dev.mysql.com/doc/refman/5.7/en/mathematical-functions.html#function_... * * - COT(*X*)<http://dev.mysql.com/doc/refman/5.1/en/mathematical-functions.html#function_cot> Returns the cotangent of *X*. mysql> *SELECT COT(12);* -> -1.5726734063977 mysql> *SELECT COT(0);* -> NULL maybe a sql_mode parameter change the output of this function?
IMO, it is a plain bug in MySQL 5.5+ then. At least a documentation bug, but I believe more than that. -- Peter On Thu, Aug 1, 2013 at 10:35 PM, Roberto Spadim <roberto@spadim.com.br>wrote:
from mysql 5.1, 5.5, 5.6, 5.7 manual
http://dev.mysql.com/doc/refman/5.1/en/mathematical-functions.html#function_...
http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html#function_...
http://dev.mysql.com/doc/refman/5.6/en/mathematical-functions.html#function_...
http://dev.mysql.com/doc/refman/5.7/en/mathematical-functions.html#function_... * *
-
COT(*X*)<http://dev.mysql.com/doc/refman/5.1/en/mathematical-functions.html#function_cot>
Returns the cotangent of *X*.
mysql> *SELECT COT(12);* -> -1.5726734063977 mysql> *SELECT COT(0);* -> NULL
maybe a sql_mode parameter change the output of this function?
hum... should we create a bug at mysql? 2013/8/2 Peter Laursen <peter_laursen@webyog.com>:
IMO, it is a plain bug in MySQL 5.5+ then. At least a documentation bug, but I believe more than that.
-- Peter
On Thu, Aug 1, 2013 at 10:35 PM, Roberto Spadim <roberto@spadim.com.br> wrote:
from mysql 5.1, 5.5, 5.6, 5.7 manual
http://dev.mysql.com/doc/refman/5.1/en/mathematical-functions.html#function_...
http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html#function_...
http://dev.mysql.com/doc/refman/5.6/en/mathematical-functions.html#function_...
http://dev.mysql.com/doc/refman/5.7/en/mathematical-functions.html#function_...
COT(X)
Returns the cotangent of X.
mysql> SELECT COT(12); -> -1.5726734063977 mysql> SELECT COT(0); -> NULL
maybe a sql_mode parameter change the output of this function?
-- Roberto Spadim SPAEmpresarial
I have opened a bug report at http://bugs.mysql.com/bug.php?id=69916 -- Peter On Fri, Aug 2, 2013 at 4:21 PM, Roberto Spadim <roberto@spadim.com.br>wrote:
hum... should we create a bug at mysql?
2013/8/2 Peter Laursen <peter_laursen@webyog.com>:
IMO, it is a plain bug in MySQL 5.5+ then. At least a documentation bug, but I believe more than that.
-- Peter
On Thu, Aug 1, 2013 at 10:35 PM, Roberto Spadim <roberto@spadim.com.br> wrote:
from mysql 5.1, 5.5, 5.6, 5.7 manual
http://dev.mysql.com/doc/refman/5.1/en/mathematical-functions.html#function_...
http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html#function_...
http://dev.mysql.com/doc/refman/5.6/en/mathematical-functions.html#function_...
http://dev.mysql.com/doc/refman/5.7/en/mathematical-functions.html#function_...
COT(X)
Returns the cotangent of X.
mysql> SELECT COT(12); -> -1.5726734063977 mysql> SELECT COT(0); -> NULL
maybe a sql_mode parameter change the output of this function?
-- Roberto Spadim SPAEmpresarial
participants (3)
-
Ian Gilfillan
-
Peter Laursen
-
Roberto Spadim