[mythtv-users] Trying to fix utf8 database upgrade issues: a few schema questions

Tom Dexter digitalaudiorock at gmail.com
Thu Feb 11 17:44:45 UTC 2010


I hoping to upgrade to 0.22 soon.  I'm running under Gentoo.  I
performed the database backup/restore fix as described in the wiki:

http://wiki.mythtv.org/wiki/Fixing_Corrupt_Database_Encoding

...back in November.

I'm still unclear as to why, but I've been able to determine with some
tests I've programmed that I'm going to run in a ton of database
corruption errors when I try to upgrade.  In spite of the fact that I
did everything exactly as per the wiki, it seems that subsequently
continuing to run 0.21 has caused all sorts of problems with non-ASCII
characters.

I have WAY too many recordings to loose, so I'm going to fix it
whatever it takes.  I do database programming so I think I can do it,
but I have a few questions about the database schema that hopefully
someone can answer:

1)  Are the ids in the "people" table (it's person column) referenced
anywhere other than the credits and recordedcredits tables?  If not,
is there any reason I can't delete any records that aren't referenced
on either of them?

2)  Is the "oldprogram" table used for anything other than the program
search for new titles?  That is, is it used for scheduling when
filtering for non repeats or anything?

That's it for now.

I have a mess on my hands of like I can't even imagine.  I know I did
the backup/restore fix correctly.  Actually I still had it in my
command history and I can see I did everything right.  After I did
that I reconfigured my my.cnf to use latin1 across the board as you
can see:

status
--------------
mysql  Ver 14.12 Distrib 5.0.84, for pc-linux-gnu (i686) using readline 6.0

<snip>
Server characterset:	latin1
Db     characterset:	latin1
Client characterset:	latin1
Conn.  characterset:	latin1
<snip>

...just as it should look.  Here's a sample of data from immediately
after I did the fix:

select * from people where name like '%Depard%';
+--------+---------------------+
| person | name                |
+--------+---------------------+
|  19428 | Gérard Depardieu   |
+--------+---------------------+

However now, three months later, I have this:

select * from people where name like '%Depard%'

+--------+---------------------+
| person | name                |
+--------+---------------------+
|  19428 | Gérard Depardieu   |
|  44934 | Gérard Depardieu    |
+--------+---------------------+

The second one will break the upgrade.  I have that in all four tables
that the upgrade tests...what a mess.  So it certainly appears to me
that attempting to run 0.21 after the fix is a huge mistake.

Any answers to the above questions about the schema will help a ton.
Thanks in advance.

Tom


More information about the mythtv-users mailing list