diff options
author | bell@sanja.is.com.ua <> | 2005-09-15 22:29:07 +0300 |
---|---|---|
committer | bell@sanja.is.com.ua <> | 2005-09-15 22:29:07 +0300 |
commit | aec371f910c56f03ca108439a1b5d449b1bd9dc3 (patch) | |
tree | fc6da649fdbafccdf434cac04cebe418f638185d /sql/sql_insert.cc | |
parent | a9b3767874eea19ab146404a199ba2927e013b1e (diff) | |
download | mariadb-git-aec371f910c56f03ca108439a1b5d449b1bd9dc3.tar.gz |
WL#2787 (part 2, ver 3 (merged)) changed securety context switching
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 11 |
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)); |