mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
fixed bugs in elt() and make_set()
added two new test cases
This commit is contained in:
@ -1,2 +1,4 @@
|
||||
1+1 1-1 1+1*2 8/5 8%5 MOD(8,5) MOD(8,5)|0 -(1+1)*-2 SIGN(-5)
|
||||
2 0 3 1.60 3 3 3 4 -1
|
||||
id elt(two.val,'one','two')
|
||||
1 one
|
||||
2 one
|
||||
4 two
|
||||
|
@ -1,2 +1,4 @@
|
||||
FLOOR(5.5) FLOOR(-5.5) CEILING(5.5) CEILING(-5.5) ROUND(5.5) ROUND(-5.5)
|
||||
5 -6 6 -5 6 -6
|
||||
id elt(two.val,'one','two')
|
||||
1 one
|
||||
2 one
|
||||
4 two
|
||||
|
21
mysql-test/t/3.23/sel000004.test
Normal file
21
mysql-test/t/3.23/sel000004.test
Normal file
@ -0,0 +1,21 @@
|
||||
# sel000004
|
||||
#
|
||||
# Versions
|
||||
# --------
|
||||
# 3.22
|
||||
# 3.23
|
||||
#
|
||||
# Description
|
||||
# -----------
|
||||
# test for a bug with elt() and order by
|
||||
|
||||
drop table if exists elt_ck1,elt_ck2;
|
||||
create table elt_ck1 (id int(10) not null unique);
|
||||
create table elt_ck2 (id int(10) not null primary key,
|
||||
val int(10) not null);
|
||||
insert into elt_ck1 values (1),(2),(4);
|
||||
insert into elt_ck2 values (1,1),(2,1),(3,1),(4,2);
|
||||
|
||||
@r/3.23/sel000004.result select one.id, elt(two.val,'one','two') from elt_ck1 one, elt_ck2 two
|
||||
where two.id=one.id order by one.id;
|
||||
|
21
mysql-test/t/3.23/sel000005.test
Normal file
21
mysql-test/t/3.23/sel000005.test
Normal file
@ -0,0 +1,21 @@
|
||||
# sel000004
|
||||
#
|
||||
# Versions
|
||||
# --------
|
||||
# 3.22
|
||||
# 3.23
|
||||
#
|
||||
# Description
|
||||
# -----------
|
||||
# test for a bug with elt()
|
||||
|
||||
drop table if exists elt_ck1,elt_ck2;
|
||||
create table elt_ck1 (id int(10) not null unique);
|
||||
create table elt_ck2 (id int(10) not null primary key,
|
||||
val int(10) not null);
|
||||
insert into elt_ck1 values (1),(2),(4);
|
||||
insert into elt_ck2 values (1,1),(2,1),(3,1),(4,2);
|
||||
|
||||
@r/3.23/sel000005.result select one.id, elt(two.val,'one','two') from elt_ck1 one, elt_ck2 two
|
||||
where two.id=one.id ;
|
||||
|
Reference in New Issue
Block a user