summaryrefslogtreecommitdiff
path: root/mysql-test/r/metadata.result
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2005-03-23 08:36:48 +0200
committerunknown <bell@sanja.is.com.ua>2005-03-23 08:36:48 +0200
commit5a425250271f796e68514f9484a67df218ddb9d2 (patch)
tree1a44d0ad7fd7c6b39daf960d107346319e9f5e74 /mysql-test/r/metadata.result
parent98eecc7b35f4da432b1388bbfd3e3f0cd63b49f5 (diff)
downloadmariadb-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/r/metadata.result')
-rw-r--r--mysql-test/r/metadata.result27
1 files changed, 26 insertions, 1 deletions
diff --git a/mysql-test/r/metadata.result b/mysql-test/r/metadata.result
index 54b3f1e0466..d691a200b7e 100644
--- a/mysql-test/r/metadata.result
+++ b/mysql-test/r/metadata.result
@@ -55,8 +55,33 @@ id data data
2 female no
select t1.id from t1 union select t2.id from t2;
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
-def test t1 t1 id id 1 3 1 Y 32768 0 63
+def id id 1 4 1 Y 32768 0 63
id
1
2
drop table t1,t2;
+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;
+Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
+def @arg00 @arg00 8 20 1 Y 32768 0 63
+@arg00
+1
+select * from (select @arg00) aaa;
+Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
+def aaa @arg00 @arg00 8 20 1 Y 32768 0 63
+@arg00
+1
+select 1 union select 1;
+Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
+def 1 1 8 20 1 N 32769 0 63
+1
+1
+select * from (select 1 union select 1) aaa;
+Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
+def aaa 1 1 8 20 1 N 32769 0 63
+1
+1
+drop table t1;