summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2003-08-27 10:26:03 +0300
committerunknown <monty@narttu.mysql.fi>2003-08-27 10:26:03 +0300
commitb43a551e83c20dc647a56036ad76811bb09a4945 (patch)
treed63c2fba98c94c1cc7e1a75b21591e555059d9a1 /mysql-test
parent522a32203a1e9f4cd6ee8c3d052a04ac3cd2507a (diff)
downloadmariadb-git-b43a551e83c20dc647a56036ad76811bb09a4945.tar.gz
Add column names for metadata when running mysql with -T
Change metadata info so that that MIN() and code MAX() reports that they can return NULL. Bug #324 client/mysql.cc: Add column names for metadata when running with -T mysql-test/r/show_check.result: test case for bug fix mysql-test/t/show_check.test: test case for bug fix sql/item_sum.cc: Change metadata info so that that MIN() and code MAX() reports that they can return NULL. Bug #324 sql/sql_load.cc: Removed not needed line
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/show_check.result6
-rw-r--r--mysql-test/t/show_check.test7
2 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result
index fa2f381d905..f40b0693585 100644
--- a/mysql-test/r/show_check.result
+++ b/mysql-test/r/show_check.result
@@ -212,6 +212,12 @@ select * from t1;
type_bool type_tiny type_short type_mediumint type_bigint type_decimal type_numeric empty_char type_char type_varchar type_timestamp type_date type_time type_datetime type_year type_enum type_set type_tinyblob type_blob type_medium_blob type_long_blob
0 1 NULL NULL NULL NULL NULL NULL NULL NULL 20030207100001 0000-00-00 00:00:00 0000-00-00 00:00:00 NULL NULL NULL NULL NULL NULL NULL
drop table t1;
+create table t1 (a int not null);
+create table t2 select max(a) from t1;
+show columns from t2;
+Field Type Null Key Default Extra
+max(a) bigint(20) YES NULL
+drop table t1,t2;
create table t1 (c decimal, d double, f float, r real);
show columns from t1;
Field Type Null Key Default Extra
diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test
index ba6fa930e22..2cd2012d109 100644
--- a/mysql-test/t/show_check.test
+++ b/mysql-test/t/show_check.test
@@ -114,6 +114,13 @@ insert into t1 (type_timestamp) values ("2003-02-07 10:00:01");
select * from t1;
drop table t1;
+#
+# Check metadata
+#
+create table t1 (a int not null);
+create table t2 select max(a) from t1;
+show columns from t2;
+drop table t1,t2;
# Check auto conversions of types