sqltabs icon indicating copy to clipboard operation
sqltabs copied to clipboard

Error: Unknown table 'SESSION_VARIABLES' in information_schema

Open n9yty opened this issue 8 years ago • 2 comments

I just came across this project and wanted to have a look. We are running an old MySQL install (5.0.27), for various reasons, but this error is coming up when we try to do Database Information and Object Info, unsure where else it may happen.

n9yty avatar May 11 '17 13:05 n9yty

Thanks for reporting! MySQL connector doesn't have that much love as Postgres one, but let's take a look how we can fix that. The exception apparently happens when trying to get DB version with this query If you can help me to rewrite it for your version I will make a fix for next release which is planned on July 5.

sasha-alias avatar May 11 '17 15:05 sasha-alias

I'll admit that I am not quite following the query that you are using, but to just retrieve the specific variables the current connection is using I think a generic query like this should do it:

SHOW VARIABLES LIKE "version%";

But to list just the ones you want, this works:

SHOW VARIABLES WHERE variable_name IN ('version_comment', 'version', 'version_compile_os', 'version_compile_machine');

However, this returns them as rows with the variable name and value as columns.

Does that help?

n9yty avatar May 11 '17 17:05 n9yty