Commit 4845193d authored by unknown's avatar unknown
Browse files

Porting back security fix from 4.0.

All tests plus grant.pl test passed.

parent 6f19b986
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1878,7 +1878,8 @@ insert_fields(THD *thd,TABLE_LIST *tables, const char *db_name,
  for (; tables ; tables=tables->next)
  {
    TABLE *table=tables->table;
    if (grant_option && !thd->master_access &&
    if (grant_option && !(table->grant.privilege &
			  table->grant.want_privilege) &&
	check_grant_all_columns(thd,SELECT_ACL,table))
      DBUG_RETURN(-1);
    if (!table_name || (!strcmp(table_name,tables->alias) &&