diff options
author | monty@hundin.mysql.fi <> | 2002-03-27 01:56:10 +0200 |
---|---|---|
committer | monty@hundin.mysql.fi <> | 2002-03-27 01:56:10 +0200 |
commit | 727e507bca7fe9342f543340f9d7ea7a02e9708e (patch) | |
tree | 6998f99b1790b678ac1558e748e2a8c992bbfa22 /sql/sql_show.cc | |
parent | ce541b292a20114adc5d5bb10142a441246e0675 (diff) | |
parent | 3a571c7c135b9e9707e09ace4058d00ed6935fd1 (diff) | |
download | mariadb-git-727e507bca7fe9342f543340f9d7ea7a02e9708e.tar.gz |
merge with 3.23.50
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 131266a11d6..08c17c2e25d 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -908,9 +908,21 @@ store_create_info(THD *thd, TABLE *table, String *packet) } packet->append(')'); } - packet->append("\n)", 2); handler *file = table->file; + + /* Get possible foreign key definitions stored in InnoDB and append them + to the CREATE TABLE statement */ + + char* for_str = file->get_foreign_key_create_info(); + + if (for_str) { + packet->append(for_str, strlen(for_str)); + + file->free_foreign_key_create_info(for_str); + } + + packet->append("\n)", 2); packet->append(" TYPE=", 6); packet->append(file->table_type()); char buff[128]; |