[mythtv-commits] Ticket #13220: QSqlDatabase::setConnectOptions() being called with illegal connect option value
MythTV
noreply at mythtv.org
Sun Feb 11 00:15:27 UTC 2018
#13220: QSqlDatabase::setConnectOptions() being called with illegal connect option
value
--------------------------------------+--------------------------
Reporter: mythtv-trac@… | Owner:
Type: Bug Report - General | Status: new
Priority: minor | Milestone: needs_triage
Component: MythTV - General | Version: Master Head
Severity: medium | Keywords:
Ticket locked: 0 |
--------------------------------------+--------------------------
In
https://code.mythtv.org/trac/changeset/119d733d/mythtv/mythtv/libs/libmythbase/mythdbcon.cpp
code was added to call:
{{{
m_db.setConnectOptions(QString("MYSQL_OPT_READ_TIMEOUT=300"));
}}}
but you '''can't''' pass arbitrary strings to QSqlDatabase
::setConnectOptions(). See the man page at
https://www.ics.com/files/qtdocs/qsqldatabase.html#setConnectOptions and
notice that '''only a few specific strings are permitted for each database
type''', and "MYSQL_OPT_READ_TIMEOUT" is not one of them.
Because of this recent code addition, any processes that open a connection
to the database result in messages like this:
{{{
myth:~# mythfilldatabase --verbose general --loglevel info --quiet
--syslog local7
QMYSQLDriver::open: Illegal connect option value
'MYSQL_OPT_READ_TIMEOUT=300'
QMYSQLDriver::open: Illegal connect option value
'MYSQL_OPT_READ_TIMEOUT=300'
QMYSQLDriver::open: Illegal connect option value
'MYSQL_OPT_READ_TIMEOUT=300'
myth:~#
}}}
Please remove this code (and the associated comment) from master and
backport the change to 0.29+fixes.
Thanks.
--
Ticket URL: <https://code.mythtv.org/trac/ticket/13220>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list