mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix for bug #13820 (No warning on log(NEGATIVE))
mysql-test/r/func_math.result: result fixed mysql-test/t/func_math.test: test case added sql/item_func.cc: tests for (value<=0.0) added to LOG* functions
This commit is contained in:
@ -170,3 +170,30 @@ insert into t1 values (1);
|
||||
select rand(i) from t1;
|
||||
ERROR HY000: Incorrect arguments to RAND
|
||||
drop table t1;
|
||||
set sql_mode='traditional';
|
||||
select ln(-1);
|
||||
ln(-1)
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1365 Division by 0
|
||||
select log10(-1);
|
||||
log10(-1)
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1365 Division by 0
|
||||
select log2(-1);
|
||||
log2(-1)
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1365 Division by 0
|
||||
select log(2,-1);
|
||||
log(2,-1)
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1365 Division by 0
|
||||
select log(-2,1);
|
||||
log(-2,1)
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1365 Division by 0
|
||||
set sql_mode='';
|
||||
|
Reference in New Issue
Block a user