Commit 8290f609 authored by unknown's avatar unknown

fixed cteate temporary field of subselect bug


mysql-test/r/subselect.result:
  test of cteate temporary field of subselect bug
mysql-test/t/subselect.test:
  test of cteate temporary field of subselect bug
parent a299a270
select (select 2);
(select 2)
2
SELECT (SELECT 1) UNION SELECT (SELECT 2);
(SELECT 1)
1
2
drop table if exists t1,t2,t3,t4,t5,attend,clinic,inscrit;
create table t1 (a int);
create table t2 (a int, b int);
......
select (select 2);
SELECT (SELECT 1) UNION SELECT (SELECT 2);
drop table if exists t1,t2,t3,t4,t5,attend,clinic,inscrit;
create table t1 (a int);
create table t2 (a int, b int);
......
......@@ -3605,6 +3605,7 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
case Item::COND_ITEM:
case Item::FIELD_AVG_ITEM:
case Item::FIELD_STD_ITEM:
case Item::SUBSELECT_ITEM:
/* The following can only happen with 'CREATE TABLE ... SELECT' */
case Item::INT_ITEM:
case Item::REAL_ITEM:
......
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