[mythtv-users] Error upgrading DB scheme from .20.2 to 21

Mike Holden mythtv at mikeholden.org
Tue May 20 23:04:10 UTC 2008


You don't currently have a duplicate entry, but if you try to insert a new
record with the same key value as an existing record, then the insert
fails because otherwise you WILL have a duplicate.

The error is telling you that you are trying to insert a record that
already exists, and thus the insert fails.

You could maybe try deleting the existing record and letting the upgrade
re-create it perhaps. Make sure you back up your database first before
manual intervention like this though!

Something like:

DELETE FROM settings
WHERE value = 'RecordFilePrefix'
  AND hostname IS NOT NULL
  AND hostname <> '';
-- 
Mike Holden

http://www.by-ang.com - the place to shop for all manner of hand crafted
items, including Jewellery, Greetings Cards and Gifts

Brent Norris wrote:
> Mike Holden wrote:
>> What you should be running is tthe query you posted earlier, which is:
>>
>> SELECT DISTINCT 'Default', hostname, data     FROM settings     WHERE
>> value = 'RecordFilePrefix'         AND hostname IS NOT NULL         AND
>> hostname <> '';
>>
>> mysql> SELECT DISTINCT 'Default', hostname, data     FROM settings
>> WHERE value = 'RecordFilePrefix'         AND hostname IS NOT NULL
>> AND hostname <> '';
>> +---------+-------------+----------------------------+
>> | Default | hostname    | data                       |
>> +---------+-------------+----------------------------+
>> | Default | OLDHOSTNAME | /var/lib/mythtv/recordings |
>> +---------+-------------+----------------------------+
>>
>
> Whoops sorry:
>
> mysql> SELECT DISTINCT 'Default', hostname, data     FROM settings
> WHERE
>      -> value = 'RecordFilePrefix'         AND hostname IS NOT NULL
>      AND
>      -> hostname <> '';
> +---------+----------+----------+
> | Default | hostname | data     |
> +---------+----------+----------+
> | Default | mythback | /storage |
> +---------+----------+----------+
> 1 row in set (0.01 sec)
>
> So this result makes even less sense to me when related to the error
> that is in the log file:
>
> ERROR 1062 (23000): Duplicate entry 'Default-mythback-/storage' for key 2
>
> since it doesn't seem like there is a duplicate entry.
>
> Brent
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>




More information about the mythtv-users mailing list