Table with name 'log_views' is incorrectly displayed as a view in phpMyAdmin interface. phpMyAdmin 3.1.4, MySQL 5.0.45, PHP 5. Created using:
CREATE TABLE IF NOT EXISTS `log_views` (
`id` int(10) unsigned NOT NULL auto_increment COMMENT 'View ID',
`visit_id` int(10) unsigned NOT NULL COMMENT 'Visit ID',
`section_id` int(10) unsigned NOT NULL COMMENT 'Section ID',
`uri` varchar(2083) NOT NULL COMMENT 'URI',
`ip` varchar(39) NOT NULL COMMENT 'IP Address',
`date_visited` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP COMMENT 'Date Visited',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='View Log';
Problem seems to be interface only. From PHP or console, table can be used as normal, but from phpMyAdmin only the view features are available. 'View' has to be dropped manually because phpMyAdmin generates a DROP VIEW command instead of a DROP TABLE command (which fails, because there is no view).
Confirmed.
We currently check if PMA_Table::sGetStatusInfo($db, $table, 'Comment') begins with 'view'. And your comment matches :)
I see a solution in using something like PMA_Table::sGetStatusInfo($db, $table, 'TABLE_TYPE'), but due to the history of this code I will have to do some digging around the compatibility in different MySQL versions.
Helmo,
in phpMyAdmin 3.x we require MySQL 5.x or newer.
Fixed in subversion for 3.1.5 and 3.2.
Thanks for reporting
Thanks for the quick response (and the explanation so I can avoid it in the meantime).