You've already forked mariadb-columnstore-engine
							
							
				mirror of
				https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
				synced 2025-11-03 17:13:17 +03:00 
			
		
		
		
	mcol-481 - just changed the note
This commit is contained in:
		@@ -666,6 +666,75 @@ int main(int argc, char *argv[])
 | 
				
			|||||||
			exit(1);
 | 
								exit(1);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							cout <<         "NOTE: The MariaDB ColumnStore Schema Sync feature will replicate all of the" << endl;
 | 
				
			||||||
 | 
					     	cout <<         "      schemas and InnoDB tables across the User Module nodes. This feature can be enabled" << endl;
 | 
				
			||||||
 | 
					     	cout <<         "      or disabled, for example, if you wish to configure your own replication post installation." << endl << endl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					       	try {
 | 
				
			||||||
 | 
					        	MySQLRep = sysConfig->getConfig(InstallSection, "MySQLRep");
 | 
				
			||||||
 | 
					       	}
 | 
				
			||||||
 | 
					       	catch(...)
 | 
				
			||||||
 | 
					        {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ( MySQLRep == "y" )
 | 
				
			||||||
 | 
					        	mysqlRep = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					       	string answer = "y";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        while(true) {
 | 
				
			||||||
 | 
					        	if ( mysqlRep )
 | 
				
			||||||
 | 
					                        prompt = "MariaDB ColumnStore Schema Sync feature is Enabled, do you want to leave enabled? [y,n] (y) > ";
 | 
				
			||||||
 | 
					                    else
 | 
				
			||||||
 | 
					                        prompt = "MariaDB ColumnStore Schema Sync feature, do you want to enable? [y,n] (y) > ";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    pcommand = callReadline(prompt.c_str());
 | 
				
			||||||
 | 
					                    if (pcommand) {
 | 
				
			||||||
 | 
					                        if (strlen(pcommand) > 0) answer = pcommand;
 | 
				
			||||||
 | 
					                        callFree(pcommand);
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    if ( answer == "y" || answer == "n" ) {
 | 
				
			||||||
 | 
					                        cout << endl;
 | 
				
			||||||
 | 
					                        break;
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    else
 | 
				
			||||||
 | 
					                        cout << "Invalid Entry, please enter 'y' for yes or 'n' for no" << endl;
 | 
				
			||||||
 | 
					                    if ( noPrompting )
 | 
				
			||||||
 | 
					                        exit(1);
 | 
				
			||||||
 | 
					   		}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                if ( mysqlRep )
 | 
				
			||||||
 | 
					                { // current enabled
 | 
				
			||||||
 | 
					                    if ( answer == "y" ) {
 | 
				
			||||||
 | 
					                        mysqlRep = true;
 | 
				
			||||||
 | 
					                        MySQLRep = "y";
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
										else
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
 | 
					                        mysqlRep = false;
 | 
				
			||||||
 | 
					                        MySQLRep = "n";
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                else
 | 
				
			||||||
 | 
					                { // currently disabled
 | 
				
			||||||
 | 
					                    if ( answer == "y" ) {
 | 
				
			||||||
 | 
					                        mysqlRep = false;
 | 
				
			||||||
 | 
					                        MySQLRep = "n";
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    else
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        mysqlRep = true;
 | 
				
			||||||
 | 
					                        MySQLRep = "y";
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                try {
 | 
				
			||||||
 | 
					                     sysConfig->setConfig(InstallSection, "MySQLRep", MySQLRep);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                catch(...)
 | 
				
			||||||
 | 
					                {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		switch ( IserverTypeInstall ) {
 | 
							switch ( IserverTypeInstall ) {
 | 
				
			||||||
			case (oam::INSTALL_COMBINE_DM_UM_PM):	// combined #1 - dm/um/pm on a single server
 | 
								case (oam::INSTALL_COMBINE_DM_UM_PM):	// combined #1 - dm/um/pm on a single server
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
@@ -755,75 +824,6 @@ int main(int argc, char *argv[])
 | 
				
			|||||||
		break;
 | 
							break;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// check for Schema Schema is Local Query wasnt selected
 | 
					 | 
				
			||||||
	if (!pmwithum)
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
	    cout <<         "NOTE: The MariaDB ColumnStore Schema Sync feature will replicate all of the" << endl;
 | 
					 | 
				
			||||||
	    cout <<         "      schemas and InnoDB tables across the User Module nodes. This feature can be enabled" << endl;
 | 
					 | 
				
			||||||
	    cout <<         "      or disabled, for example, if you wish to configure your own replication post installation." << endl << endl;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	    try {
 | 
					 | 
				
			||||||
		    MySQLRep = sysConfig->getConfig(InstallSection, "MySQLRep");
 | 
					 | 
				
			||||||
	    }
 | 
					 | 
				
			||||||
	    catch(...)
 | 
					 | 
				
			||||||
	    {}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	    if ( MySQLRep == "y" )
 | 
					 | 
				
			||||||
		  mysqlRep = true;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	    string answer = "y";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	    while(true) {
 | 
					 | 
				
			||||||
		  if ( mysqlRep )
 | 
					 | 
				
			||||||
			  prompt = "MariaDB ColumnStore Schema Sync feature is Enabled, do you want to leave enabled? [y,n] (y) > ";
 | 
					 | 
				
			||||||
		  else
 | 
					 | 
				
			||||||
			  prompt = "MariaDB ColumnStore Schema Sync feature, do you want to enable? [y,n] (y) > ";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		  pcommand = callReadline(prompt.c_str());
 | 
					 | 
				
			||||||
		  if (pcommand) {
 | 
					 | 
				
			||||||
		      if (strlen(pcommand) > 0) answer = pcommand;
 | 
					 | 
				
			||||||
		      callFree(pcommand);
 | 
					 | 
				
			||||||
		  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		  if ( answer == "y" || answer == "n" ) {
 | 
					 | 
				
			||||||
		      cout << endl;
 | 
					 | 
				
			||||||
		      break;
 | 
					 | 
				
			||||||
		  }
 | 
					 | 
				
			||||||
		  else
 | 
					 | 
				
			||||||
		      cout << "Invalid Entry, please enter 'y' for yes or 'n' for no" << endl;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		  if ( noPrompting )
 | 
					 | 
				
			||||||
			  exit(1);
 | 
					 | 
				
			||||||
	    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	    if ( answer == "y" ) {
 | 
					 | 
				
			||||||
		  mysqlRep = true;
 | 
					 | 
				
			||||||
		MySQLRep = "y";
 | 
					 | 
				
			||||||
	    }
 | 
					 | 
				
			||||||
	    else
 | 
					 | 
				
			||||||
	    {
 | 
					 | 
				
			||||||
	      mysqlRep = false;
 | 
					 | 
				
			||||||
	      MySQLRep = "n";
 | 
					 | 
				
			||||||
	    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	    try {
 | 
					 | 
				
			||||||
		  sysConfig->setConfig(InstallSection, "MySQLRep", MySQLRep);
 | 
					 | 
				
			||||||
	    }
 | 
					 | 
				
			||||||
	    catch(...)
 | 
					 | 
				
			||||||
	    {}
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	else
 | 
					 | 
				
			||||||
	{	//Schema Sync is default as on when Local Query is Selected
 | 
					 | 
				
			||||||
		mysqlRep = true;
 | 
					 | 
				
			||||||
		MySQLRep = "y";
 | 
					 | 
				
			||||||
	      
 | 
					 | 
				
			||||||
		try {
 | 
					 | 
				
			||||||
		    sysConfig->setConfig(InstallSection, "MySQLRep", MySQLRep);
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		catch(...)
 | 
					 | 
				
			||||||
		{}
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if ( !writeConfig(sysConfig) ) { 
 | 
						if ( !writeConfig(sysConfig) ) { 
 | 
				
			||||||
		cout << "ERROR: Failed trying to update MariaDB ColumnStore System Configuration file" << endl; 
 | 
							cout << "ERROR: Failed trying to update MariaDB ColumnStore System Configuration file" << endl; 
 | 
				
			||||||
		exit(1);
 | 
							exit(1);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user