Can not REVOKE specific column permission, cause User Manager generate wrong SQL

hatsadin09's profile image hatsadin09 posted 2 years ago in General Permalink

I can grant users privileges with specific columns via User Manager. But when I try to revoke it has error SQL Error (1147): There is no such grant defined for user 'user' on host '%' on table 'table'

And show this SQL in the console.

REVOKE UPDATE(```id```), REFERENCES(```id```)  ON TABLE `table`.`column` FROM 'user'@'%';
/* SQL Error (1147): There is no such grant defined for user 'user' on host '%' on table 'table' */

I tried to copy this SQL and change triple backticks to one backtick, it's work !!

REVOKE UPDATE(`id`), REFERENCES(`id`) ON TABLE `table`.`column` FROM 'user'@'%';

How can I fix this User Manager's auto-generate SQL?

re-install whole system is my last choice : (

1 attachment(s):
  • Capture
ansgar's profile image ansgar posted 2 years ago Permalink

This is surely a bug in HeidiSQL. If you tell me the server version I can probably fix it in the user manager.

Code modification/commit f4a41cd from Ansgar Becker <anse@heidisql.com>, 2 years ago, revision 12.5.0.6684
Unquote column names from user GRANT before displaying them. Saving the GRANT quotes it again. See https://www.heidisql.com/forum.php?t=41140
hatsadin09's profile image hatsadin09 posted 2 years ago Permalink

This is surely a bug in HeidiSQL. If you tell me the server version I can probably fix it in the user manager.

My server is MariaDB

Server version: 10.6.14-MariaDB-1:10.6.14+maria~deb11-log mariadb.org binary distribution

I already saw the commit. Waiting for the next update. 🤩

hatsadin09's profile image hatsadin09 posted 2 years ago Permalink

My server is MariaDB

Server version: 10.6.14-MariaDB-1:10.6.14+maria~deb11-log mariadb.org binary distribution

I already saw the commit. Waiting for the next update. 🤩

Tested. PASS!

Not generate triple backticks at all. Thank you.

ansgar's profile image ansgar posted 2 years ago Permalink

I was indeed blindly fixing this, so thanks for testing!

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