Commit ccd0c39c authored by Vicențiu Ciorbaru's avatar Vicențiu Ciorbaru Committed by Sergei Golubchik

Fixed crash caused by dereferencing null pointer. The comparison is no longer necessary there.

parent 84a2f06f
......@@ -5469,11 +5469,10 @@ bool check_grant(THD *thd, ulong want_access, TABLE_LIST *tables,
if (!(~tl->grant.privilege & want_access))
continue;
if (want_access & ~((grant_table ? grant_table->cols : 0) |
if ((want_access&= ~((grant_table ? grant_table->cols : 0) |
(grant_table_role ? grant_table_role->cols : 0) |
tl->grant.privilege))
tl->grant.privilege)))
{
want_access &= ~(grant_table->cols | tl->grant.privilege);
goto err; // impossible
}
}
......
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