Description:
"SHOW CREATE TABLE <view name>" actually invokes "SHOW CREATE VIEW <view name>".
How to repeat:
> CREATE VIEW v1 AS SELECT 1;
> show create TABLE v1;
+------+---------------------------------------------------------------------------------------------------------+----------------------+----------------------+
| View | Create View | character_set_client | collation_connection |
+------+---------------------------------------------------------------------------------------------------------+----------------------+----------------------+
| v1 | CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1` | latin1 | latin1_swedish_ci |
+------+---------------------------------------------------------------------------------------------------------+----------------------+----------------------+
1 row in set (0.00 sec)
> show create VIEW v1;
+------+---------------------------------------------------------------------------------------------------------+----------------------+----------------------+
| View | Create View | character_set_client | collation_connection |
+------+---------------------------------------------------------------------------------------------------------+----------------------+----------------------+
| v1 | CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1` | latin1 | latin1_swedish_ci |
+------+---------------------------------------------------------------------------------------------------------+----------------------+----------------------+
1 row in set (0.00 sec)
Suggested fix:
Throw an error if SHOW CREATE TABLE is called for a view.