Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSLContext.meta().getTables() returns empty fields list for table that are not in the current schema in MySQL #4399

Closed
duc0 opened this issue Jun 29, 2015 · 3 comments

Comments

@duc0
Copy link

duc0 commented Jun 29, 2015

I tried to use DSLContext.meta().getTables() to fetch the list of table names and columns per table. It fetches all the table names correctly. However, the field list for each table is empty. I'm using mysql with jooq 3.6.2.

@lukaseder
Copy link
Member

That doesn't sound good... Just to be sure, what JDBC driver are you using?

@lukaseder lukaseder changed the title (MySql) DSLContext.meta().getTables() return empty fields list for every table DSLContext.meta().getTables() return empty fields list for every table in MySQL Jul 13, 2015
@lukaseder
Copy link
Member

In fact, I can reproduce this. Thanks a lot for reporting. Will look into fixing this ASAP

@lukaseder
Copy link
Member

MySQL's JDBC driver has a setting that indicates whether a "null" catalog passed to DatabaseMetaData.getColumns() means the "current" catalog or all catalogs. This is probably what is causing the issue in a multi-schema setup. jOOQ should work around this setting by explicitly fetching all catalogs

lukaseder added a commit that referenced this issue Jul 15, 2015
@lukaseder lukaseder changed the title DSLContext.meta().getTables() return empty fields list for every table in MySQL DSLContext.meta().getTables() returns empty fields list for table that are not in the current schema in MySQL Jul 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants