1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-3674: Fix row-based replication detection

Changed the row-based repl detection mechanism so stmt-based repl works
again, however, the detection mechanism is still wrong somehow.  What it
should be is currently unknown.
This commit is contained in:
Patrick LeBlanc
2019-12-17 13:15:58 -05:00
parent 451284aeee
commit e02302908b
2 changed files with 11 additions and 11 deletions

View File

@ -1265,7 +1265,7 @@ uint32_t doUpdateDelete(THD* thd, gp_walk_info& gwi)
if (((thd->lex)->sql_command == SQLCOM_UPDATE) || ((thd->lex)->sql_command == SQLCOM_UPDATE_MULTI)) if (((thd->lex)->sql_command == SQLCOM_UPDATE) || ((thd->lex)->sql_command == SQLCOM_UPDATE_MULTI))
args.add("Update"); args.add("Update");
else if (thd->get_command() == COM_SLAVE_SQL) else if (thd->rgi_slave && thd->rgi_slave->m_table_map.count() != 0)
args.add("Row based replication event"); args.add("Row based replication event");
else else
args.add("Delete"); args.add("Delete");
@ -1570,7 +1570,7 @@ uint32_t doUpdateDelete(THD* thd, gp_walk_info& gwi)
} }
} }
} }
else if (thd->get_command() == COM_SLAVE_SQL) else if (thd->rgi_slave && thd->rgi_slave->m_table_map.count() != 0)
{ {
string emsg = logging::IDBErrorInfo::instance()->errorMsg(ERR_RBR_EVENT); string emsg = logging::IDBErrorInfo::instance()->errorMsg(ERR_RBR_EVENT);
setError(current_thd, ER_CHECK_NOT_IMPLEMENTED, emsg); setError(current_thd, ER_CHECK_NOT_IMPLEMENTED, emsg);
@ -2349,7 +2349,7 @@ int ha_mcs_impl_rnd_init(TABLE* table)
thd->lex->sql_command == SQLCOM_LOAD)) thd->lex->sql_command == SQLCOM_LOAD))
return 0; return 0;
if (thd->slave_thread && thd->get_command() == COM_SLAVE_SQL) if (thd->rgi_slave && thd->rgi_slave->m_table_map.count() != 0)
{ {
string emsg = logging::IDBErrorInfo::instance()->errorMsg(ERR_RBR_EVENT); string emsg = logging::IDBErrorInfo::instance()->errorMsg(ERR_RBR_EVENT);
setError(current_thd, ER_CHECK_NOT_IMPLEMENTED, emsg); setError(current_thd, ER_CHECK_NOT_IMPLEMENTED, emsg);

View File

@ -72,6 +72,7 @@ template <class T> bool isnan(T);
#include "tztime.h" #include "tztime.h"
#include "derived_handler.h" #include "derived_handler.h"
#include "select_handler.h" #include "select_handler.h"
#include "rpl_rli.h"
// Now clean up the pollution as best we can... // Now clean up the pollution as best we can...
#undef min #undef min
@ -113,4 +114,3 @@ inline char* idb_mysql_query_str(THD* thd)
#endif #endif
// vim:ts=4 sw=4: // vim:ts=4 sw=4: