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

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''
This commit is contained in:
unknown
2007-04-12 16:13:49 +02:00
parent e36bbbef80
commit f3d010f734
4 changed files with 163 additions and 3 deletions

View File

@ -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);
}