mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge
include/mysql.h: Auto merged sql/item_strfunc.cc: Auto merged sql/log.cc: Auto merged sql/mysql_priv.h: Auto merged sql/repl_failsafe.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_cache.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_derived.cc: Auto merged sql/sql_insert.cc: Auto merged sql-common/client.c: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_repl.cc: Auto merged sql/sql_show.cc: Auto merged libmysqld/lib_sql.cc: SCCS merged libmysqld/libmysqld.c: SCCS merged sql/sql_parse.cc: SCCS merged
This commit is contained in:
@@ -60,9 +60,11 @@ check_insert_fields(THD *thd,TABLE *table,List<Item> &fields,
|
||||
MYF(0),counter);
|
||||
return -1;
|
||||
}
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
if (grant_option &&
|
||||
check_grant_all_columns(thd,INSERT_ACL,table))
|
||||
return -1;
|
||||
#endif
|
||||
table->time_stamp=0; // This is saved by caller
|
||||
}
|
||||
else
|
||||
@@ -96,7 +98,9 @@ check_insert_fields(THD *thd,TABLE *table,List<Item> &fields,
|
||||
table->time_stamp= table->timestamp_field->offset()+1;
|
||||
}
|
||||
// For the values we need select_priv
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
table->grant.want_privilege=(SELECT_ACL & ~table->grant.privilege);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -130,14 +134,15 @@ 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;
|
||||
}
|
||||
|
||||
/*
|
||||
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
|
||||
@@ -626,7 +631,7 @@ public:
|
||||
group_count(0)
|
||||
{
|
||||
thd.user=thd.priv_user=(char*) delayed_user;
|
||||
thd.host=(char*) localhost;
|
||||
thd.host=(char*) my_localhost;
|
||||
thd.current_tablenr=0;
|
||||
thd.version=refresh_version;
|
||||
thd.command=COM_DELAYED_INSERT;
|
||||
|
Reference in New Issue
Block a user