Commit ea8a26c6 authored by unknown's avatar unknown

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
parent 4e2b90b1
......@@ -1239,7 +1239,7 @@ int db_drop_event(THD *thd, event_timed *et, bool drop_if_exists,
{
TABLE *table;
Open_tables_state backup;
uint ret;
int ret;
DBUG_ENTER("db_drop_event");
ret= EVEX_OPEN_TABLE_FAILED;
......
......@@ -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;
}
......
......@@ -3488,7 +3488,7 @@ byte *sys_var_thd_dbug::value_ptr(THD *thd, enum_var_type type, LEX_STRING *b)
DBUG_EXPLAIN_INITIAL(buf, sizeof(buf));
else
DBUG_EXPLAIN(buf, sizeof(buf));
(byte*) thd->strdup(buf);
return (byte*) thd->strdup(buf);
}
/****************************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment