summaryrefslogtreecommitdiff
path: root/sql/mysql_priv.h
diff options
context:
space:
mode:
authorunknown <dlenev@brandersnatch.localdomain>2004-12-09 13:31:46 +0300
committerunknown <dlenev@brandersnatch.localdomain>2004-12-09 13:31:46 +0300
commit9ad51c631c7ef6d5ed4bea0b6171a98502844c81 (patch)
treec0a62a11e69bc638b292d33dcb38fe1b5c82194d /sql/mysql_priv.h
parentb0d586e5648e78981c63e68059c6c836a228a082 (diff)
downloadmariadb-git-9ad51c631c7ef6d5ed4bea0b6171a98502844c81.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. mysql-test/r/timezone2.result: Extended test for bug #6116 "SET time_zone := ... requires access to mysql.time_zone tables" Added test for bug #6765 "Implicit access to time zone description tables requires privileges for them if some table or column level grants present" mysql-test/t/timezone2.test: Extended test for bug #6116 "SET time_zone := ... requires access to mysql.time_zone tables" Added test for bug #6765 "Implicit access to time zone description tables requires privileges for them if some table or column level grants present" sql/item_geofunc.cc: sql_acl.h is now included via mysql_priv.h sql/item_strfunc.cc: sql_acl.h is now included via mysql_priv.h sql/log.cc: sql_acl.h is now included via mysql_priv.h sql/mysql_priv.h: Now we have to include sql_acl.h before tztime.h, since my_tz_check_n_skip_implicit_tables() defined there requires SELECT_ACL constant defined in sql_acl.h. sql/mysqld.cc: sql_acl.h is now included via mysql_priv.h sql/repl_failsafe.cc: sql_acl.h is now included via mysql_priv.h sql/set_var.cc: sql_acl.h is now included via mysql_priv.h sql/sql_acl.cc: sql_acl.h is now included via mysql_priv.h sql/sql_base.cc: sql_acl.h is now included via mysql_priv.h sql/sql_cache.cc: sql_acl.h is now included via mysql_priv.h sql/sql_class.cc: sql_acl.h is now included via mysql_priv.h sql/sql_db.cc: sql_acl.h is now included via mysql_priv.h sql/sql_derived.cc: sql_acl.h is now included via mysql_priv.h sql/sql_do.cc: sql_acl.h is now included via mysql_priv.h sql/sql_insert.cc: sql_acl.h is now included via mysql_priv.h sql/sql_parse.cc: check_one_table_access(): Tweaked comments. multi_update_precheck(): Added skipping of implicitly opened tables during privilege checking. sql/sql_prepare.cc: sql_acl.h is now included via mysql_priv.h sql/sql_repl.cc: sql_acl.h is now included via mysql_priv.h sql/sql_show.cc: sql_acl.h is now included via mysql_priv.h sql/sql_update.cc: sql_acl.h is now included via mysql_priv.h sql/sql_yacc.yy: sql_acl.h is now included via mysql_priv.h sql/tztime.h: my_tz_check_n_skip_implicit_tables(): We should set SELECT_ACL for implictly opened tables to be able to bypass privilege checking in check_grant().
Diffstat (limited to 'sql/mysql_priv.h')
-rw-r--r--sql/mysql_priv.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index 3f55a88b262..46f47e51b6d 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -350,7 +350,6 @@ inline THD *_current_thd(void)
#include "sql_udf.h"
class user_var_entry;
#include "item.h"
-#include "tztime.h"
typedef Comp_creator* (*chooser_compare_func_creator)(bool invert);
/* sql_parse.cc */
void free_items(Item *item);
@@ -371,6 +370,8 @@ int create_table_precheck(THD *thd, TABLE_LIST *tables,
TABLE_LIST *create_table);
Item *negate_expression(THD *thd, Item *expr);
#include "sql_class.h"
+#include "sql_acl.h"
+#include "tztime.h"
#include "opt_range.h"
#ifdef HAVE_QUERY_CACHE