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

View Formatting

User, date Message
Written by jsdeter
2 years ago
Category: General
5 posts since Thu, 05 Jan 12
Question on the display of a view in HeidiSQL. I have a root account with global permissions and I can see the view fully formatted and looking just as entered.

When I create a new user account with minimal permissions, that account sees the view as a single string. Ctrl-F8 does format it but not the way it was entered and not the way I see the view.

Question, what setting is there to allow the view to be observed fully? I suspect this isn't a HeidiSQL question but rather a MySQL question but I thought I'd give it a shot anyways.

Thanks in advance
Written by ansgar
2 years ago
4936 posts since Fri, 07 Apr 06
The original VIEW code is fetched using a LOAD_FILE command on the servers data directory:

SELECT LOAD_FILE(CONCAT(IFNULL(@@GLOBAL.datadir, CONCAT(@@GLOBAL.basedir, 'data/')), 'mydb/myview.frm'));



But if this does not return something, the VIEW code is taken from SHOW CREATE VIEW, and if that fails the code is put together from pieces in information_schema.VIEWS.

The LOAD_FILE command needs global FILE privileges I guess.
Written by jsdeter
2 years ago
5 posts since Thu, 05 Jan 12
You have correctly identified the issue and required fix. By granting FILE permission, the view format structure is preserved.

Thanks
 

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