mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge next-mr -> next-4284.
Cherry-pick a fix Bug#37148 from next-mr, to preserve file ids of the added files, and ensure that all the necessary changes have been pulled. Since initially Bug#37148 was null-merged into 6.0, the changeset that is now being cherry-picked was likewise null merged into next-4284. Now that Bug#37148 has been reapplied to 6.0, try to make it work with next-4284. This is also necessary to be able to pull other changes from 5.1-rep into next-4284. To resolve the merge issues use this changeset applied to 6.0: revid:jperkin@sun.com-20091216103628-ylhqf7s6yegui2t9 revno: 3776.1.1 committer: He Zhenxing <zhenxing.he@sun.com> branch nick: 6.0-codebase-bugfixing timestamp: Thu 2009-12-17 17:02:50 +0800 message: Fix merge problem with Bug#37148
This commit is contained in:
@ -59,10 +59,14 @@ injector::transaction::~transaction()
|
||||
my_free(the_memory, MYF(0));
|
||||
}
|
||||
|
||||
/**
|
||||
@retval 0 transaction committed
|
||||
@retval 1 transaction rolled back
|
||||
*/
|
||||
int injector::transaction::commit()
|
||||
{
|
||||
DBUG_ENTER("injector::transaction::commit()");
|
||||
m_thd->binlog_flush_pending_rows_event(true);
|
||||
int error= m_thd->binlog_flush_pending_rows_event(true);
|
||||
/*
|
||||
Cluster replication does not preserve statement or
|
||||
transaction boundaries of the master. Instead, a new
|
||||
@ -88,7 +92,7 @@ int injector::transaction::commit()
|
||||
close_thread_tables(m_thd);
|
||||
m_thd->mdl_context.release_transactional_locks();
|
||||
}
|
||||
DBUG_RETURN(0);
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
|
||||
@ -115,16 +119,16 @@ int injector::transaction::write_row (server_id_type sid, table tbl,
|
||||
record_type record)
|
||||
{
|
||||
DBUG_ENTER("injector::transaction::write_row(...)");
|
||||
|
||||
if (int error= check_state(ROW_STATE))
|
||||
int error= 0;
|
||||
if (error= check_state(ROW_STATE))
|
||||
DBUG_RETURN(error);
|
||||
|
||||
server_id_type save_id= m_thd->server_id;
|
||||
m_thd->set_server_id(sid);
|
||||
m_thd->binlog_write_row(tbl.get_table(), tbl.is_transactional(),
|
||||
cols, colcnt, record);
|
||||
error= m_thd->binlog_write_row(tbl.get_table(), tbl.is_transactional(),
|
||||
cols, colcnt, record);
|
||||
m_thd->set_server_id(save_id);
|
||||
DBUG_RETURN(0);
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
|
||||
@ -134,15 +138,16 @@ int injector::transaction::delete_row(server_id_type sid, table tbl,
|
||||
{
|
||||
DBUG_ENTER("injector::transaction::delete_row(...)");
|
||||
|
||||
if (int error= check_state(ROW_STATE))
|
||||
int error= 0;
|
||||
if (error= check_state(ROW_STATE))
|
||||
DBUG_RETURN(error);
|
||||
|
||||
server_id_type save_id= m_thd->server_id;
|
||||
m_thd->set_server_id(sid);
|
||||
m_thd->binlog_delete_row(tbl.get_table(), tbl.is_transactional(),
|
||||
cols, colcnt, record);
|
||||
error= m_thd->binlog_delete_row(tbl.get_table(), tbl.is_transactional(),
|
||||
cols, colcnt, record);
|
||||
m_thd->set_server_id(save_id);
|
||||
DBUG_RETURN(0);
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
|
||||
@ -152,15 +157,16 @@ int injector::transaction::update_row(server_id_type sid, table tbl,
|
||||
{
|
||||
DBUG_ENTER("injector::transaction::update_row(...)");
|
||||
|
||||
if (int error= check_state(ROW_STATE))
|
||||
int error= 0;
|
||||
if (error= check_state(ROW_STATE))
|
||||
DBUG_RETURN(error);
|
||||
|
||||
server_id_type save_id= m_thd->server_id;
|
||||
m_thd->set_server_id(sid);
|
||||
m_thd->binlog_update_row(tbl.get_table(), tbl.is_transactional(),
|
||||
cols, colcnt, before, after);
|
||||
error= m_thd->binlog_update_row(tbl.get_table(), tbl.is_transactional(),
|
||||
cols, colcnt, before, after);
|
||||
m_thd->set_server_id(save_id);
|
||||
DBUG_RETURN(0);
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user