2000-12-11 14:09:31 +01:00
|
|
|
# sel000031
|
|
|
|
#
|
|
|
|
# Versions
|
|
|
|
# --------
|
|
|
|
# 3.22
|
|
|
|
# 3.23
|
|
|
|
#
|
|
|
|
# Description
|
|
|
|
# -----------
|
|
|
|
# test for a bug with elt() and order by
|
|
|
|
|
2001-01-03 01:15:48 +01:00
|
|
|
drop table if exists t1,t2;
|
|
|
|
create table t1 (id int(10) not null unique);
|
|
|
|
create table t2 (id int(10) not null primary key,
|
2000-12-11 14:09:31 +01:00
|
|
|
val int(10) not null);
|
2001-01-03 01:15:48 +01:00
|
|
|
insert into t1 values (1),(2),(4);
|
|
|
|
insert into t2 values (1,1),(2,1),(3,1),(4,2);
|
2000-12-11 14:09:31 +01:00
|
|
|
|
2001-03-25 00:02:26 +01:00
|
|
|
select one.id, elt(two.val,'one','two') from t1 one, t2 two where two.id=one.id order by one.id;
|
2001-01-03 01:15:48 +01:00
|
|
|
drop table t1,t2;
|