Ads were blocked by your webbrowser.

This is not a problem, but keep in mind that developing HeidiSQL, user support and hosting takes time and money.

You may want to send a donation instead.

Loosing View Formatting

phill@musetech.com.au's profile image phill@musetech.com.au posted 6 months ago in General

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 6 months ago

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.

phill@musetech.com.au's profile image phill@musetech.com.au posted 6 months ago

Hi Ansgar

Output below

NULL

Phill



Ads were blocked by your webbrowser.

This is not a problem, but keep in mind that developing HeidiSQL, user support and hosting takes time and money.

You may want to send a donation instead.
phill@musetech.com.au's profile image phill@musetech.com.au posted 6 months ago

I tested it on another query that has the formatting still

the output is not null.

phill@musetech.com.au's profile image phill@musetech.com.au posted 6 months ago

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.