1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Fix for bug #6116 "SET time_zone := ... requires access to

mysql.time_zone* tables".

We are excluding implicitly used time zone tables from privilege
checking.
This commit is contained in:
dlenev@brandersnatch.localdomain
2004-10-21 22:18:00 +04:00
parent e9fde8f54e
commit e6a44b719a
5 changed files with 85 additions and 1 deletions

View File

@ -3724,7 +3724,10 @@ check_table_access(THD *thd, ulong want_access,TABLE_LIST *tables,
TABLE_LIST *org_tables=tables;
for (; tables ; tables=tables->next)
{
if (tables->derived || (tables->table && (int)tables->table->tmp_table))
if (tables->derived ||
(tables->table && (int)tables->table->tmp_table) ||
my_tz_check_n_skip_implicit_tables(&tables,
thd->lex->time_zone_tables_used))
continue;
if ((thd->master_access & want_access) == (want_access & ~EXTRA_ACL) &&
thd->db)