summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2005-09-15 22:29:07 +0300
committerunknown <bell@sanja.is.com.ua>2005-09-15 22:29:07 +0300
commit84f029a448fc822f2fa150ab13e61b233b1e4027 (patch)
treefc6da649fdbafccdf434cac04cebe418f638185d /sql/sql_insert.cc
parentfbe338f4b009c8f0057645bdfae9b981a346dbc3 (diff)
downloadmariadb-git-84f029a448fc822f2fa150ab13e61b233b1e4027.tar.gz
WL#2787 (part 2, ver 3 (merged)) changed securety context switching
libmysqld/lib_sql.cc: changed securety context switching mysql-test/r/rpl_sp.result: now it show real information from changed security context of SP (checked) sql/ha_innodb.cc: changed securety context switching sql/item.cc: changed securety context switching sql/item_func.cc: changed securety context switching sql/item_strfunc.cc: changed securety context switching sql/log.cc: changed securety context switching sql/mysql_priv.h: changed securety context switching sql/mysqld.cc: changed securety context switching sql/repl_failsafe.cc: changed securety context switching sql/set_var.cc: changed securety context switching sql/slave.cc: changed securety context switching sql/sp.cc: changed securety context switching sql/sp_head.cc: changed securety context switching in case of inability to switch context we return error now sql/sp_head.h: changed securety context switching sql/sql_acl.cc: changed securety context switching sql/sql_acl.h: changed securety context switching sql/sql_base.cc: changed securety context switching sql/sql_class.cc: changed securety context switching sql/sql_class.h: changed securety context switching sql/sql_db.cc: changed securety context switching sql/sql_insert.cc: changed securety context switching sql/sql_parse.cc: changed securety context switching sql/sql_show.cc: changed securety context switching sql/sql_trigger.cc: changed securety context switching sql/sql_view.cc: changed securety context switching sql/sql_yacc.yy: changed securety context switching
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r--sql/sql_insert.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index f548a917bf8..cc4b291b5d1 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -272,7 +272,8 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
By default, both logs are enabled (this won't cause problems if the server
runs without --log-update or --log-bin).
*/
- bool log_on= (thd->options & OPTION_BIN_LOG) || (!(thd->master_access & SUPER_ACL));
+ bool log_on= (thd->options & OPTION_BIN_LOG) ||
+ (!(thd->security_ctx->master_access & SUPER_ACL));
bool transactional_table;
uint value_count;
ulong counter = 1;
@@ -1264,8 +1265,8 @@ public:
table(0),tables_in_use(0),stacked_inserts(0), status(0), dead(0),
group_count(0)
{
- thd.user=thd.priv_user=(char*) delayed_user;
- thd.host=(char*) my_localhost;
+ thd.security_ctx->user=thd.security_ctx->priv_user=(char*) delayed_user;
+ thd.security_ctx->host=(char*) my_localhost;
thd.current_tablenr=0;
thd.version=refresh_version;
thd.command=COM_DELAYED_INSERT;
@@ -1275,7 +1276,7 @@ public:
bzero((char*) &thd.net, sizeof(thd.net)); // Safety
bzero((char*) &table_list, sizeof(table_list)); // Safety
thd.system_thread= SYSTEM_THREAD_DELAYED_INSERT;
- thd.host_or_ip= "";
+ thd.security_ctx->host_or_ip= "";
bzero((char*) &info,sizeof(info));
pthread_mutex_init(&mutex,MY_MUTEX_INIT_FAST);
pthread_cond_init(&cond,NULL);
@@ -1298,7 +1299,7 @@ public:
pthread_cond_destroy(&cond_client);
thd.unlink(); // Must be unlinked under lock
x_free(thd.query);
- thd.user=thd.host=0;
+ thd.security_ctx->user= thd.security_ctx->host=0;
thread_count--;
delayed_insert_threads--;
VOID(pthread_mutex_unlock(&LOCK_thread_count));