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:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version: OS:
Assigned to: CPU Architecture:Any
Triage: D5 (Feature request)

[15 Feb 2005 11:46] Mike Lischke
Description:
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`...

with

  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.