[mythtv] Ticket #8215: MythWeb hostname/setting hostname comparison is not case-insensitive

Jeremy Palenchar jeremy at palenchar.net
Fri Jun 11 18:59:21 UTC 2010


I wrote a tool in a former life that would compare the schemas of two
different databases and then generate the sql code necessary to make one
look like the other.

Would it make sense to have such a tool for Myth to repair schemas?

-Jeremy



-----Original Message-----
From: mythtv-dev-bounces at mythtv.org [mailto:mythtv-dev-bounces at mythtv.org]
On Behalf Of Michael T. Dean
Sent: Friday, June 11, 2010 6:17 AM
To: Development of mythtv
Subject: Re: [mythtv] Ticket #8215: MythWeb hostname/setting hostname
comparison is not case-insensitive

On 06/11/2010 08:55 AM, Raymond Wagner wrote:
> On 6/11/2010 07:52, ryan patterson wrote:
>>>   We control this via the database:
>>>   {{{
>>>   mysql>  SELECT DISTINCT hostname FROM settings\G
>>>   *************************** 1. row ***************************
>>>   hostname: jessica
>>>
>>>   mysql>  SELECT COUNT(0) FROM settings WHERE hostname = 'JESSICA'\G
>>>   *************************** 1. row ***************************
>>>   COUNT(0): 340
>>>
>>>   mysql>  SELECT COUNT(0) FROM settings WHERE hostname = 'JeSsIcA'\G
>>>   *************************** 1. row ***************************
>>>   COUNT(0): 340
>>>   }}}
>>>
>>>   So in short, fix the database and all should be wel.
>> I don't mean to be a pain, but I don't understand why this has 
>> (again) been marked invalid.
> When you access a MySQL database through PHP, all you are doing is 
> sending those query strings through to the server. He's showing you 
> that on his system, those same queries are case insensitive. I just 
> tested and they are on mine as well. If yours are not, then your 
> database is not configured in the manner that MythTV expects. This is 
> configuration error, and not a bug.

In other words, your database schema is corrupt.  This is one of the
situations where a database partial restore is a good idea.

Back up your database, drop the existing database, create a new database
schema by running mythtv-setup and then exiting mythtv-setup, then do a
partial restore (
http://www.mythtv.org/wiki/Database_Backup_and_Restore#Partial_restore_of_a_
backup
) of the original backup.  Because you let mythtv-setup create the schema
instead of using the broken schema in your backup, it will be a proper
schema without the modifications/corruption that broke your original schema.
After the partial restore, you need to reconfigure /everything/ in
mythtv-setup and mythfrontend settings for every single host in your system
(because all you will have kept is the recordings, recording rules, and
recording history data).

Mike
_______________________________________________
mythtv-dev mailing list
mythtv-dev at mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev



More information about the mythtv-dev mailing list