mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
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
This commit is contained in:
@@ -134,15 +134,10 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list,
|
||||
thd->lex->select_lex.table_list.first;
|
||||
DBUG_ENTER("mysql_insert");
|
||||
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
if (thd->master_access & SUPER_ACL)
|
||||
#endif
|
||||
{
|
||||
if (!(thd->options & OPTION_UPDATE_LOG))
|
||||
log_on&= ~(int) DELAYED_LOG_UPDATE;
|
||||
if (!(thd->options & OPTION_BIN_LOG))
|
||||
log_on&= ~(int) DELAYED_LOG_BIN;
|
||||
}
|
||||
if (!(thd->options & OPTION_UPDATE_LOG))
|
||||
log_on&= ~(int) DELAYED_LOG_UPDATE;
|
||||
if (!(thd->options & OPTION_BIN_LOG))
|
||||
log_on&= ~(int) DELAYED_LOG_BIN;
|
||||
/*
|
||||
in safe mode or with skip-new change delayed insert to be regular
|
||||
if we are told to replace duplicates, the insert cannot be concurrent
|
||||
|
Reference in New Issue
Block a user