No longer able to delete recordings from Mythfrontend

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

dac437
Newcomer
Posts: 6
Joined: Thu Mar 23, 2023 11:44 pm
United States of America

No longer able to delete recordings from Mythfrontend

Post by dac437 »

I'm a long time mythtv user running v0.32 which I compiled on Debian 10 from the fixes/32 branch. Starting a couple weeks ago I am unable to delete any recordings, although I don't remember making any changes to my system. If I delete it a recording from the "Watch Recordings" menu in mythfrontend, it appears to delete but does not get moved to the Deleted recording group. When I return to "Watch Recordings" it's back in the Default group. I don't think it's a permission issue because it was once working, and also Live TV recordings are expiring and being deleted.

Could it be a database issue? Any suggestions for how to debug?
User avatar
bill6502
Developer
Posts: 2299
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: No longer able to delete recordings from Mythfrontend

Post by bill6502 »

Hi,

I'd start by looking for hints in the logs. Typically in /var/log/mythtv and mythfrontend.log and mythbackend.log.

I have two shows that I 'Delete and Allow Re-record' from the Watch List page and I've been
doing it for years. Although I'm on master now, I just did two and watched them move to the
Deleted recgroup and later vanish from the recorded table.
dac437
Newcomer
Posts: 6
Joined: Thu Mar 23, 2023 11:44 pm
United States of America

Re: No longer able to delete recordings from Mythfrontend

Post by dac437 »

Thanks, I'm not seeing any errors in the logs. I turned on file:debug, and confirmed that mythbackend is correctly finding the '.ts' file. I also see that it's trying to change the program from 'Default' to 'Deleted':

Code: Select all

2023-03-24 18:58:01.095716 N  ApplyRecordRecGroupChange: Default to Deleted (3)
2023-03-24 18:58:01.096355 I  Reschedule requested for CHECK 0 190 0 DoHandleDelete1 | Shark Tank |  | A self-sanitizing baby accessory; a storage solution for road trippers; a pet safety service; a nutrient-dense sweet indulgence. | EP011581290320
What other logs should I check? What is supposed to happen in the database to move a program to 'Deleted'?
User avatar
bill6502
Developer
Posts: 2299
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: No longer able to delete recordings from Mythfrontend

Post by bill6502 »

recorded.recgroup gets changed to Deleted. oldrecorded fields duplicate | recstatus | future are changed.
I wouldn't adjust anything in oldrecorded, you'll void your warranty!

I run a weekly /etc/cron.weekly/mythtv-database script. I'd start with mysqlcheck for now.
archifishal
Newcomer
Posts: 7
Joined: Sat Mar 25, 2023 11:45 am
Great Britain

Re: No longer able to delete recordings from Mythfrontend

Post by archifishal »

Actually this is the exact same thing I just posted about in a new thread :)
gcduser
Newcomer
Posts: 12
Joined: Sat Mar 25, 2023 12:31 pm
Great Britain

Re: No longer able to delete recordings from Mythfrontend

Post by gcduser »

Also Debian 10, fixes/32, maridb 10.3.38 and have the same problem.

I'm not great with mysql, but did notice some odd things after checking mariadb logs. An UPDATE statement like this runs:

Code: Select all

