Commit 8b2be4e4 authored by unknown's avatar unknown

after-merge fix

parent 6339053d
......@@ -163,9 +163,9 @@ a
7
delete from t2 where a=100;
select * from t3 where a in (select a,b from t2);
Subselect returns more than 1 field
Cardinality error (more/less than 1 columns)
select * from t3 where a in (select * from t2);
Subselect returns more than 1 field
Cardinality error (more/less than 1 columns)
insert into t4 values (12,7),(1,7),(10,9),(9,6),(7,6),(3,9);
select b,max(a) as ma from t4 group by b having b < (select max(t2.a)
from t2 where t2.b=t4.b);
......
......@@ -496,8 +496,7 @@ bool Item_asterisk_remover::fix_fields(THD *thd,
thd->fatal_error= 1; // can't create Item => out of memory
}
else
my_message(ER_SUBSELECT_NO_1_COL, ER(ER_SUBSELECT_NO_1_COL),
MYF(0));
my_error(ER_CARDINALITY_COL, MYF(0), 1);
}
else
if (!fitem->table_name)
......@@ -506,8 +505,7 @@ bool Item_asterisk_remover::fix_fields(THD *thd,
my_error(ER_BAD_TABLE_ERROR, MYF(0), fitem->table_name);
}
else
my_message(ER_SUBSELECT_NO_1_COL, ER(ER_SUBSELECT_NO_1_COL),
MYF(0));
my_error(ER_CARDINALITY_COL, MYF(0), 1);
}
else
res= item->fix_fields(thd, list, &item);
......
......@@ -285,7 +285,7 @@ void Item_in_subselect::single_value_transformer(st_select_lex *select_lex,
Item *item;
if (sl->item_list.elements > 1)
{
my_message(ER_SUBSELECT_NO_1_COL, ER(ER_SUBSELECT_NO_1_COL), MYF(0));
my_error(ER_CARDINALITY_COL, MYF(0), 1);
item= 0; // Item_asterisk_remover must fail
}
else
......@@ -297,7 +297,7 @@ void Item_in_subselect::single_value_transformer(st_select_lex *select_lex,
{
sl->item_list.push_back(item);
item= (*func)(left_expr, new Item_ref(sl->item_list.head_ref(),
0, "<result>"));
0, (char*)"<result>"));
if (sl->having)
sl->having= new Item_cond_and(sl->having, item);
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment