distal-attribute
distal-attribute
distal-attribute
distal-attribute

Fetching metadata from wrong schema

cofferma posted 1 year ago in General
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.
cofferma posted 1 year ago
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 posted 1 year ago
Could be I broke things for MySQL while fixing schema handling for MSSQL. Will check.
ansgar posted 1 year ago
Seems related to issue #3266
ansgar posted 1 year ago
r4453 has a fix for this when you open such a view in the data tab.

cofferma posted 1 year ago
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.