diff options
author | monty@hundin.mysql.fi <> | 2001-09-30 05:47:35 +0300 |
---|---|---|
committer | monty@hundin.mysql.fi <> | 2001-09-30 05:47:35 +0300 |
commit | 2350609bce82a814456168a79546c7003fbaf0fd (patch) | |
tree | f62e9813e447863e2dcddb0cd15e7b4231fb6435 /sql/sql_show.cc | |
parent | 34c3484fae0ef57d145f60190d9740e9535a7178 (diff) | |
download | mariadb-git-2350609bce82a814456168a79546c7003fbaf0fd.tar.gz |
Fixed that SHOW CREATE TABLE shows all attributes
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 28d405690bd..438d6b7eed6 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -390,7 +390,7 @@ int mysqld_extend_show_tables(THD *thd,const char *db,const char *wild) if (table->db_create_options & HA_OPTION_DELAY_KEY_WRITE) ptr=strmov(ptr," delay_key_write=1"); if (table->row_type != ROW_TYPE_DEFAULT) - ptr=strxmov(ptr, " format=", ha_row_type[(uint) table->row_type], + ptr=strxmov(ptr, " row_format=", ha_row_type[(uint) table->row_type], NullS); if (file->raid_type) { @@ -919,6 +919,12 @@ store_create_info(THD *thd, TABLE *table, String *packet) p = longlong10_to_str(table->max_rows, buff, 10); packet->append(buff, (uint) (p - buff)); } + if (table->avg_row_length) + { + packet->append(" AVG_ROW_LENGTH="); + p=longlong10_to_str(table->avg_row_length, buff,10); + packet->append(buff, (uint) (p - buff)); + } if (table->db_create_options & HA_OPTION_PACK_KEYS) packet->append(" PACK_KEYS=1", 12); @@ -928,6 +934,11 @@ store_create_info(THD *thd, TABLE *table, String *packet) packet->append(" CHECKSUM=1", 11); if (table->db_create_options & HA_OPTION_DELAY_KEY_WRITE) packet->append(" DELAY_KEY_WRITE=1",18); + if (table->row_type != ROW_TYPE_DEFAULT) + { + packet->append(" ROW_FORMAT=",12); + packet->append(ha_row_type[(uint) table->row_type]); + } table->file->append_create_info(packet); if (table->comment && table->comment[0]) { |