mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 11:27:39 +02:00
build fixes
sql/event.cc: - make this not unsigned. gcc complains sql/event_timed.cc: acl_getroot_no_password() is not there in libmysqld, disable it's usage in this case. sql/set_var.cc: fix for the broken build of Serg. gcc seems to be pretty happy without the return and returns the value of the last statement
This commit is contained in:
parent
4e2b90b124
commit
ea8a26c6f3
3 changed files with 8 additions and 3 deletions
|
|
@ -1093,6 +1093,7 @@ event_timed::execute(THD *thd, MEM_ROOT *mem_root)
|
|||
DBUG_PRINT("info", ("master_access=%d db_access=%d",
|
||||
thd->security_ctx->master_access, thd->security_ctx->db_access));
|
||||
change_security_context(thd, &save_ctx);
|
||||
|
||||
DBUG_PRINT("info", ("master_access=%d db_access=%d",
|
||||
thd->security_ctx->master_access, thd->security_ctx->db_access));
|
||||
if (mysql_change_db(thd, dbname.str, 0))
|
||||
|
|
@ -1108,6 +1109,7 @@ event_timed::execute(THD *thd, MEM_ROOT *mem_root)
|
|||
ret= -99;
|
||||
}
|
||||
restore_security_context(thd, save_ctx);
|
||||
|
||||
DBUG_PRINT("info", ("master_access=%d db_access=%d",
|
||||
thd->security_ctx->master_access, thd->security_ctx->db_access));
|
||||
|
||||
|
|
@ -1145,6 +1147,7 @@ event_timed::change_security_context(THD *thd, Security_context **backup)
|
|||
{
|
||||
DBUG_ENTER("event_timed::change_security_context");
|
||||
DBUG_PRINT("info",("%s@%s@%s",definer_user.str,definer_host.str, dbname.str));
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
*backup= 0;
|
||||
if (acl_getroot_no_password(&sphead->m_security_ctx, definer_user.str,
|
||||
definer_host.str, definer_host.str, dbname.str))
|
||||
|
|
@ -1154,7 +1157,7 @@ event_timed::change_security_context(THD *thd, Security_context **backup)
|
|||
}
|
||||
*backup= thd->security_ctx;
|
||||
thd->security_ctx= &sphead->m_security_ctx;
|
||||
|
||||
#endif
|
||||
DBUG_RETURN(FALSE);
|
||||
}
|
||||
|
||||
|
|
@ -1171,8 +1174,10 @@ void
|
|||
event_timed::restore_security_context(THD *thd, Security_context *backup)
|
||||
{
|
||||
DBUG_ENTER("event_timed::change_security_context");
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
if (backup)
|
||||
thd->security_ctx= backup;
|
||||
#endif
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue