mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug#24988 FLUSH PRIVILEGES causes brief unavailability
- A race condition caused brief unavailablility when trying to acccess a table. - The variable 'grant_option' was removed to resolve the race condition and to simplify the design pattern. This flag was originally intended to optimize grant checks. sql/mysql_priv.h: - removed 'grant_option' flag. sql/sql_acl.cc: - removed 'grant_option' flag. sql/sql_db.cc: - removed 'grant_option' flag. sql/sql_insert.cc: - removed 'grant_option' flag. sql/sql_parse.cc: - removed 'grant_option' flag. - removed unnecessary variables found_access, found sql/sql_show.cc: - removed 'grant_option' flag. sql/sql_update.cc: - removed 'grant_option' flag. sql/sql_view.cc: - removed 'grant_option' flag.
This commit is contained in:
@ -189,15 +189,12 @@ static int check_insert_fields(THD *thd, TABLE_LIST *table_list,
|
||||
return -1;
|
||||
}
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
if (grant_option)
|
||||
{
|
||||
Field_iterator_table field_it;
|
||||
field_it.set_table(table);
|
||||
if (check_grant_all_columns(thd, INSERT_ACL, &table->grant,
|
||||
table->s->db.str, table->s->table_name.str,
|
||||
&field_it))
|
||||
return -1;
|
||||
}
|
||||
Field_iterator_table field_it;
|
||||
field_it.set_table(table);
|
||||
if (check_grant_all_columns(thd, INSERT_ACL, &table->grant,
|
||||
table->s->db.str, table->s->table_name.str,
|
||||
&field_it))
|
||||
return -1;
|
||||
#endif
|
||||
clear_timestamp_auto_bits(table->timestamp_field_type,
|
||||
TIMESTAMP_AUTO_SET_ON_INSERT);
|
||||
|
Reference in New Issue
Block a user