summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index ba895384c1a..fd19b6064b5 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -2232,6 +2232,13 @@ int show_create_table(THD *thd, TABLE_LIST *table_list, String *packet,
append_identifier(thd, packet, &field->field_name);
packet->append(' ');
+ const Type_handler *th= field->type_handler();
+ const Schema *implied_schema= Schema::find_implied(thd);
+ if (th != implied_schema->map_data_type(thd, th))
+ {
+ packet->append(th->schema()->name(), system_charset_info);
+ packet->append(STRING_WITH_LEN("."), system_charset_info);
+ }
type.set(tmp, sizeof(tmp), system_charset_info);
field->sql_type(type);
packet->append(type.ptr(), type.length(), system_charset_info);