mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
func_str.result, null.result:
Corrected results after the fix for bug #12791. func_test.result, func_test.test: Added test cases for bug #12791. item_func.h, item_func.cc: Fixed bug #12791. Made LEAST/GREATES fully Oracle compliant. LEAST/GREATEST did not return NULL if only some arguments were NULLs. This did not comply with Oracle.
This commit is contained in:
@@ -118,3 +118,12 @@ insert into t1 values (1,2), (2,3), (3,4), (4,5);
|
||||
select * from t1 where a not between 1 and 2;
|
||||
select * from t1 where a not between 1 and 2 and b not between 3 and 4;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Test for bug #12791: one of the arguments of LEAST/GREATEST is NULL
|
||||
#
|
||||
|
||||
SELECT GREATEST(1,NULL) FROM DUAL;
|
||||
SELECT LEAST('xxx','aaa',NULL,'yyy') FROM DUAL;
|
||||
SELECT LEAST(1.1,1.2,NULL,1.0) FROM DUAL;
|
||||
SELECT GREATEST(1.5E+2,1.3E+2,NULL) FROM DUAL;
|
||||
|
||||
Reference in New Issue
Block a user