Commit 34b8db05 authored by unknown's avatar unknown
Browse files

Merge lthalmann@bk-internal.mysql.com:/home/bk/mysql-4.1

into mysql.com:/home/bkroot/mysql-4.1

parents 43a95466 a5c87958
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -462,3 +462,10 @@ SELECT GROUP_CONCAT(id) AS gc FROM t1 HAVING gc IS NULL;
gc
NULL
DROP TABLE t1;
create table r2 (a int, b int);
insert into r2 values (1,1), (2,2);
select  b x, (select group_concat(x) from r2) from  r2;
x	(select group_concat(x) from r2)
1	1,1
2	2,2
drop table r2;
+8 −0
Original line number Diff line number Diff line
@@ -284,3 +284,11 @@ drop table t1;
CREATE TABLE t1 (id int);
SELECT GROUP_CONCAT(id) AS gc FROM t1 HAVING gc IS NULL;
DROP TABLE t1;

#
# Bug #8656: Crash with group_concat on alias in outer table
#
create table r2 (a int, b int);
insert into r2 values (1,1), (2,2);
select  b x, (select group_concat(x) from r2) from  r2;
drop table r2;
+1 −0
Original line number Diff line number Diff line
@@ -902,6 +902,7 @@ class Item_ref :public Item_ident
  void save_org_in_field(Field *field)	{ (*ref)->save_org_in_field(field); }
  enum Item_result result_type () const { return (*ref)->result_type(); }
  enum_field_types field_type() const   { return (*ref)->field_type(); }
  Field *get_tmp_table_field() { return result_field; }
  table_map used_tables() const		
  { 
    return depended_from ? OUTER_REF_TABLE_BIT : (*ref)->used_tables();