diff options
author | unknown <bell@sanja.is.com.ua> | 2005-03-23 08:36:48 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2005-03-23 08:36:48 +0200 |
commit | 5a425250271f796e68514f9484a67df218ddb9d2 (patch) | |
tree | 1a44d0ad7fd7c6b39daf960d107346319e9f5e74 /mysql-test/t/metadata.test | |
parent | 98eecc7b35f4da432b1388bbfd3e3f0cd63b49f5 (diff) | |
download | mariadb-git-5a425250271f796e68514f9484a67df218ddb9d2.tar.gz |
fixed union types merging and table related metadata (BUG#8824)
mysql-test/r/func_group.result:
new result
mysql-test/r/metadata.result:
new result
test of metadata of variables, unions and derived tables
mysql-test/r/union.result:
new results
test of union of enum
mysql-test/t/metadata.test:
test of metadata of variables, unions and derived tables
mysql-test/t/union.test:
test of union of enum
sql/field.cc:
Field type merging rules added
Fixed table name/alias returting for field made from temporary tables
sql/field.h:
removed unned field type reporting
sql/item.cc:
fixed bug in NEW_DATE type field creartion
replaced mechanism of merging types of UNION
sql/item.h:
replaced mechanism of merging types of UNION
sql/item_func.h:
new item type to make correct field type detection possible
sql/item_subselect.cc:
added table name parameter to prepare() to show right table alias for derived tables
sql/sql_derived.cc:
added table name parameter to prepare() to show right table alias for derived tables
sql/sql_lex.h:
added table name parameter to prepare() to show right table alias for derived tables
sql/sql_parse.cc:
made function for enum/set pack length calculation
sql/sql_prepare.cc:
added table name parameter to prepare() to show right table alias for derived tables
sql/sql_select.cc:
new temporary table field creation by Item_type_holder
fixed table alias for temporary table
sql/sql_union.cc:
added table name parameter to prepare() to show right table alias for derived tables
Diffstat (limited to 'mysql-test/t/metadata.test')
-rw-r--r-- | mysql-test/t/metadata.test | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/t/metadata.test b/mysql-test/t/metadata.test index d11cb62b04e..ebd58ef4ebb 100644 --- a/mysql-test/t/metadata.test +++ b/mysql-test/t/metadata.test @@ -34,4 +34,17 @@ select t1.id, t1.data, t2.data from t1, t2 where t1.id = t2.id order by t1.id; select t1.id from t1 union select t2.id from t2; drop table t1,t2; +# +# variables union and derived tables metadata test +# +create table t1 ( a int, b varchar(30), primary key(a)); +insert into t1 values (1,'one'); +insert into t1 values (2,'two'); +set @arg00=1 ; +select @arg00 FROM t1 where a=1 union distinct select 1 FROM t1 where a=1; +select * from (select @arg00) aaa; +select 1 union select 1; +select * from (select 1 union select 1) aaa; +drop table t1; + --disable_metadata |