[mythtv-users] phpmyadmin no unique on settings table?

Hika van den Hoven hikavdh at gmail.com
Thu Jul 2 19:13:06 UTC 2015


Hoi Dan,

Thursday, July 2, 2015, 9:01:37 PM, you wrote:

> On 7/2/15 2:06 PM, Hika van den Hoven wrote:
>> Hoi Hika,
>>
>> Thursday, July 2, 2015, 8:01:48 PM, you wrote:
>>
>>> Hoi Dan,
>>> Thursday, July 2, 2015, 7:19:13 PM, you wrote:
>>>> On 7/2/15 11:56 AM, Hika van den Hoven wrote:
>>>>> Hoi Dan,
>>>>>
>>>>> Thursday, July 2, 2015, 2:49:11 PM, you wrote:
>>>>>
>>>>>> On 7/1/15 10:39 PM, Hika van den Hoven wrote:
>>>>>>> Hoi Steven,
>>>>>>>
>>>>>>> Thursday, July 2, 2015, 4:23:27 AM, you wrote:
>>>>>>>
>>>>>>>> just got a new system running with an old database and when I go to
>>>>>>>> the settings table in phpmyadmin I now get this error,
>>>>>>>> "This table does not contain a unique column. Grid edit, checkbox,
>>>>>>>> Edit, Copy and Delete features are not available."
>>>>>>>> and am unable to edit any of the entries.
>>>>>>>> did I do something wrong in my import? or was this table always this
>>>>>>>> way, and if so, is there a way to fix this without affecting mythtv?
>>>>>>>> can I just add a new column to make it the unique column?
>>>>>>> The settings table has no index, so is not easily editable in
>>>>>>> phpmyadmin. Probably you got phpmyadmin complaining about a lack of
>>>>>>> prime index.
>>>>>> Mine has a primary key, and the table should according to
>>>>>> libs/libmythtv/dbcheck.cpp:
>>>>>> "CREATE TABLE settings ("
>>>>>> "  `value` varchar(128) NOT NULL DEFAULT '',"
>>>>>> "  `data` varchar(16000) NOT NULL DEFAULT '',"
>>>>>> "  hostname varchar(64) DEFAULT NULL,"
>>>>>> "  KEY `value` (`value`,hostname)"
>>>>>> ") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
>>>>>> I suggest the OP add it, as operating without one will surely be slower.
>>>>>> _______________________________________________
>>>>> It's just an Index not a key. A Key does not allow duplicates, so
>>>>> unusable
>>>> Huh? In SQL the line:
>>>>     KEY `value` (`value`,hostname)"
>>>> means it's the primary key, not merely an index. An index would use the
>>>> keyword INDEX.
>>>> _______________________________________________
>>> Then you have a problem! It must be an index not a key. If it is a key
>>> you kan not have the same value for different hosts!
>> I now see you have it on value and hostname. My scheme was
>> automatically setup. Originally on 0.26 and then upgraded to 0.27 and
>> there only is an Index on value. Maybe you run 0.28?
>>
> It is most definitely a multi-column key, not an index. What I quoted in
> my original response is taken directly from the 0.27 source code, in 
> libs/libmythtv/dbcheck.cpp. So it's your database that is incorrect for
> some reason.
> _______________________________________________

Weird! As said I installed it 2 years ago on 0.26 with the official
scheme and upgraded to 0.27. So either of the two was incorrect!
I touch content but never the scheme and the db-check script runs
every night?


Tot mails,
  Hika                            mailto:hikavdh at gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens



More information about the mythtv-users mailing list