diff options
author | unknown <tomas@whalegate.ndb.mysql.com> | 2007-04-12 16:13:49 +0200 |
---|---|---|
committer | unknown <tomas@whalegate.ndb.mysql.com> | 2007-04-12 16:13:49 +0200 |
commit | f3d010f734631f19b2ffe008086fc973d131b350 (patch) | |
tree | d1938f8f41dd5cbfc88c3c10ed0f11b6d582aecc /sql/rpl_injector.cc | |
parent | e36bbbef804cee6586d9e1d2c7645e196bece730 (diff) | |
download | mariadb-git-f3d010f734631f19b2ffe008086fc973d131b350.tar.gz |
Bug#17095 circular replication for ndb
- test case
- reset server id in injector
client/mysqltest.c:
save master pos for ndb should look at handled epoch instead of applied
sql/rpl_injector.cc:
Bug#17095 circular replication for ndb
- reset server id in injector
mysql-test/r/rpl_ndb_circular.result:
New BitKeeper file ``mysql-test/r/rpl_ndb_circular.result''
mysql-test/t/rpl_ndb_circular.test:
New BitKeeper file ``mysql-test/t/rpl_ndb_circular.test''
Diffstat (limited to 'sql/rpl_injector.cc')
-rw-r--r-- | sql/rpl_injector.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/rpl_injector.cc b/sql/rpl_injector.cc index b66f0b1c7c1..aa3020c42be 100644 --- a/sql/rpl_injector.cc +++ b/sql/rpl_injector.cc @@ -75,9 +75,11 @@ int injector::transaction::use_table(server_id_type sid, table tbl) if ((error= check_state(TABLE_STATE))) DBUG_RETURN(error); + server_id_type save_id= m_thd->server_id; m_thd->set_server_id(sid); error= m_thd->binlog_write_table_map(tbl.get_table(), tbl.is_transactional()); + m_thd->set_server_id(save_id); DBUG_RETURN(error); } @@ -91,9 +93,11 @@ int injector::transaction::write_row (server_id_type sid, table tbl, if (int 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); + m_thd->set_server_id(save_id); DBUG_RETURN(0); } @@ -107,9 +111,11 @@ int injector::transaction::delete_row(server_id_type sid, table tbl, if (int 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); + m_thd->set_server_id(save_id); DBUG_RETURN(0); } @@ -123,9 +129,11 @@ int injector::transaction::update_row(server_id_type sid, table tbl, if (int 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); + m_thd->set_server_id(save_id); DBUG_RETURN(0); } |