schemacrawler / SchemaCrawler

Free database schema discovery and comprehension tool
http://www.schemacrawler.com/
Other
1.62k stars 200 forks source link

Mysql - can not get table comment #260

Closed zhuxt2015 closed 5 years ago

zhuxt2015 commented 5 years ago

Issue

I lookup the code, it use SHOW FULL TABLES to get table information, then mysql database only response Tables_in_test column and Table_type column. This lack much table information。 image I think it can use SHOW TABLE STATUS to get all table information,like this: image

Environment

SchemaCrawler:16.1.2 Java:1.8.0_202 OS:mac10.12.6 mysql:5.7.16 JDBC driver:com.mysql.cj.jdbc.Driver 8.0

sualeh commented 5 years ago

@zhuxt2015 - this is a known bug #80473 with the MySQL driver, and has not been fixed by Oracle yet.

sualeh commented 5 years ago

I have added a workaround in SchemaCrawler so you can obtain MySQL table comments from table attributes, using code similar to table.getAttribute("TABLE_COMMENT").

This will be available in SchemaCrawler 16.2.2.