Bug 307750 - No path to mysqld set in server configuration [patch]
Summary: No path to mysqld set in server configuration [patch]
Alias: None
Product: digikam
Classification: Unclassified
Component: Database-Mysql (show other bugs)
Version: 3.0.0
Platform: unspecified Linux
: NOR major (vote)
Target Milestone: ---
Assignee: Digikam Developers
Depends on:
Reported: 2012-10-02 21:03 UTC by Carsten Pfeiffer
Modified: 2017-07-25 10:34 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 3.0.0


Note You need to log in before you can comment on or make changes to this bug.
Description Carsten Pfeiffer 2012-10-02 21:03:01 UTC
I cannot use Digikam with mysql anymore. It refuses to start the mysql process. I suppose this is because of the following code in databaseserver.cpp:

const QString mysqldPath(DatabaseConfigElement::element(dbType).dbServerCmd);
//const QString mysqldPath("/usr/sbin/mysqld");
if ( mysqldPath.isEmpty() || mysqldPath.compare( QLatin1String( "SERVERCMD_MYSQL-NOTFOUND" ) ))
        kDebug() << "No path to mysqld set in server configuration!";
        return DatabaseServerError(DatabaseServerError::StartError, i18n("No path to mysqld set in server configuration."));

The method always aborts when the mysqldPath is either empty or != "SERVERCMD_MYSQL-NOTFOUND". So unless your mysqld binary is named like that, digikam refuses to start it. You should rather use the == operator than compare().

Reproducible: Always

Steps to Reproduce:
1. Configure digikam to use an internal mysql server
2. Invoke "Check Database Connection" or just restart digikam
Actual Results:  
Digikam is unable to start mysqld and thus cannot connect to the database.

Expected Results:  
Digikam starts mysqld properly.

I'd classify this as major, because I cannot access my images from digikam anymore.
Comment 1 caulier.gilles 2012-10-03 06:08:21 UTC
yes, i can confirm code commented in 3.0.0.

Francesco, what do you think about ?

Gilles Caulier
Comment 2 Carsten Pfeiffer 2012-10-11 19:37:32 UTC
Do you want me to send a patch?
Comment 3 Carsten Pfeiffer 2013-01-08 22:16:07 UTC
*ping* pretty please, fix this before 3.0. It's really trivial.

I can also commit this myself, if you prefer that.
Comment 4 caulier.gilles 2013-01-09 07:55:27 UTC

You is welcome to commit this patch in git/master...


Gilles Caulier
Comment 5 Carsten Pfeiffer 2013-01-10 21:05:46 UTC
Git commit 62ec1eae9e92b70f8dcc0e848c3f9bb1692f49c2 by Carsten Pfeiffer.
Committed on 10/01/2013 at 21:59.
Pushed by pfeiffer into branch 'master'.

Make internal mysql server work again.

M  +1    -1    databaseserver/databaseserver.cpp