mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
References lp:1034621 - Merge up to mysql-5.5.25 level
merged codership-mysql/5.5 revisions: bzr diff -r3759..3767 merged codership-mysql/5.5 revisions: bzr diff -r3768..3771
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2000, 2011, Oracle and/or its affiliates.
|
||||
Copyright (c) 2000, 2012, Oracle and/or its affiliates.
|
||||
Copyright (c) 2010, 2012, Monty Program Ab
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -5843,11 +5844,12 @@ void Intvar_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info)
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(HAVE_REPLICATION)&& !defined(MYSQL_CLIENT)
|
||||
|
||||
/*
|
||||
Intvar_log_event::do_apply_event()
|
||||
*/
|
||||
|
||||
#if defined(HAVE_REPLICATION)&& !defined(MYSQL_CLIENT)
|
||||
int Intvar_log_event::do_apply_event(Relay_log_info const *rli)
|
||||
{
|
||||
/*
|
||||
@@ -5856,6 +5858,9 @@ int Intvar_log_event::do_apply_event(Relay_log_info const *rli)
|
||||
*/
|
||||
const_cast<Relay_log_info*>(rli)->set_flag(Relay_log_info::IN_STMT);
|
||||
|
||||
if (rli->deferred_events_collecting)
|
||||
return rli->deferred_events->add(this);
|
||||
|
||||
switch (type) {
|
||||
case LAST_INSERT_ID_EVENT:
|
||||
thd->stmt_depends_on_first_successful_insert_id_in_prev_stmt= 1;
|
||||
@@ -5962,6 +5967,9 @@ int Rand_log_event::do_apply_event(Relay_log_info const *rli)
|
||||
*/
|
||||
const_cast<Relay_log_info*>(rli)->set_flag(Relay_log_info::IN_STMT);
|
||||
|
||||
if (rli->deferred_events_collecting)
|
||||
return rli->deferred_events->add(this);
|
||||
|
||||
thd->rand.seed1= (ulong) seed1;
|
||||
thd->rand.seed2= (ulong) seed2;
|
||||
return 0;
|
||||
@@ -5988,6 +5996,29 @@ Rand_log_event::do_shall_skip(Relay_log_info *rli)
|
||||
return continue_group(rli);
|
||||
}
|
||||
|
||||
/**
|
||||
Exec deferred Int-, Rand- and User- var events prefixing
|
||||
a Query-log-event event.
|
||||
|
||||
@param thd THD handle
|
||||
|
||||
@return false on success, true if a failure in an event applying occurred.
|
||||
*/
|
||||
bool slave_execute_deferred_events(THD *thd)
|
||||
{
|
||||
bool res= false;
|
||||
Relay_log_info *rli= thd->rli_slave;
|
||||
|
||||
DBUG_ASSERT(rli && (!rli->deferred_events_collecting || rli->deferred_events));
|
||||
|
||||
if (!rli->deferred_events_collecting || rli->deferred_events->is_empty())
|
||||
return res;
|
||||
|
||||
res= rli->deferred_events->execute(rli);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
#endif /* !MYSQL_CLIENT */
|
||||
|
||||
|
||||
@@ -6426,6 +6457,10 @@ int User_var_log_event::do_apply_event(Relay_log_info const *rli)
|
||||
{
|
||||
Item *it= 0;
|
||||
CHARSET_INFO *charset;
|
||||
|
||||
if (rli->deferred_events_collecting)
|
||||
return rli->deferred_events->add(this);
|
||||
|
||||
if (!(charset= get_charset(charset_number, MYF(MY_WME))))
|
||||
return 1;
|
||||
LEX_STRING user_var_name;
|
||||
|
Reference in New Issue
Block a user