2018-10-08 Fred Gleason <fredg@paravelsystems.com>

* Removed the 'Charset=' and 'Collation=' parameters from the
	'[mySQL]' section of rd.conf(5).
	* Removed support for the --mysql-charset=' and '--mysql-collation='
	switches in rddbmgr(8).
	* Refactored handling of character set and collation attributes
	in rddbmgr(8) to treat them as immutable parts of the DB schema.
This commit is contained in:
Fred Gleason
2018-10-08 18:38:12 -04:00
parent d6a45dbd6d
commit 58d856a726
16 changed files with 499 additions and 299 deletions

View File

@@ -72,8 +72,6 @@ MainObject::MainObject(QObject *parent)
db_mysql_database=db_config->mysqlDbname();
db_mysql_driver=db_config->mysqlDriver();
db_mysql_engine=db_config->mysqlEngine();
db_mysql_charset=db_config->mysqlCharset();
db_mysql_collation=db_config->mysqlCollation();
station_name=db_config->stationName();
InitializeSchemaMap();
@@ -142,14 +140,6 @@ MainObject::MainObject(QObject *parent)
db_mysql_engine=cmd->value(i);
cmd->setProcessed(i,true);
}
if(cmd->key(i)=="--mysql-charset") {
db_mysql_charset=cmd->value(i);
cmd->setProcessed(i,true);
}
if(cmd->key(i)=="--mysql-collation") {
db_mysql_collation=cmd->value(i);
cmd->setProcessed(i,true);
}
if(cmd->key(i)=="--set-schema") {
set_schema=cmd->value(i).toInt(&ok);
if((!ok)||(set_schema<=0)) {
@@ -283,8 +273,6 @@ MainObject::MainObject(QObject *parent)
fprintf(stderr," Database: %s\n",(const char *)db_mysql_database);
fprintf(stderr," Driver: %s\n",(const char *)db_mysql_driver);
fprintf(stderr," Engine: %s\n",(const char *)db_mysql_engine);
fprintf(stderr," Charset: %s\n",(const char *)db_mysql_charset);
fprintf(stderr," Collation: %s\n",(const char *)db_mysql_collation);
}
//
@@ -300,9 +288,7 @@ MainObject::MainObject(QObject *parent)
(const char *)db.lastError().text());
exit(1);
}
db_table_create_postfix=
RDConfig::createTablePostfix(db_mysql_engine,db_mysql_charset,
db_mysql_collation);
db_table_create_postfix=RDConfig::createTablePostfix(db_mysql_engine);
//
// Resolve Target Schema