No longer able to delete recordings from Mythfrontend
Moderator: Forum Moderators
No longer able to delete recordings from Mythfrontend
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?
Could it be a database issue? Any suggestions for how to debug?
Re: No longer able to delete recordings from Mythfrontend
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.
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.
Re: No longer able to delete recordings from Mythfrontend
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':
What other logs should I check? What is supposed to happen in the database to move a program 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
Re: No longer able to delete recordings from Mythfrontend
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.
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.
-
- Newcomer
- Posts: 7
- Joined: Sat Mar 25, 2023 11:45 am
Re: No longer able to delete recordings from Mythfrontend
Actually this is the exact same thing I just posted about in a new thread
Re: No longer able to delete recordings from Mythfrontend
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:
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:
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';
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"}
-
- Senior
- Posts: 276
- Joined: Thu Feb 23, 2023 8:55 pm
- Location: Safe outside my gilded cage
Re: No longer able to delete recordings from Mythfrontend
@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
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql
-
- Senior
- Posts: 276
- Joined: Thu Feb 23, 2023 8:55 pm
- Location: Safe outside my gilded cage
Re: No longer able to delete recordings from Mythfrontend
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?
Re: No longer able to delete recordings from Mythfrontend
mysql_tzinfo_to_sql
Already tried that I'm afraid (was first thought of mine too).
Already tried that I'm afraid (was first thought of mine too).
Re: No longer able to delete recordings from Mythfrontend
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.
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.
Re: No longer able to delete recordings from Mythfrontend
For me, only one changed file in there since 2021: /etc/mysql/conf.d/mythtv.cnf
Contents are just:
@dac437 I hope you don't object to me adding to this thread, it does seem to be the same problem and setup.
Contents are just:
Code: Select all
[mysqld]
#bind-address=::
max_connections=100
Re: No longer able to delete recordings from Mythfrontend
Is the output of this 'ON': SHOW VARIABLES LIKE 'mysql56_temporal_format';
Re: No longer able to delete recordings from Mythfrontend
Yes, I checked that already as well - it's set to ON.
Re: No longer able to delete recordings from Mythfrontend
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 */
and look for a comment like this: /* mariadb-5.3 */
Re: No longer able to delete recordings from Mythfrontend
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
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