mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
An attempt to fix a sporadic valgrind memory leak in Event Scheduler:
streamline the event worker thread work flow and try to eliminate possibilities for memory corruptions that might have been lurking in previous (complicated) code. This patch: * removes Event_job_data::compile that was never used * cleans up Event_job_data::execute to minimize juggling with thread context and eliminate unneded code paths * Implements Security_context::change/restore_security_context to be able to re-use these methods in all stored programs This is to maybe fix Bug#27733 "Valgrind failures in remove_table_from_cache". Review comments applied.
This commit is contained in:
@ -17,7 +17,6 @@
|
||||
|
||||
|
||||
#define EVEX_GET_FIELD_FAILED -2
|
||||
#define EVEX_COMPILE_ERROR -3
|
||||
#define EVEX_BAD_PARAMS -5
|
||||
#define EVEX_MICROSECOND_UNSUP -6
|
||||
|
||||
@ -169,8 +168,6 @@ public:
|
||||
class Event_job_data : public Event_basic
|
||||
{
|
||||
public:
|
||||
sp_head *sphead;
|
||||
|
||||
LEX_STRING body;
|
||||
LEX_STRING definer_user;
|
||||
LEX_STRING definer_host;
|
||||
@ -178,19 +175,15 @@ public:
|
||||
ulong sql_mode;
|
||||
|
||||
Event_job_data();
|
||||
virtual ~Event_job_data();
|
||||
|
||||
virtual int
|
||||
load_from_row(THD *thd, TABLE *table);
|
||||
|
||||
int
|
||||
bool
|
||||
execute(THD *thd, bool drop);
|
||||
|
||||
int
|
||||
compile(THD *thd, MEM_ROOT *mem_root);
|
||||
private:
|
||||
int
|
||||
get_fake_create_event(String *buf);
|
||||
bool
|
||||
construct_sp_sql(THD *thd, String *sp_sql);
|
||||
|
||||
Event_job_data(const Event_job_data &); /* Prevent use of these */
|
||||
void operator=(Event_job_data &);
|
||||
|
Reference in New Issue
Block a user