MySQL - Table meta data fix - #1924
Conversation
|
Could you include a similar fix also for other DBs. I don't like genreal problems being fixed for only one DB at a time. At least Oracle is reported to also have the same problem. |
|
The tests are failing because of an other issue. Can you rebase to master |
|
I'll have a look at SQLServer and Oracle, is there an issue for Oracle, so I can see what steps I need to reproduce? I'll look into it, hopefully over the course of the week. |
|
I think #1692 mentions Oracle |
…heme pattern, the correct way in later versions is passing '%'. MySQL driver 8.x now defaults nullCatalogMeansCurrent to false, therefore the current catalog has to be passed in. Added "%" as tableNamePattern on SQLServer, Postgres, Oracle. Oracle has started not accepting null in newer versions, and "%" should be semantically the same.
678171c to
27ed3f5
Compare
|
I've rebased to master. Also I've investigated other profiles for the same kind of issue, and it seems that Oracle does indeed suffer under this on newer versions. Progres supports "%" with the same behaivior as The changes are covered by tests in JdbcMetaTest. |
|
Should this now be merged or is there something more? What about the Oracle aspect? |
|
I can see it wasn't clear from my earlier comment, but yes, it should be ready to be merged. |
|
Actually the changes are covered. The problem is that the tests are only run with one version of the database drivers, and newer versions are behaving differently, so unless we add more database drivers to our CI test suite, we won't be able to test it. What I've been is manually changed my database driver locally and repeatedly run the tests. To verify that the change works. |
Fixes issue #1692 for MySQL.
Tests in
JdbcMetaTestcover this change, since they call the methoddefaultTables.This makes PR #1717 somewhat obsolete, at least in regards to MySQL.
MySQL connector/J 8.x has changed
nullCatalogMeansCurrentto now default to false, so the MySQLProfiledefaultTablesnow fetches the current catalog from the connection.We currently only run the test suite on MySQL 5.x series, but I've tested locally with 6.x and 8.x as well.
I have not looked into #1485 yet, but I can see that the SQLServerProfile has its own override of
defaultTables. I'll look into this separately.