mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
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
This commit is contained in:
@ -1,6 +1,10 @@
|
|||||||
select (select 2);
|
select (select 2);
|
||||||
(select 2)
|
(select 2)
|
||||||
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;
|
drop table if exists t1,t2,t3,t4,t5,attend,clinic,inscrit;
|
||||||
create table t1 (a int);
|
create table t1 (a int);
|
||||||
create table t2 (a int, b int);
|
create table t2 (a int, b int);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
select (select 2);
|
select (select 2);
|
||||||
|
SELECT (SELECT 1) UNION SELECT (SELECT 2);
|
||||||
drop table if exists t1,t2,t3,t4,t5,attend,clinic,inscrit;
|
drop table if exists t1,t2,t3,t4,t5,attend,clinic,inscrit;
|
||||||
create table t1 (a int);
|
create table t1 (a int);
|
||||||
create table t2 (a int, b 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::COND_ITEM:
|
||||||
case Item::FIELD_AVG_ITEM:
|
case Item::FIELD_AVG_ITEM:
|
||||||
case Item::FIELD_STD_ITEM:
|
case Item::FIELD_STD_ITEM:
|
||||||
|
case Item::SUBSELECT_ITEM:
|
||||||
/* The following can only happen with 'CREATE TABLE ... SELECT' */
|
/* The following can only happen with 'CREATE TABLE ... SELECT' */
|
||||||
case Item::INT_ITEM:
|
case Item::INT_ITEM:
|
||||||
case Item::REAL_ITEM:
|
case Item::REAL_ITEM:
|
||||||
|
Reference in New Issue
Block a user