Fetching metadata from wrong schema

[expired user #7045]'s profile image [expired user #7045] posted 11 years ago in General Permalink
To support analytics we have created a new 'spotfire' schema we are filling with views on the tables in our main 'de_ie_cm' schema.
As developers we use a db user that has full rights to both schemas.
When we list the data of a view in the 'spotfire' schema with HeidiSQL after fetching the data HeidiSQL is trying to fetch meta data (probably the record count) from the wrong schema which causes an SQL error; see below:

SELECT CURRENT_USER();
SELECT `nc12` FROM `spotfire`.`rcp_critical_part` LIMIT 1000;
SELECT `DEFAULT_COLLATION_NAME` FROM `information_schema`.`SCHEMATA` WHERE `SCHEMA_NAME`='de_ie_cm';
SHOW TABLE STATUS FROM `de_ie_cm`;
SHOW FUNCTION STATUS WHERE `Db`='de_ie_cm';
SHOW PROCEDURE STATUS WHERE `Db`='de_ie_cm';
SHOW TRIGGERS FROM `de_ie_cm`;
SHOW EVENTS FROM `de_ie_cm`;
SHOW CREATE TABLE `de_ie_cm`.`rcp_critical_part`;
/* SQL Error (1146): Table 'de_ie_cm.rcp_critical_part' doesn't exist */
/* Data in this table will be read-only. */

The connection used specifies using the 'spotfire' schema but it tries to get data about the view from the 'de_ie_cm' schema instead.

Any idea what is causing this and how we can prevent this happening?

I am using HeidiSQL 8.0.0.4396 on Windows 7 but the same happens on HeidiSQL 7.
[expired user #7045]'s profile image [expired user #7045] posted 11 years ago Permalink
Just tried the newest version: 8.0.0.4452. This version makes things worse. It crashes upon opening the data tab on one of these views. Continueing the application is no option. After the crash the data tab remains non-functioning.
ansgar's profile image ansgar posted 11 years ago Permalink
Could be I broke things for MySQL while fixing schema handling for MSSQL. Will check.
ansgar's profile image ansgar posted 11 years ago Permalink
Seems related to issue #3266
ansgar's profile image ansgar posted 11 years ago Permalink
r4453 has a fix for this when you open such a view in the data tab.
[expired user #7045]'s profile image [expired user #7045] posted 11 years ago Permalink
I have installed r4453 and it indeed solves this problem.
Thanks for this fast fix ansgar!

I am liking the new alternating row colors too.

Please login to leave a reply, or register at first.