[mythtv-users] error when fixing database forced by mythtv upgrade

Petr Stehlik pstehlik at sophics.cz
Sun Sep 27 17:59:34 UTC 2009


Michael T. Dean píše v Ne 27. 09. 2009 v 08:51 -0400:
> > BTW, the SELECT * FROM mythconverg.people where name like "Samuel Iva%"
> > looks as follows:
> >
> > "person","name"
> > 2871,"Samuel Ivaška (Slovenská republika 1983)"
> > 4094,"Samuel Ivaška (Slovenská republika 1988)"
> > 644,"Samuel Ivaška Hrají: Vladimír Hajdu"
> > 3686,"Samuel Ivaška. Hrají: Ferdinand Libant"
> > 37451,"Samuel Ivaška. Hrají: Ján Havrila. (Slovenská republika
> > 1988)"
> >
> > I cannot see any duplicate entry there.
> 
> The duplication is caused by truncation during conversion due to invalid 
> encoding of some of your entries.

See the following output of the same SELECT ran on the original
0.21-fixes - no duplicates:

+--------+-------------------------------------------------------------------+
| person | name                                                              |
+--------+-------------------------------------------------------------------+
|   2871 | Samuel Ivaška (Slovenská republika 1983)                        | 
|   4094 | Samuel Ivaška (Slovenská republika 1988)                        | 
|    644 | Samuel Ivaška Hrají: Vladimír Hajdu                            | 
|   3686 | Samuel Ivaška. Hrají: Ferdinand Libant                          | 
|  37451 | Samuel Ivaška. Hrají: Ján Havrila. (Slovenská republika 1988) | 
+--------+-------------------------------------------------------------------+
5 rows in set (0.05 sec)

It's probably the right time to show the output of MySQL status:

Server version:		5.0.51a-24+lenny2 (Debian)
Server characterset:	latin1
Db     characterset:	latin1
Client characterset:	latin1
Conn.  characterset:	latin1

Weird, now I have the database in a different state than before. It used
to be (sometime around the 0.22 upgrade, not sure if before or after the
failed upgrade) as follows:

Server characterset: latin1
Db     characterset: utf-8
Client characterset: latin1
Conn.  characterset: latin1

This is different from the example on the web...

Funny, so if now I have all in 'latin1' maybe I could re-try the
upgrade?

> Since the original upgrade encoding check failure occurred during the 
> oldrecorded table test, that means that the people and oldprogram tables 
> are not corrupt.  Therefore, you have the dreaded partial corruption 
> problem.  Unfortunately, since one of the corrupt tables is 
> oldrecorded--which is one of the ones you need to restore during a 
> partial restore--even a partial restore won't work.

Do I really need those tables? All I want is the setup configuration,
the recorded programs and the recording rules. Oldrecorded sounds like
something old that I no longer need.

> Your database likely became partially corrupt due to either switching 
> your MySQL server from a properly-configured one to an improperly 
> configured one (i.e. moving the database between distros)

well, I have upgraded Etch to Lenny recently... Does that count as
moving between distros?

> My recommendation is--for now--stay on 0.21-fixes 

I am back on 0.21-fixes now but I'd like to try that upgrading again.
Could you please suggest which tables could eventually be truncated
safely given that I don't need anything old, just the actual recordings
that are currently saved on the disk? For example the "people" table - I
didn't know that MythTV collects such information and I never used it
(and likely never will).

Thanks

Petr




More information about the mythtv-users mailing list