1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-12-21 13:40:58 +03:00

Merge pull request #996 from LinuxJedi/MCOL-3702b

MCOL-3702 Fix replication config file changes
This commit is contained in:
Patrick LeBlanc
2020-01-03 09:31:35 -06:00
committed by GitHub
4 changed files with 12 additions and 5 deletions

View File

@@ -16,6 +16,7 @@ plugin-load-add=ha_columnstore.so
# Required for Schema Sync # Required for Schema Sync
#server-id = 1 #server-id = 1
#log_bin
# Uncomment for this UM to apply slave DML on ColumnStore tables # Uncomment for this UM to apply slave DML on ColumnStore tables
#columnstore_replication_slave=ON #columnstore_replication_slave=ON

View File

@@ -50,7 +50,7 @@ cat >${tmpdir}/mariadb-command-line.sql <<EOD
$command; $command;
EOD EOD
cat${tmpdir}/mariadb-command-line.sql >> ${tmpdir}/mariadb-command-line.log cat ${tmpdir}/mariadb-command-line.sql >> ${tmpdir}/mariadb-command-line.log
mysql \ mysql \
--user=root \ --user=root \
calpontsys < ${tmpdir}/mariadb-command-line.sql >> ${tmpdir}/mariadb-command-line.log 2>&1 calpontsys < ${tmpdir}/mariadb-command-line.sql >> ${tmpdir}/mariadb-command-line.log 2>&1

View File

@@ -411,7 +411,7 @@ int sendReplicationRequest(int IserverTypeInstall, std::string password, bool pm
if ( returnStatus != API_SUCCESS) if ( returnStatus != API_SUCCESS)
{ {
cout << endl << "ERROR: Error return in running the MariaDB ColumnStore Master replication, check " + tmpDir + "master-rep*.logs on " << masterModule << endl; cout << endl << "ERROR: Error return in running the MariaDB ColumnStore Master replication, check " + tmpDir + "/master-rep*.logs on " << masterModule << endl;
return returnStatus; return returnStatus;
} }

View File

@@ -4804,6 +4804,12 @@ int ProcessMonitor::changeMyCnf(std::string type)
} }
} }
pos = buf.find("log_bin", 0);
if ( pos != string::npos )
{
buf = "log_bin";
}
// set local query flag if on pm // set local query flag if on pm
if ( (PMwithUM == "y") && config.moduleType() == "pm" ) if ( (PMwithUM == "y") && config.moduleType() == "pm" )
{ {
@@ -4870,13 +4876,12 @@ int ProcessMonitor::changeMyCnf(std::string type)
system(cmd.c_str()); system(cmd.c_str());
// restart mysql // restart mysql
/* try { try {
oam.actionMysqlCalpont(MYSQL_RESTART); oam.actionMysqlCalpont(MYSQL_RESTART);
sleep(5); // give after mysql restart sleep(5); // give after mysql restart
} }
catch(...) catch(...)
{} {}
*/
log.writeLog(__LINE__, "changeMyCnf function successfully completed", LOG_TYPE_DEBUG); log.writeLog(__LINE__, "changeMyCnf function successfully completed", LOG_TYPE_DEBUG);
return oam::API_SUCCESS; return oam::API_SUCCESS;
@@ -5076,10 +5081,11 @@ int ProcessMonitor::runMasterRep(std::string& masterLogFile, std::string& master
while (file.getline(line, 200)) while (file.getline(line, 200))
{ {
buf = line; buf = line;
string::size_type pos = buf.find("mysql-bin", 0); string::size_type pos = buf.find("000", 0);
if ( pos != string::npos ) if ( pos != string::npos )
{ {
pos = 0;
string::size_type pos1 = buf.find("\t", pos); string::size_type pos1 = buf.find("\t", pos);
if ( pos1 != string::npos ) if ( pos1 != string::npos )