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

@@ -188,18 +188,6 @@ QString RDConfig::mysqlEngine() const
}
QString RDConfig::mysqlCharset() const
{
return conf_mysql_charset;
}
QString RDConfig::mysqlCollation() const
{
return conf_mysql_collation;
}
QString RDConfig::createTablePostfix() const
{
return conf_create_table_postfix;
@@ -590,18 +578,8 @@ void RDConfig::load()
DEFAULT_MYSQL_HEARTBEAT_INTERVAL);
conf_mysql_engine=
profile->stringValue("mySQL","Engine",DEFAULT_MYSQL_ENGINE);
conf_mysql_charset=
profile->stringValue("mySQL","Charset",DEFAULT_MYSQL_CHARSET);
conf_mysql_collation=
profile->stringValue("mySQL","Collation",DEFAULT_MYSQL_COLLATION);
/*
conf_create_table_postfix=QString(" engine ")+conf_mysql_engine+" "+
"character set "+conf_mysql_charset+" "+
"collate "+conf_mysql_collation;
*/
conf_create_table_postfix=
RDConfig::createTablePostfix(conf_mysql_engine,conf_mysql_charset,
conf_mysql_collation);
RDConfig::createTablePostfix(conf_mysql_engine);
facility=profile->stringValue("Logs","Facility",DEFAULT_LOG_FACILITY).lower();
if(facility=="syslog") {
@@ -709,8 +687,6 @@ void RDConfig::clear()
conf_mysql_driver="";
conf_mysql_heartbeat_interval=DEFAULT_MYSQL_HEARTBEAT_INTERVAL;
conf_mysql_engine=DEFAULT_MYSQL_ENGINE;
conf_mysql_charset=DEFAULT_MYSQL_CHARSET;
conf_mysql_collation=DEFAULT_MYSQL_COLLATION;
conf_create_table_postfix="";
conf_log_facility=RDConfig::LogSyslog;
conf_log_directory="";
@@ -775,10 +751,7 @@ QString RDConfig::userAgent(const QString &modname)
}
QString RDConfig::createTablePostfix(const QString &engine,
const QString &charset,
const QString &collation)
QString RDConfig::createTablePostfix(const QString &engine)
{
return QString(" engine ")+engine+" "+"character set "+charset+" "+
"collate "+collation;
return QString(" engine ")+engine+" ";
}