MySQL Metadata for keys
Posted: 06.08.2022, 14:40
It looks like the MySQL metadata calls:
UncachedGetImportedKeys
UncachedGetExportedKeys
UncachedGetCrossReference
All currently don't work on MySQL 5.7 and MySQL 8.0 (those are the only two versions I have access to.)
They all seem to rely on the command:
SHOW TABLE STATUS FROM %s LIKE ''%s''
which as far as I can tell does not show any real key information. I've gone back through the file history to see if something changed at some point, but didn't find anything.
The easiest solution I can see would be to use the information_schema to get the information. The MySQL metadata stuff is currently a mix of using the informaton_schema and the "show" commands and I know there's been some concern about using the information_schema, but in this case since I don't think the current functions work at all it doesn't seem like using the informaton_schema would be an issue.
I'm happy to do a pr with updated functions but wanted to check if others think it's the way to go, of if perhaps someone knows how to use the show command to get the key information those calls need.
-Mark
UncachedGetImportedKeys
UncachedGetExportedKeys
UncachedGetCrossReference
All currently don't work on MySQL 5.7 and MySQL 8.0 (those are the only two versions I have access to.)
They all seem to rely on the command:
SHOW TABLE STATUS FROM %s LIKE ''%s''
which as far as I can tell does not show any real key information. I've gone back through the file history to see if something changed at some point, but didn't find anything.
The easiest solution I can see would be to use the information_schema to get the information. The MySQL metadata stuff is currently a mix of using the informaton_schema and the "show" commands and I know there's been some concern about using the information_schema, but in this case since I don't think the current functions work at all it doesn't seem like using the informaton_schema would be an issue.
I'm happy to do a pr with updated functions but wanted to check if others think it's the way to go, of if perhaps someone knows how to use the show command to get the key information those calls need.
-Mark