summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authormonty@hundin.mysql.fi <>2002-05-31 15:22:38 +0300
committermonty@hundin.mysql.fi <>2002-05-31 15:22:38 +0300
commite2a116411e7b293b5d0d920c8a94794dd75dd334 (patch)
tree85c51f351e6086eebde739636a64e7ab09b85277 /sql/sql_show.cc
parenta2ec51cec16205154aa2c7f5ecf6ec3c98a978e8 (diff)
downloadmariadb-git-e2a116411e7b293b5d0d920c8a94794dd75dd334.tar.gz
Portability fixes for SCO and HPUX
Change TRUNCATE(number) to truncate towards zero for negative numbers Fix NULL handling for DESCRIBE table_name
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 8cfac1675b0..5db2df85fbf 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -431,6 +431,7 @@ mysqld_show_fields(THD *thd, TABLE_LIST *table_list,const char *wild,
TABLE *table;
handler *file;
char tmp[MAX_FIELD_WIDTH];
+ Item *item;
DBUG_ENTER("mysqld_show_fields");
DBUG_PRINT("enter",("db: %s table: %s",table_list->db,
table_list->real_name));
@@ -449,7 +450,8 @@ mysqld_show_fields(THD *thd, TABLE_LIST *table_list,const char *wild,
field_list.push_back(new Item_empty_string("Type",40));
field_list.push_back(new Item_empty_string("Null",1));
field_list.push_back(new Item_empty_string("Key",3));
- field_list.push_back(new Item_empty_string("Default",NAME_LEN));
+ field_list.push_back(item=new Item_empty_string("Default",NAME_LEN));
+ item->maybe_null=1;
field_list.push_back(new Item_empty_string("Extra",20));
if (verbose)
field_list.push_back(new Item_empty_string("Privileges",80));