[mythtv-users] Schema update bug

Ken Bass kbass at kenbass.com
Wed Oct 21 02:02:00 UTC 2009

I'm trying to upgrade a 0.20 to 0.22RC1 for testing but the schema 
upgrade fails.

I am wondering if this isn't a more generic bug. Update fails on update 
1170. In dbcheck.cpp, it performs a query which returns no rows. I'll 
assume this is because that feature does not apply to me so it makes 
sense for there to be no rows. It then builds an update string that gets 
passed to performActualUpdate(). The problem is that the string is an 
empty string "". I am not sure if previous versions of mysql or previous 
versions of mythdb/qt3 were okay with this, but the 0.22RC1 version fails.

QSqlQuery::exec: empty query^M
2009-10-20 21:27:25.519 DB Error (Performing database upgrade): ^M
Query was:  ^M
Error was: No error type from QSqlError?  Strange... ^M
new version: 1170^M

My patch was to change performActualUpdate() in dbCheck.cpp
    while (thequery != NULL)
    while ((thequery != NULL) && strlen(thequery)>0)

More information about the mythtv-users mailing list