summaryrefslogtreecommitdiff
path: root/sql/set_var.h
diff options
context:
space:
mode:
authorMats Kindahl <mats@mysql.com>2008-09-09 12:19:31 +0200
committerMats Kindahl <mats@mysql.com>2008-09-09 12:19:31 +0200
commit589355f0f58dc91d0c2f779f1a66bc22f87ed5a2 (patch)
treebe9348fb54b6b3c1f6105737dacb45e7fae2e7c1 /sql/set_var.h
parent8fb46a3d13365bd2c533a5d41fe4ce02f4640576 (diff)
downloadmariadb-git-589355f0f58dc91d0c2f779f1a66bc22f87ed5a2.tar.gz
Bug #39106:
SUPER is not required to change binlog format for session A user without SUPER privileges can change the value of the session variable BINLOG_FORMAT, causing problems for a DBA. This changeset requires a user to have SUPER privileges to change the value of the session variable BINLOG_FORMAT, and not only the global variable BINLOG_FORMAT. mysql-test/suite/binlog/t/binlog_grant.test: Adding test to test grants needed for SQL_LOG_BIN and BINLOG_FORMAT. sql/set_var.cc: Adding code to check that user has SUPER permission needed to change the value of BINLOG_FORMAT. sql/set_var.h: Adding function sys_var_thd_binlog_format::check()
Diffstat (limited to 'sql/set_var.h')
-rw-r--r--sql/set_var.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/set_var.h b/sql/set_var.h
index 603c3114d0e..8ae97c6502d 100644
--- a/sql/set_var.h
+++ b/sql/set_var.h
@@ -1126,6 +1126,7 @@ public:
&binlog_format_typelib,
fix_binlog_format_after_update)
{};
+ bool check(THD *thd, set_var *var);
bool is_readonly() const;
};