mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Merge polly.local:/tmp/20924/bug20294/my50-bug20294
into polly.local:/home/kaa/src/maint/m50-maint--07OGt sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/sql_class.h: Auto merged mysql-test/r/user_var.result: Manual merge mysql-test/t/user_var.test: Manual merge sql/item_func.cc: Manual merge sql/item_func.h: Manual merge
This commit is contained in:
@@ -133,8 +133,6 @@ select min(a), min(case when 1=1 then a else NULL end),
|
||||
from t1 where b=3 group by b;
|
||||
drop table t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
|
||||
#
|
||||
# Tests for bug #9939: conversion of the arguments for COALESCE and IFNULL
|
||||
@@ -154,3 +152,12 @@ SELECT IFNULL(t2.EMPNUM,t1.EMPNUM) AS CEMPNUM,
|
||||
FROM t1 LEFT JOIN t2 ON t1.EMPNUM=t2.EMPNUM;
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various
|
||||
# functions
|
||||
# - UNSIGNED values in CASE and COALESCE are treated as SIGNED
|
||||
#
|
||||
SELECT CASE 1 WHEN 1 THEN 18446744073709551615 ELSE 1 END;
|
||||
SELECT COALESCE(18446744073709551615);
|
||||
|
||||
--echo End of 4.1 tests
|
||||
|
@@ -97,3 +97,18 @@ create table t1 (f1 int, f2 int);
|
||||
insert into t1 values(1,1),(0,0);
|
||||
select f1, f2, if(f1, 40.0, 5.00) from t1 group by f1 order by f2;
|
||||
drop table t1;
|
||||
#
|
||||
# Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various
|
||||
# functions
|
||||
# - UNSIGNED values in IF() are treated as SIGNED
|
||||
#
|
||||
SELECT IF(1 != 0, 18446744073709551615, 1);
|
||||
|
||||
#
|
||||
# Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various
|
||||
# functions
|
||||
# - UNSIGNED values in IFNULL() are treated as SIGNED
|
||||
#
|
||||
SELECT IFNULL(NULL, 18446744073709551615);
|
||||
|
||||
--echo End of 4.1 tests
|
||||
|
@@ -108,8 +108,6 @@ select 5.1 mod 3, 5.1 mod -3, -5.1 mod 3, -5.1 mod -3;
|
||||
|
||||
select 5 mod 3, 5 mod -3, -5 mod 3, -5 mod -3;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
#
|
||||
# Bug#6726: NOT BETWEEN parse failure
|
||||
#
|
||||
@@ -127,3 +125,13 @@ 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;
|
||||
|
||||
#
|
||||
# Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various
|
||||
# functions
|
||||
# - UNSIGNED values in GREATEST() and LEAST() are treated as SIGNED
|
||||
#
|
||||
SELECT GREATEST(1, 18446744073709551615);
|
||||
SELECT LEAST(1, 18446744073709551615);
|
||||
|
||||
--echo End of 4.1 tests
|
||||
|
@@ -144,8 +144,6 @@ select @@version;
|
||||
--replace_column 1 #
|
||||
select @@global.version;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
#
|
||||
# Bug #6598: problem with cast(NULL as signed integer);
|
||||
#
|
||||
@@ -212,3 +210,5 @@ insert into t1 values (1,2),(2,3),(3,1);
|
||||
select @var:=f2 from t1 group by f1 order by f2 desc limit 1;
|
||||
select @var;
|
||||
drop table t1;
|
||||
|
||||
--echo End of 4.1 tests
|
||||
|
Reference in New Issue
Block a user