Removing one fix.

parent 833e3db2
...@@ -2038,7 +2038,7 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list, ...@@ -2038,7 +2038,7 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list,
check->column.c_ptr(), table_list->alias); check->column.c_ptr(), table_list->alias);
DBUG_RETURN(-1); DBUG_RETURN(-1);
} }
column_priv |= check->rights & COL_ACLS; column_priv |= check->rights | (rights & COL_ACLS);
} }
close_thread_tables(thd); close_thread_tables(thd);
} }
...@@ -2173,12 +2173,7 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list, ...@@ -2173,12 +2173,7 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list,
} }
else else
{ {
/* column_priv|= grant_table->cols;
This code makes sure that if there is X privilege on the entire table and
X can be also a column privilege, that granting column privilege does not
revoke a table privilege.
*/
column_priv&= ~(grant_table->privs & ~grant_table->cols);
} }
...@@ -2191,13 +2186,13 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list, ...@@ -2191,13 +2186,13 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list,
{ // Crashend table ?? { // Crashend table ??
result= -1; /* purecov: deadcode */ result= -1; /* purecov: deadcode */
} }
else if (tables[2].table && (column_priv | revoke_grant)) else if (tables[2].table)
{ {
if ((replace_column_table(grant_table,tables[2].table, *Str, if ((replace_column_table(grant_table,tables[2].table, *Str,
columns, columns,
table_list->db, table_list->db,
table_list->real_name, table_list->real_name,
(revoke_grant) ? rights : column_priv, revoke_grant))) rights, revoke_grant)))
{ {
result= -1; result= -1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment