summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
authorunknown <andrey@lmy004.>2006-07-13 12:19:01 +0200
committerunknown <andrey@lmy004.>2006-07-13 12:19:01 +0200
commit6327adebcb125b534262ac885e1cf6a5e5896d91 (patch)
tree62d284e4a3e13fdbb400dbd8dff1a941ba6d6cae /sql/sql_class.cc
parent31caa8c433ace692ea5f31c2c2ae0d872533e8de (diff)
downloadmariadb-git-6327adebcb125b534262ac885e1cf6a5e5896d91.tar.gz
WL #3337 (Event scheduler new architecture)
move back THD::change_security_context to event_change_security_context sql/event_data_objects.cc: move THD::change_security_context to event_change_security_context sql/sql_class.cc: move THD::change_security_context to event_change_security_context sql/sql_class.h: move THD::change_security_context to event_change_security_context
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc58
1 files changed, 0 insertions, 58 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 6ce5a8fa01d..1b41a6d1aca 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -2068,64 +2068,6 @@ bool Security_context::set_user(char *user_arg)
return user == 0;
}
-/*
- Switches the security context
- SYNOPSIS
- THD::change_security_context()
- user The user
- host The host of the user
- db The schema for which the security_ctx will be loaded
- s_ctx Security context to load state into
- backup Where to store the old context
-
- RETURN VALUE
- FALSE OK
- TRUE Error (generates error too)
-*/
-
-bool
-THD::change_security_context(LEX_STRING user, LEX_STRING host,
- LEX_STRING db, Security_context *backup)
-{
- DBUG_ENTER("change_security_context");
- DBUG_PRINT("info",("%s@%s@%s", user.str, host.str, db.str));
-#ifndef NO_EMBEDDED_ACCESS_CHECKS
-
- *backup= main_security_ctx;
- if (acl_getroot_no_password(&main_security_ctx, user.str, host.str, host.str,
- db.str))
- {
- my_error(ER_NO_SUCH_USER, MYF(0), user.str, host.str);
- DBUG_RETURN(TRUE);
- }
- security_ctx= &main_security_ctx;
-#endif
- DBUG_RETURN(FALSE);
-}
-
-
-/*
- Restores the security context
- SYNOPSIS
- restore_security_context()
- thd Thread
- backup Context to switch to
-*/
-
-void
-THD::restore_security_context(Security_context *backup)
-{
- DBUG_ENTER("restore_security_context");
-#ifndef NO_EMBEDDED_ACCESS_CHECKS
- if (backup)
- {
- main_security_ctx= *backup;
- security_ctx= &main_security_ctx;
- }
-#endif
- DBUG_VOID_RETURN;
-}
-
/****************************************************************************
Handling of open and locked tables states.