Loosing View Formatting

phill@musetech.com.au posted 3 weeks 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 posted 3 weeks 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:

      IFNULL(@@GLOBAL.datadir, CONCAT(@@GLOBAL.basedir, 'data/')),

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 posted 3 weeks ago

Hi Ansgar

Output below



phill@musetech.com.au posted 3 weeks ago

I tested it on another query that has the formatting still

the output is not null.

phill@musetech.com.au posted 3 weeks ago


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.