| Summary: | mythtv fails schema upgrade | ||
|---|---|---|---|
| Product: | Fedora | Reporter: | David HIghley <david.m.highley> |
| Component: | mythtv | Assignee: | Richard <hobbes1069> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | jarod, rpmfusion |
| Priority: | P1 | ||
| Version: | 26 | ||
| Hardware: | x86_64 | ||
| OS: | GNU/Linux | ||
| namespace: | |||
|
Description
David HIghley
2017-10-14 04:03:59 CEST
I didn't run into this problem when I upgraded my combined FE/BE system... Did you upgrade all the myth related packages at the same time? Yes all mythtv packages were upgraded at same time. What script is the log message indicating the bad SQL syntax? Maybe it can be fixed if I knew where the script is. Not really sure... might want to post to the mythtv user mailing list. There's not really enough detail here to make an educated guess. I just got the same error here. Thread about this here, guy found a workaround but I can't tell what he did: http://www.deb-multimedia.org/lurker/message/20170802.154941.c5ffe016.pt-BR.html http://www.deb-multimedia.org/lurker/message/20170802.173805.4e7f7d6e.pt-BR.html The cpp file referenced is in the source code, so you need to check the source. I'm doing that now to try to figure this out. I'll post here if I figure anything out. Plz do the same. Oh ya, update the bug title here to be "mythtv" instead of "mythv", didn't find it on my first search, only by looking at recent bugs. The guy on that thread was right. Seems like master.toUtf8() on 3361 of libmythtv/dbcheck.cpp is buggy. Perhaps what we have in common is we have our locale's set to something myth doesn't expect? Just a guess.
Here's the workaround, but only run this if you schema is currently at 1346!!
Get a cmd line into your mythtv mysql server. Run the commands that the 1346 section of that cpp file shows. Here they are for those who don't want to sift through source. You must change the "yourhost" type values to what suits your setup. Ignore the # lines they are just my comments.
insert into settings (value,data,hostname) values ('MasterServerName' ,'yourhost.yourdomain.com',null);
insert into settings (value,data,hostname) select 'BackendServerAddr', data, hostname from settings where value = 'BackendServerIP';
# seems to put in the wrong address if you have 2 hostnames, but things still seem to work so I just left it alone
update settings a, settings b set b.data = a.data where a.value = 'BackendServerIP6' and b.hostname = a.hostname and b.value = 'BackendServerAddr' and b.data = '127.0.0.1' and a.data != '::1' and a.data is not null and a.data != '';
# noop if you don't have an ipv6 setup
update settings a, settings b, settings c set c.data = a.data where a.value = 'MasterServerIP' and b.value = 'MasterServerName' and c.value = 'BackendServerAddr' and c.hostname = b.data;
# was noop on my box
delete from settings where value in ('WatchTVGuide');
update settings set data=1347 where value='DBSchemaVer';
Then have systemd restart mythtv-backend and it should update to the latest version and run fine. Works for me!
If someone wants to bother, it would be nice to put this as a bug on the mythtv bugzilla so upstream can fix it. They need to fix that Utf8 call which is almost certainly the problem since that string does not appear anywhere else in the cpp file.
Sorry, I did not loop back earlier on this issue. I was able to complete the database upgrade by running mythtv-setup. Then I was able to start the backend and all seems to be working. It did squawk about not being able to do a backup as I ran the command from my account as the mythv user does not allow an interactive login. It is now reported in the Mythtv TRAC system as report #13155. I did take over most of the comments to that report. It looks like a commit has been made to fixes/29 so this should be resolved when I get a chance to do new builds. I believe this is fixed, please reopen if that's not the case. |