You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-4805 For functions in the plugin code that disable replication on the
slave threads, we now check for this condition early on in the function block.
This commit is contained in:
@ -2215,6 +2215,9 @@ int ha_mcs_impl_create_(const char* name, TABLE* table_arg, HA_CREATE_INFO* crea
|
||||
#endif
|
||||
THD* thd = current_thd;
|
||||
|
||||
if (thd->slave_thread && !get_replication_slave(thd))
|
||||
return 0;
|
||||
|
||||
char* query = thd->query();
|
||||
|
||||
if (!query)
|
||||
@ -2313,9 +2316,6 @@ int ha_mcs_impl_create_(const char* name, TABLE* table_arg, HA_CREATE_INFO* crea
|
||||
if ( schemaSyncOnly && isCreate)
|
||||
return rc;
|
||||
|
||||
if (thd->slave_thread && !get_replication_slave(thd))
|
||||
return rc;
|
||||
|
||||
//@bug 5660. Error out REAL DDL/DML on slave node.
|
||||
// When the statement gets here, it's NOT SSO or RESTRICT
|
||||
if (ci.isSlaveNode)
|
||||
@ -2529,6 +2529,10 @@ int ha_mcs_impl_delete_table_(const char* db, const char* name, cal_connection_i
|
||||
cout << "ha_mcs_impl_delete_table: " << db << name << endl;
|
||||
#endif
|
||||
THD* thd = current_thd;
|
||||
|
||||
if (thd->slave_thread && !get_replication_slave(thd))
|
||||
return 0;
|
||||
|
||||
char* query = thd->query();
|
||||
|
||||
if (!query)
|
||||
@ -2548,9 +2552,6 @@ int ha_mcs_impl_delete_table_(const char* db, const char* name, cal_connection_i
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (thd->slave_thread && !get_replication_slave(thd))
|
||||
return 0;
|
||||
|
||||
//@bug 5660. Error out REAL DDL/DML on slave node.
|
||||
// When the statement gets here, it's NOT SSO or RESTRICT
|
||||
if (ci.isSlaveNode)
|
||||
@ -2588,6 +2589,10 @@ int ha_mcs_impl_delete_table_(const char* db, const char* name, cal_connection_i
|
||||
int ha_mcs_impl_rename_table_(const char* from, const char* to, cal_connection_info& ci)
|
||||
{
|
||||
THD* thd = current_thd;
|
||||
|
||||
if (thd->slave_thread && !get_replication_slave(thd))
|
||||
return 0;
|
||||
|
||||
string emsg;
|
||||
|
||||
string tblFrom (from+2);
|
||||
@ -2602,9 +2607,6 @@ int ha_mcs_impl_rename_table_(const char* from, const char* to, cal_connection_i
|
||||
|
||||
string stmt;
|
||||
|
||||
if (thd->slave_thread && !get_replication_slave(thd))
|
||||
return 0;
|
||||
|
||||
// This is a temporary table rename, we don't use the temporary table name
|
||||
// so this is a NULL op
|
||||
if (tblFrom.compare(0, 4, "#sql") == 0)
|
||||
|
Reference in New Issue
Block a user