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

Hika van den Hoven hikavdh at gmail.com
Thu Jul 2 20:57:52 UTC 2015


Hoi Bill,

Thursday, July 2, 2015, 9:57:03 PM, you wrote:

> On 07/02/2015 01:06 PM, Hika van den Hoven wrote:
> ...
>>>>> Hoi Dan,
>>>>>
>>>>> Thursday, July 2, 2015, 2:49:11 PM, you wrote:
> ...
>>>>>> 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 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?

> Sorry, it's the same in 0.28-pre...

mysql>> SHOW CREATE TABLE settings\G
> ...
> 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

> The output from: SHOW INDEX FROM settings\G appears to me (a non-DB-guru)
> as having both value and hostname too.

> *************************** 1. row ***************************
>          Table: settings
>     Non_unique: 1
>       Key_name: value
>   Seq_in_index: 1
>    Column_name: value
>      Collation: A
>    Cardinality: 745
>       Sub_part: NULL
>         Packed: NULL
>           Null:
>     Index_type: BTREE
>        Comment:
> Index_comment:
> *************************** 2. row ***************************
>          Table: settings
>     Non_unique: 1
>       Key_name: value
>   Seq_in_index: 2
>    Column_name: hostname
>      Collation: A
>    Cardinality: 2235
>       Sub_part: NULL
>         Packed: NULL
>           Null: YES
>     Index_type: BTREE
>        Comment:
> Index_comment:
> 2 rows in set (0.00 sec)

> If the OP's output matches the above (with the exception of the Cardinality: number)
> then the DB is OK. Perhaps it's the tool.


It's why he could not edit the table in phpmyadmin. Because there was
no Index. Just like on my system. If he is running Gentoo it could be
that the scheme coming with the installation there is faulty

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