summaryrefslogtreecommitdiff
path: root/sql/set_var.cc
diff options
context:
space:
mode:
authorunknown <guilhem@mysql.com>2004-03-26 19:25:22 +0100
committerunknown <guilhem@mysql.com>2004-03-26 19:25:22 +0100
commitab8c3d89b8c7c10ccf2b006ea279637e382909a1 (patch)
treed2669c9c03a864d659be52cf9badd23f11b884f1 /sql/set_var.cc
parent11bea84e431101c03ed0f0ccdc57815dd1359d77 (diff)
downloadmariadb-git-ab8c3d89b8c7c10ccf2b006ea279637e382909a1.tar.gz
Changing SET SQL_LOG_BIN so that it explicitely throws an error if
user is not SUPER, instead of setting the value but ignoring it silently internally. mysql-test/r/rpl_temporary.result: result update mysql-test/t/rpl_temporary.test: adding test for privileges for SET SQL_LOG_BIN sql/log.cc: don't need to check SUPER sql/set_var.cc: refuse SET SQL_LOG_BIN if not SUPER sql/sql_insert.cc: Don't need to check SUPER
Diffstat (limited to 'sql/set_var.cc')
-rw-r--r--sql/set_var.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc
index 576e33002da..90e3e82fe02 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -2288,6 +2288,13 @@ static bool set_option_autocommit(THD *thd, set_var *var)
static bool set_log_update(THD *thd, set_var *var)
{
+#ifndef NO_EMBEDDED_ACCESS_CHECKS
+ if (!(thd->master_access & SUPER_ACL))
+ {
+ my_error(ER_SPECIFIC_ACCESS_DENIED_ERROR, MYF(0), "SUPER");
+ return 1;
+ }
+#endif
if (opt_sql_bin_update)
((sys_var_thd_bit*) var->var)->bit_flag|= (OPTION_BIN_LOG |
OPTION_UPDATE_LOG);