Bug #8516 SHOW CREATE TABLE `db`.`table` should return schema in result
Submitted: 15 Feb 2005 11:46 Modified: 14 Jun 2013 0:11
Reporter: Mike Lischke Email Updates:
Status: Verified Impact on me:
Category:MySQL Server Severity:S4 (Feature request)
Version: OS:
Assigned to: CPU Architecture:Any

[15 Feb 2005 11:46] Mike Lischke
When executing a SHOW CREATE TABLE query where the table is qualified by a db name the result does not include this qualification, so the creation statement cannot directly be used. Make the server responding to

  SHOW CREATE TABLE `db`.`table`...


  CREATE TABLE `db`.`table`...

instead only

  CREATE TABLE `table`...

How to repeat:
Execute a SHOW CREATE TABLE query for an existing table qualified with the correct schema name. The result does not contain this schema.

Suggested fix:
Add the schema name to the output if one was given in the SHOW command.