1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

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
This commit is contained in:
unknown
2005-09-15 22:29:07 +03:00
parent fbe338f4b0
commit 84f029a448
27 changed files with 449 additions and 379 deletions

View File

@ -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));