bug #1764195 [views] DROP button does not work on defective views
This commit is contained in:
@@ -12,6 +12,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
|
||||
- bug #1798646 [display] Character '+' in query wrongly interpreted
|
||||
- bug #1801919 [themes] Do not use NaviDatabaseNameColor for fieldset legend
|
||||
- bug #1764735 [core] Designer: PDF error when deleting a table
|
||||
- bug #1764195 [views] DROP button does not work on defective views
|
||||
|
||||
2.11.1.0 (2007-09-20)
|
||||
|
||||
|
@@ -252,7 +252,9 @@ class PMA_Table {
|
||||
// MySQL from 5.0.0 to 5.0.12 returns 'view',
|
||||
// from 5.0.13 returns 'VIEW'.
|
||||
$comment = strtoupper(PMA_DBI_fetch_value('SHOW TABLE STATUS FROM ' . PMA_backquote($db) . ' LIKE \'' . $table . '\'', 0, 'Comment'));
|
||||
return ($comment == 'VIEW');
|
||||
// use substr() because the comment might contain something like:
|
||||
// (VIEW 'BASE2.VTEST' REFERENCES INVALID TABLE(S) OR COLUMN(S) OR FUNCTION)
|
||||
return (substr($comment, 0, 4) == 'VIEW');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -56,10 +56,7 @@ if ($table_info_result && PMA_DBI_num_rows($table_info_result) > 0) {
|
||||
if (!isset($showtable['Type']) && isset($showtable['Engine'])) {
|
||||
$showtable['Type'] =& $showtable['Engine'];
|
||||
}
|
||||
// MySQL < 5.0.13 returns "view", >= 5.0.13 returns "VIEW"
|
||||
if (PMA_MYSQL_INT_VERSION >= 50000 && !isset($showtable['Type'])
|
||||
&& isset($showtable['Comment'])
|
||||
&& strtoupper($showtable['Comment']) == 'VIEW') {
|
||||
if (PMA_Table::isView($GLOBALS['db'], $GLOBALS['table'])) {
|
||||
$tbl_is_view = true;
|
||||
$tbl_type = $GLOBALS['strView'];
|
||||
$show_comment = null;
|
||||
|
Reference in New Issue
Block a user