Loosing View Formatting

[expired user #12371]'s profile image [expired user #12371] posted 5 years ago in General Permalink

I used to be able to store comments, formatting with a view.

I upgraded heidisql from 9.X to 10.1 and now the formatting is lost on views created or modified with 10.1. Those created with 9.X still have the formatting in the 10.1 editor

Server not upgraded or changed.

How do I fix this? I want to store the formatting.

Thanks, Phill

ansgar's profile image ansgar posted 5 years ago Permalink

MariaDB and MySQL itself are always "forgetting" the original code of a view. So, HeidiSQL has a hackish approach to reload the original code. When you just doubleclicked a view, watch out for such a query:

SELECT CAST(
  LOAD_FILE(
    CONCAT(
      IFNULL(@@GLOBAL.datadir, CONCAT(@@GLOBAL.basedir, 'data/')),
      'yourdatabase/yourview.frm'
    )
  ) AS CHAR CHARACTER SET utf8);

That .frm file normally contains the original code, and Heidi tries to load it.

The only thing I changed here between v9.5 and 10.0 was an encoding fix for issue #61 . You could fire that query by hand and post the result.

[expired user #12371]'s profile image [expired user #12371] posted 5 years ago Permalink

Hi Ansgar

Output below

NULL

Phill

[expired user #12371]'s profile image [expired user #12371] posted 5 years ago Permalink

I tested it on another query that has the formatting still

the output is not null.

[expired user #12371]'s profile image [expired user #12371] posted 5 years ago Permalink

Ok

So I followed that up in the data directory. The second character in the query is a ".". In the frm file name, that was translated to "@002e". I replaced it with a dot and it works.

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