Comments - Upgrade to MariaDB 10.6.0 breaks MythTV

2 years, 11 months ago Rob Rutledge

Thanks for the quick reply/comment. A couple of questions here...

How long will it be before the next release? Is it possible the next release would be soon because of this known bug?

Is it possible I could run the reg expression substitution 's/Offset'Offset'/' on the mysql_tzinfo_to_sql script to put Offset in quotes and then run the modified script without running the whole bash script you show in your github link?

Thanks;

 
2 years, 11 months ago Ian Gilfillan

10.6.0 was an alpha release, so bugs are expected and this one probably won't make a difference to the release schedule. There's a lot of development work being done on 10.6 right now, so the next release could be in the next couple of weeks.

Without looking in any detail, the workaround you mention sounds like it should work to me.

 
2 years, 11 months ago Rob Rutledge

I ran "mysql_tzinfo_to_sql /usr/share/zoneinfo > tz.fix" so I would have access to the tz.fix file to substitute the backticks to the reserved word "Offset". I then wrote this perl script to make the substitution.

#!/usr/bin/perl
use warnings;

$file = "/home/robby/mythtv_timezone_issues/tz.fix";

rename($file, $file . '.bak');
print "Made it to rename\n";
open(IN, '<' . $file . '.bak') or die $!;
print "Made it to open input file\n";
open(OUT, '>' . $file) or die $!;
print "Made it to open output file\n";
while(<IN>)
{
    $_ =~ s/Offset/`Offset`/g;
    print OUT $_;
}
close(IN);
close(OUT);

The substitution was successful and then I ran "cat tz.fix | mysql -u root -p mysql". Running the corrected tz.fix file ran okay with no syntax errors and the timezone columns are now populated in the mysql database timezone tables. Unfortunaely Mythtv will not start with the same error.

# tail -f mythbackend.20210503173528.1707.log
2021-05-03 12:35:29.642992 I [1707/1707] CoreContext mythcorecontext.cpp:1842 (SaveLocaleDefaults) - Current locale en_US
2021-05-03 12:35:29.646142 N [1707/1707] CoreContext mythlocale.cpp:121 (LoadDefaultsFromXML) - Reading locale defaults from /usr/local/share/mythtv//locales/en_us.xml
2021-05-03 12:35:30.316474 I [1707/1707] CoreContext platforms/mythpowerdbus.cpp:530 (AcquireLock) - PowerDBus: Failed to delay sleep,shutdown: Permission denied
2021-05-03 12:35:30.318929 I [1707/1707] CoreContext platforms/mythpowerdbus.cpp:360 (DeviceAdded) - PowerDBus: Added UPower.Device '/org/freedesktop/UPower/devices/ups_hiddev0'
2021-05-03 12:35:30.319178 I [1707/1707] CoreContext mythpower.cpp:348 (PowerLevelChanged) - Power: On AC power
2021-05-03 12:35:30.366553 I [1707/1707] CoreContext mythpower.cpp:131 (Init) - Power: Supported actions: None
2021-05-03 12:35:30.368601 I [1707/1707] CoreContext mythtranslation.cpp:62 (load) - Loading en_us translation for module mythfrontend
2021-05-03 12:35:30.371577 E [1707/1707] CoreContext main_helpers.cpp:563 (run_backend) - MySQL time zone support is missing.  Please install it and try again.  See 'mysql_tzinfo_to_sql' for assistance.
2021-05-03 12:35:30.372457 I [1707/1707] CoreContext platforms/mythpowerdbus.cpp:72 (~MythPowerDBus) - PowerDBus: Closing interfaces
2021-05-03 12:35:30.373170 I [1707/1707] CoreContext mythcontext.cpp:1665 (~MythContext) - Exiting

I even restarted the server in case the timezone info had been cached, but to no avail. MythTV is still complaining about "MySQL time zone support is missing". I have to assume there is something else that must be done to provide the time zone support.

Thanks for the help so far. Anybody got anymore ideas?

 
2 years, 11 months ago Ian Gilfillan

What does SELECT CONVERT_TZ(NOW(), 'SYSTEM', 'Etc/UTC'); return? This seems to be the query MythTV uses to test. If it returns NULL, the time zones have not been loaded correctly by mysql_tzinfo_to_sql. If it returns a value, for example:

SELECT CONVERT_TZ(NOW(), 'SYSTEM', 'Etc/UTC');
+----------------------------------------+
| CONVERT_TZ(NOW(), 'SYSTEM', 'Etc/UTC') |
+----------------------------------------+
| 2021-05-03 20:58:44                    |
+----------------------------------------+

then the time zones have been loaded correctly (and I'm not sure why MythTV is failing).

 
2 years, 11 months ago Rob Rutledge

Thanks again for the quick response. I did try the statement in the MariaDB shell as mentioned above and it did return a date and time, UTC that is. I believe it was returning a NULL response before. I am re-compiling MythTV now to see if that is what is needed.

 
2 years, 10 months ago Rob Rutledge

I re-compiled MythTV with no errors, but still it would not start complaining about "MySQL time zone support is missing". I found an archived version of the MariaDB 10.5.9 slackpkg and installed it whereupon MythTV starts just fine now. I have to assume there is more to the time zone support in MariaDB other than loading the timezone tables. Thanks for the help from everyone. I will be waiting anxiously for the next version of MariaDB to see if time zone support is added back.

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.