[mythtv-users] Database damage?

Stephen Worthington stephen_agent at jsw.gen.nz
Sun Feb 14 16:06:37 UTC 2021

On Sun, 14 Feb 2021 03:06:05 -0700, you wrote:

>On Sun, Feb 14, 2021, 02:23 Stephen Worthington <stephen_agent at jsw.gen.nz>
>> On Sun, 14 Feb 2021 08:35:44 +0100, you wrote:
>> Yes, but any time mythbackend crashes, there is the possibility it did
>> it in the middle of a database operation.  So there is the possibility
>> that a table is crashed.  A worse but virtually impossible to detect
>> error is also possible, where it updated one table (eg recorded) but
>> failed to update the matching data in another table (eg
>> recordedprogram, recordedseek).
>Does this operation not exist within a START TRANSACTION ... COMMIT
>If not,why not?
>A transaction in this case would completely eliminate the error you propose.

I do not think the MythTV code uses transactions.  I just did this on
an old mythtv master I had lying around (probably v30):

grep -ir "start transa" *

There were no matches.

As best I can recall, transactions in MySQL/MariaDB are relatively new
and initially only worked on InnoDB tables.  They were not around when
the basic MythTV code was written, and lots of mythconverg tables are
not InnoDB.  And using them can be quite complicated too.

More information about the mythtv-users mailing list