|
Rex Dieter |
6c7a48 |
From b45e783ebe548280f78c0a659a6f8c6f7e09e3ea Mon Sep 17 00:00:00 2001
|
|
Rex Dieter |
6c7a48 |
From: Christophe Giboudeaux <cgiboudeaux@gmx.com>
|
|
Rex Dieter |
6c7a48 |
Date: Thu, 7 Feb 2013 16:59:03 +0100
|
|
Rex Dieter |
6c7a48 |
Subject: [PATCH 3/3] Ignore the custom settings in ~/.my.cnf Looks like
|
|
Rex Dieter |
6c7a48 |
passing the socket path in our arguments is not enough for MySQL. It still
|
|
Rex Dieter |
6c7a48 |
tries to run the commands on any database defined in ~/.my.cnf.
|
|
Rex Dieter |
6c7a48 |
|
|
Rex Dieter |
6c7a48 |
We're now adding the --defaults-file argument to mysqladmin and mysqlcheck to only run these commands on the Akonadi DB.
|
|
Rex Dieter |
6c7a48 |
|
|
Rex Dieter |
6c7a48 |
BUG: 264383
|
|
Rex Dieter |
6c7a48 |
FIXED-IN: 1.9.1
|
|
Rex Dieter |
6c7a48 |
---
|
|
Rex Dieter |
6c7a48 |
server/src/storage/dbconfigmysql.cpp | 6 ++++--
|
|
Rex Dieter |
6c7a48 |
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
Rex Dieter |
6c7a48 |
|
|
Rex Dieter |
6c7a48 |
diff --git a/server/src/storage/dbconfigmysql.cpp b/server/src/storage/dbconfigmysql.cpp
|
|
Rex Dieter |
6c7a48 |
index c9491e0..b76efe5 100644
|
|
Rex Dieter |
6c7a48 |
--- a/server/src/storage/dbconfigmysql.cpp
|
|
Rex Dieter |
6c7a48 |
+++ b/server/src/storage/dbconfigmysql.cpp
|
|
Rex Dieter |
6c7a48 |
@@ -78,7 +78,8 @@ bool DbConfigMysql::init( QSettings &settings )
|
|
Rex Dieter |
6c7a48 |
const QString mysqladminPath = XdgBaseDirs::findExecutableFile( QLatin1String( "mysqladmin" ), mysqldSearchPath );
|
|
Rex Dieter |
6c7a48 |
if ( !mysqladminPath.isEmpty() ) {
|
|
Rex Dieter |
6c7a48 |
#ifndef Q_OS_WIN
|
|
Rex Dieter |
6c7a48 |
- defaultCleanShutdownCommand = QString::fromLatin1( "%1 shutdown --socket=%2/mysql.socket" )
|
|
Rex Dieter |
6c7a48 |
+ defaultCleanShutdownCommand = QString::fromLatin1( "--defaults-file=%1/mysql.conf %2 shutdown --socket=%3/mysql.socket" )
|
|
Rex Dieter |
6c7a48 |
+ .arg( AkStandardDirs::saveDir( "data" ) )
|
|
Rex Dieter |
6c7a48 |
.arg( mysqladminPath )
|
|
Rex Dieter |
6c7a48 |
.arg( socketDirectory );
|
|
Rex Dieter |
6c7a48 |
#else
|
|
Rex Dieter |
6c7a48 |
@@ -303,7 +304,8 @@ void DbConfigMysql::startInternalServer()
|
|
Rex Dieter |
6c7a48 |
if ( opened ) {
|
|
Rex Dieter |
6c7a48 |
|
|
Rex Dieter |
6c7a48 |
if ( !mMysqlCheckPath.isEmpty() ) {
|
|
Rex Dieter |
6c7a48 |
- const QStringList arguments = QStringList() << QLatin1String( "--check-upgrade" )
|
|
Rex Dieter |
6c7a48 |
+ const QStringList arguments = QStringList() << QString::fromLatin1( "--defaults-file=%1/mysql.conf" ).arg( akDir )
|
|
Rex Dieter |
6c7a48 |
+ << QLatin1String( "--check-upgrade" )
|
|
Rex Dieter |
6c7a48 |
<< QLatin1String( "--all-databases" )
|
|
Rex Dieter |
6c7a48 |
<< QLatin1String( "--auto-repair" )
|
|
Rex Dieter |
6c7a48 |
<< QString::fromLatin1( "--socket=%1/mysql.socket" ).arg( socketDirectory );
|
|
Rex Dieter |
6c7a48 |
--
|
|
Rex Dieter |
6c7a48 |
1.8.1.2
|
|
Rex Dieter |
6c7a48 |
|