summaryrefslogtreecommitdiff
path: root/sql/tztime.h
diff options
context:
space:
mode:
authordlenev@brandersnatch.localdomain <>2004-12-09 13:31:46 +0300
committerdlenev@brandersnatch.localdomain <>2004-12-09 13:31:46 +0300
commit4b0882e0a6ad63c99353856f830b5f3db8c0b899 (patch)
treec0a62a11e69bc638b292d33dcb38fe1b5c82194d /sql/tztime.h
parent19dab11881e900c9e79db570b2f6456f67aa23fb (diff)
downloadmariadb-git-4b0882e0a6ad63c99353856f830b5f3db8c0b899.tar.gz
Fix for bug #6765 "Implicit access to time zone description
tables requires privileges for them if some table or column level grants present" (with after-review fixes). We should set SELECT_ACL for implicitly opened tables in my_tz_check_n_skip_implicit_tables() to be able to bypass privilege checking in check_grant(). Also we should exclude those tables from privilege checking in multi-update.
Diffstat (limited to 'sql/tztime.h')
-rw-r--r--sql/tztime.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/tztime.h b/sql/tztime.h
index 9f969639bd0..2214c1b29d6 100644
--- a/sql/tztime.h
+++ b/sql/tztime.h
@@ -66,8 +66,8 @@ extern void my_tz_free();
/*
- Check if we have pointer to the beggining of list of implictly used
- time zone tables and fast-forward to its end.
+ Check if we have pointer to the begining of list of implicitly used time
+ zone tables, set SELECT_ACL for them and fast-forward to its end.
SYNOPSIS
my_tz_check_n_skip_implicit_tables()
@@ -87,6 +87,8 @@ inline bool my_tz_check_n_skip_implicit_tables(TABLE_LIST **table,
{
if (*table == tz_tables)
{
+ for (int i= 0; i < 4; i++)
+ (*table)[i].grant.privilege= SELECT_ACL;
(*table)+= 3;
return TRUE;
}