When we are working with tables_priv we need to first get a downcased array of the currently set privileges, and a downcased array of the desired permissions.
Then we make a list of the permissions to revoke by subtracting the requested permissions from the currently set ones.
If the list of permissions to revoke is not empty, then we issue a REVOKE.
Then we make a list of the permissions to add by subtracting the requested permissions from the current set (no need to add select again if it is already there).
Then if the set of permissions to add is not empty, then we actually execute the statement.
To handle this, this comment removes the create_row for table_privs, it also selects the actual value of the Table_priv so its value can be used instead of the method that is used for Y/N value settings