mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-in-4.1
This commit is contained in:
@@ -1361,3 +1361,11 @@ userid pmtotal pmnew calc_total calc_new
|
||||
1 0 0 9 3
|
||||
2 0 0 4 2
|
||||
drop table t1, t2;
|
||||
create table t1 (s1 char(5));
|
||||
select (select 'a','b' from t1 union select 'a','b' from t1) from t1;
|
||||
ERROR 21000: Cardinality error (more/less than 1 columns)
|
||||
insert into t1 values ('tttt');
|
||||
select * from t1 where ('a','b')=(select 'a','b' from t1 union select 'a','b' from t1);
|
||||
s1
|
||||
tttt
|
||||
drop table t1;
|
||||
|
||||
@@ -922,3 +922,13 @@ insert into t2 values(1,0,0),(2,0,0);
|
||||
insert into t1 values(1,0),(1,0),(1,0),(1,12),(1,15),(1,123),(1,12312),(1,12312),(1,123),(2,0),(2,0),(2,1),(2,2);
|
||||
select userid,pmtotal,pmnew, (select count(rd) from t1 where toid=t2.userid) calc_total, (select count(rd) from t1 where rd=0 and toid=t2.userid) calc_new from t2 where userid in (select distinct toid from t1);
|
||||
drop table t1, t2;
|
||||
|
||||
#
|
||||
# row union
|
||||
#
|
||||
create table t1 (s1 char(5));
|
||||
-- error 1240
|
||||
select (select 'a','b' from t1 union select 'a','b' from t1) from t1;
|
||||
insert into t1 values ('tttt');
|
||||
select * from t1 where ('a','b')=(select 'a','b' from t1 union select 'a','b' from t1);
|
||||
drop table t1;
|
||||
|
||||
@@ -846,7 +846,7 @@ void subselect_union_engine::fix_length_and_dec(Item_cache **row)
|
||||
SELECT_LEX *sl= unit->first_select();
|
||||
bool fake= 0;
|
||||
res_type= set_row(sl, item, row, &fake);
|
||||
for (sl= sl->next_select(); sl; sl->next_select())
|
||||
for (sl= sl->next_select(); sl; sl= sl->next_select())
|
||||
{
|
||||
List_iterator_fast<Item> li(sl->item_list);
|
||||
Item *sel_item;
|
||||
|
||||
Reference in New Issue
Block a user