update recorded set recgroup = 'Deleted', recgroupid = 3 where chanid = 37954 and starttime = '2022-08-10T22:20:00Z';
I tested that manually and it does nothing (0 rows updated, fields don't change), yet a select with the same where clause does return a row. Could be something to do with datetime format maybe? Changing the date format to 'yyyy-mm-dd hh:mm:ss' seems to work with UPDATE:

Code: Select all

explain select * from recorded where chanid = 37954 and starttime = '2022-08-10T22:20:00Z';
{"id":"1","select_type":"SIMPLE","table":"recorded","type":"const","possible_keys":"chanid","key":"chanid","key_len":"9","ref":"const,const","rows":"1","Extra":""}

explain update recorded set recgroup = 'Deleted', recgroupid = 3 where chanid = 37954 and starttime = '2022-08-10T22:20:00Z';
{"id":"1","select_type":"SIMPLE","table":null,"type":null,"possible_keys":null,"key":null,"key_len":null,"ref":null,"rows":null,"Extra":"Impossible WHERE"}

explain update recorded set recgroup = 'Deleted', recgroupid = 3 where chanid = 37954 and starttime = '2022-08-10 22:20:00';
{"id":"1","select_type":"SIMPLE","table":"recorded","type":"range","possible_keys":"chanid","key":"chanid","key_len":"9","ref":null,"rows":"1","Extra":"Using where"}
white_haired_uncle
Senior
Posts: 244
Joined: Thu Feb 23, 2023 8:55 pm
Location: Safe outside my gilded cage
United States of America

Re: No longer able to delete recordings from Mythfrontend

Post by white_haired_uncle »

@gcduser wonders about a timezone issue. @dac437 mentions compiling from source. Makes me wonder if this is being run?

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql
white_haired_uncle
Senior
Posts: 244
Joined: Thu Feb 23, 2023 8:55 pm
Location: Safe outside my gilded cage
United States of America

Re: No longer able to delete recordings from Mythfrontend

Post by white_haired_uncle »

Slightly off topic, but why is there a recgroup and recgroupid in recorded, when there is a table recgroups (which probably should be named recgroup) that maps recgroupid to recgroup?
gcduser
Newcomer
Posts: 12
Joined: Sat Mar 25, 2023 12:31 pm
Great Britain

Re: No longer able to delete recordings from Mythfrontend

Post by gcduser »

mysql_tzinfo_to_sql

Already tried that I'm afraid (was first thought of mine too).
User avatar
bill6502
Developer
Posts: 2299
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: No longer able to delete recordings from Mythfrontend

Post by bill6502 »

I'm on 10.6.12-MariaDB and Ubuntu 22.04. No trouble deleting recordings.

See if any files here have a new timestamp and see if options were added: ls -lARt /etc/mysql
Something to do with interpreting the DATETIME syntax.
gcduser
Newcomer
Posts: 12
Joined: Sat Mar 25, 2023 12:31 pm
Great Britain

Re: No longer able to delete recordings from Mythfrontend

Post by gcduser »

For me, only one changed file in there since 2021: /etc/mysql/conf.d/mythtv.cnf

Contents are just:

Code: Select all

[mysqld]
#bind-address=::
max_connections=100
@dac437 I hope you don't object to me adding to this thread, it does seem to be the same problem and setup.
User avatar
bill6502
Developer
Posts: 2299
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: No longer able to delete recordings from Mythfrontend

Post by bill6502 »

Is the output of this 'ON': SHOW VARIABLES LIKE 'mysql56_temporal_format';
gcduser
Newcomer
Posts: 12
Joined: Sat Mar 25, 2023 12:31 pm
Great Britain

Re: No longer able to delete recordings from Mythfrontend

Post by gcduser »

Yes, I checked that already as well - it's set to ON.
User avatar
bill6502
Developer
Posts: 2299
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: No longer able to delete recordings from Mythfrontend

Post by bill6502 »

This sounds like an issue our Python developer had. Please try: SHOW CREATE TABLE recorded \G
and look for a comment like this: /* mariadb-5.3 */
User avatar
bill6502
Developer
Posts: 2299
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: No longer able to delete recordings from Mythfrontend

Post by bill6502 »

Seems like a lot of other SQL should be failing if this is a datetime syntax issue. These should match DATA_TYPES:
SELECT TABLE_NAME, COLUMN_NAME, DATA_TYPE, IS_NULLABLE, COLUMN_DEFAULT FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME='starttime' AND (TABLE_NAME='recorded' OR TABLE_NAME='program');

IFF you didn't do this already:
To get the actual query, make sure the system is as idle as possible (not recording/watching) and
do this: mythbackend --setverbose database:debug then delete one recording. Be sure logging is
on 1st. The query/response will be in the backend log. Really looking for the query

This will be very noisy, turn it off with: mythbackend --setverbose database:alert
Post Reply