1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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
This commit is contained in:
unknown
2003-08-27 10:26:03 +03:00
parent 522a32203a
commit b43a551e83
5 changed files with 22 additions and 4 deletions

View File

@ -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

View File

@ -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