MariaDB [test]> SELECT TABLE_COMMENT,TABLE_ROWS FROM information_schema.tables WHERE table_type='VIEW' ;
|
+---------------------------------------------------------------------------------------------------------------------------+------------+
|
| TABLE_COMMENT | TABLE_ROWS |
|
+---------------------------------------------------------------------------------------------------------------------------+------------+
|
| View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them | NULL |
|
+---------------------------------------------------------------------------------------------------------------------------+------------+
|
1 row in set, 1 warning (0.00 sec)
|
|
Warning (Code 1356): View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
MariaDB [test]> SELECT TABLE_COMMENT FROM information_schema.tables WHERE table_type='VIEW' ;
|
+---------------+
|
| TABLE_COMMENT |
|
+---------------+
|
| VIEW |
|
+---------------+
|
1 row in set (0.01 sec)
|
|
|
MariaDB [test]> explain extended SELECT TABLE_COMMENT FROM information_schema.tables WHERE table_type='VIEW' ;
|
+------+-------------+--------+------+---------------+------+---------+------+------+----------+---------------------------------------------------+
|
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
|
+------+-------------+--------+------+---------------+------+---------+------+------+----------+---------------------------------------------------+
|
| 1 | SIMPLE | tables | ALL | NULL | NULL | NULL | NULL | NULL | NULL | Using where; Open_frm_only; Scanned all databases |
|
+------+-------------+--------+------+---------------+------+---------+------+------+----------+---------------------------------------------------+
|
1 row in set, 1 warning (0.00 sec)
|
|
Note (Code 1003): select `information_schema`.`tables`.`TABLE_COMMENT` AS `TABLE_COMMENT` from `information_schema`.`tables` where (`information_schema`.`tables`.`TABLE_TYPE` = 'VIEW')
|
|
MariaDB [test]> explain extended SELECT TABLE_COMMENT,TABLE_ROWS FROM information_schema.tables WHERE table_type='VIEW' ;
|
+------+-------------+--------+------+---------------+------+---------+------+------+----------+-----------------------------------------------------+
|
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
|
+------+-------------+--------+------+---------------+------+---------+------+------+----------+-----------------------------------------------------+
|
| 1 | SIMPLE | tables | ALL | NULL | NULL | NULL | NULL | NULL | NULL | Using where; Open_full_table; Scanned all databases |
|
+------+-------------+--------+------+---------------+------+---------+------+------+----------+-----------------------------------------------------+
|
1 row in set, 1 warning (0.00 sec)
|
|
Note (Code 1003): select `information_schema`.`tables`.`TABLE_COMMENT` AS `TABLE_COMMENT`,`information_schema`.`tables`.`TABLE_ROWS` AS `TABLE_ROWS` from `information_schema`.`tables` where (`information_schema`.`tables`.`TABLE_TYPE` = 'VIEW')
|
|