[mythtv-commits] Ticket #6344: Workaround lastError bug in Qt 4.5.0
MythTV
mythtv at cvs.mythtv.org
Wed Mar 11 22:24:00 UTC 2009
#6344: Workaround lastError bug in Qt 4.5.0
----------------------------------------------+-----------------------------
Reporter: sphery <mtdean at thirdcontact.com> | Owner: ijr
Type: defect | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: 0.21
Severity: medium | Mlocked: 0
----------------------------------------------+-----------------------------
Qt 4.5.0 modified the Qt MySQL driver and added a bug which causes a
lastError to sometimes be reported, even when the last statement executed
was successfully executed. Since Myth's DB upgrade code only checks
lastError, non-failures are sometimes treated as failures (i.e. when
executing the ALTER DATABASE statements that are passed to
performActualUpdate()).
The attached patch works around the issue by simply checking the return
value of exec() as well as the lastError(). It only works around the
issue in the one location where I know it exists--the DB upgrade code.
I've checked all other locations in dbcheck.cpp that look only at
lastError() and none will be affected by the bug (i.e. their statements
can be executed either as prepared or non-prepared statements). However,
similar problems may exist in other parts of Myth.
I've reported the bug to Qt's bug tracker and posted a patch, but it seems
to be moderated, so a link to the bug isn't yet available. The Qt patch
is simple, but distros are already starting to use the buggy version of
Qt, so the workaround may be worthwhile.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/6344>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list