Comment 1 for bug 161127

Revision history for this message
Daniƫl van Eeden (dveeden) wrote :

mysql> show create view v_info_top50_tablecount\G
*************************** 1. row ***************************
       View: v_info_top50_tablecount
Create View: CREATE ALGORITHM=UNDEFINED DEFINER=`deeden`@`localhost` SQL SECURITY DEFINER VIEW `deeden`.`v_info_top50_tablecount` AS select sql_no_cache `v_info_tablecount`.`schema_name` AS `schema_name`,`v_info_tablecount`.`table_count` AS `table_count` from `deeden`.`v_info_tablecount` order by `v_info_tablecount`.`table_count` desc limit 50
1 row in set (0.00 sec)

mysql> show create view v_info_tablecount\G
*************************** 1. row ***************************
       View: v_info_tablecount
Create View: CREATE ALGORITHM=UNDEFINED DEFINER=`deeden`@`localhost` SQL SECURITY DEFINER VIEW `deeden`.`v_info_tablecount` AS select sql_no_cache `s`.`SCHEMA_NAME` AS `schema_name`,count(`t`.`TABLE_NAME`) AS `table_count` from (`information_schema`.`schemata` `s` left join `information_schema`.`tables` `t` on((`s`.`SCHEMA_NAME` = `t`.`TABLE_SCHEMA`))) group by `s`.`SCHEMA_NAME`
1 row in set (0.00 sec)

mysql> select count(*) from information_schema.tables;
+----------+
| count(*) |
+----------+
| 8519 |
+----------+
1 row in set (3.36 sec)

mysql> select count(*) from information_schema.schemata;
+----------+
| count(*) |
+----------+
| 247 |
+----------+
1 row in set (0.01 sec)

mysql> explain select * from v_info_top50_tablecount;
ERROR 2013 (HY000): Lost connection to MySQL server during query