mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-04-12 07:42:35 +02:00
2017-12-01 Fred Gleason <fredg@paravelsystems.com>
* Added a 'Charset=' directive to the [MySQL] section of rd.conf(5). * Added an 'Collation=' directive to the [MySQL] section of rd.conf(5).
This commit is contained in:
parent
a8ae9f9bfa
commit
9f17b3f560
@ -16399,3 +16399,8 @@
|
||||
rd.conf(5).
|
||||
* Refactored the schema update code to use standard form
|
||||
in rdadmin(1).
|
||||
2017-12-01 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added a 'Charset=' directive to the [MySQL] section of
|
||||
rd.conf(5).
|
||||
* Added an 'Collation=' directive to the [MySQL] section of
|
||||
rd.conf(5).
|
||||
|
@ -26,15 +26,11 @@ Password=letmein
|
||||
Database=Rivendell
|
||||
Driver=QMYSQL3
|
||||
|
||||
; Specify the type of DB storage engine to use when creating new tables.
|
||||
; To get a list of supported engine types, use the 'SHOW ENGINES;' command
|
||||
; in mysql(1).
|
||||
;
|
||||
; It is also possible to specify 'default', in which case Rivendell will
|
||||
; use whatever default engine type is configured in MySQL.
|
||||
;
|
||||
; The default value is 'default'.
|
||||
; The following three settings control the attributes of new DB tables
|
||||
; created by Rivendell.
|
||||
Engine=MyISAM
|
||||
Charset=latin1
|
||||
Collation=latin1_swedish_ci
|
||||
|
||||
[AudioStore]
|
||||
MountSource=
|
||||
|
2
lib/rd.h
2
lib/rd.h
@ -65,6 +65,8 @@
|
||||
#define DEFAULT_MYSQL_DRIVER "QMYSQL3"
|
||||
#define DEFAULT_MYSQL_HEARTBEAT_INTERVAL 360
|
||||
#define DEFAULT_MYSQL_ENGINE "default"
|
||||
#define DEFAULT_MYSQL_CHARSET "latin1"
|
||||
#define DEFAULT_MYSQL_COLLATION "latin1_swedish_ci"
|
||||
#define MYSQL_BUILTIN_DATABASE "mysql"
|
||||
#define POSTGRESQL_BUILTIN_DATABASE "template1"
|
||||
|
||||
|
@ -187,6 +187,18 @@ 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;
|
||||
@ -571,12 +583,13 @@ void RDConfig::load()
|
||||
DEFAULT_MYSQL_HEARTBEAT_INTERVAL);
|
||||
conf_mysql_engine=
|
||||
profile->stringValue("mySQL","Engine",DEFAULT_MYSQL_ENGINE);
|
||||
if(conf_mysql_engine.lower()=="default") {
|
||||
conf_create_table_postfix="";
|
||||
}
|
||||
else {
|
||||
conf_create_table_postfix=QString(" engine ")+conf_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;
|
||||
|
||||
facility=profile->stringValue("Logs","Facility",DEFAULT_LOG_FACILITY).lower();
|
||||
if(facility=="syslog") {
|
||||
@ -683,6 +696,8 @@ 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="";
|
||||
|
@ -61,6 +61,8 @@ class RDConfig
|
||||
QString mysqlDriver() const;
|
||||
int mysqlHeartbeatInterval() const;
|
||||
QString mysqlEngine() const;
|
||||
QString mysqlCharset() const;
|
||||
QString mysqlCollation() const;
|
||||
QString createTablePostfix() const;
|
||||
RDConfig::LogFacility logFacility() const;
|
||||
QString logDirectory() const;
|
||||
@ -127,6 +129,8 @@ class RDConfig
|
||||
QString conf_mysql_password;
|
||||
QString conf_mysql_driver;
|
||||
QString conf_mysql_engine;
|
||||
QString conf_mysql_charset;
|
||||
QString conf_mysql_collation;
|
||||
QString conf_create_table_postfix;
|
||||
int conf_mysql_heartbeat_interval;
|
||||
RDConfig::LogFacility conf_log_facility;
|
||||
|
Loading…
x
Reference in New Issue
Block a user