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

Merge 10.3 into 10.4

This commit is contained in:
Marko Mäkelä
2018-08-16 10:08:30 +03:00
335 changed files with 7445 additions and 2293 deletions

View File

@ -1284,7 +1284,11 @@ Event_job_data::construct_sp_sql(THD *thd, String *sp_sql)
*/
sp_sql->append(STRING_WITH_LEN("() SQL SECURITY INVOKER "));
if (thd->variables.sql_mode & MODE_ORACLE)
sp_sql->append(STRING_WITH_LEN(" AS BEGIN "));
sp_sql->append(&body);
if (thd->variables.sql_mode & MODE_ORACLE)
sp_sql->append(STRING_WITH_LEN("; END"));
DBUG_RETURN(thd->is_fatal_error);
}
@ -1387,9 +1391,6 @@ Event_job_data::execute(THD *thd, bool drop)
goto end;
}
if (construct_sp_sql(thd, &sp_sql))
goto end;
/*
Set up global thread attributes to reflect the properties of
this Event. We can simply reset these instead of usual
@ -1401,6 +1402,9 @@ Event_job_data::execute(THD *thd, bool drop)
thd->variables.sql_mode= sql_mode;
thd->variables.time_zone= time_zone;
if (construct_sp_sql(thd, &sp_sql))
goto end;
thd->set_query(sp_sql.c_ptr_safe(), sp_sql.length());
{