Skip to content

Commit

Permalink
add semicolon to SQL commands
Browse files Browse the repository at this point in the history
  • Loading branch information
mqualmann committed May 21, 2018
1 parent 6bd5d4f commit 91fef07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/libs/database/server/databaseserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ DatabaseServerError DatabaseServer::initMysqlDatabase() const

QSqlQuery query(db);

if (!query.exec(QString::fromLatin1("USE %1").arg(d->internalDBName)))
if (!query.exec(QString::fromLatin1("USE %1;").arg(d->internalDBName)))
{
qCDebug(DIGIKAM_DATABASESERVER_LOG) << "Failed to use database"
<< d->internalDBName;
Expand All @@ -600,7 +600,7 @@ DatabaseServerError DatabaseServer::initMysqlDatabase() const
<< db.lastError().text();
qCDebug(DIGIKAM_DATABASESERVER_LOG) << "Trying to create database now";

if (query.exec(QLatin1String("CREATE DATABASE digikam")))
if (query.exec(QString::fromLatin1("CREATE DATABASE %1;").arg(d->internalDBName)))
{
qCDebug(DIGIKAM_DATABASESERVER_LOG) << "Database was successfully created";
}
Expand Down

0 comments on commit 91fef07

Please sign in to comment.