Patch #3404173 InnoDB comment display with tooltips/aliases

This commit is contained in:
Isaac Bennetch
2011-09-07 07:36:00 -04:00
committed by Marc Delisle
parent 2694b3dae0
commit 0bdbde8c90

View File

@@ -66,6 +66,15 @@ $pos = $_SESSION['tmp_user_values']['table_limit_offset'];
*/
function PMA_fillTooltip(&$tooltip_truename, &$tooltip_aliasname, $table)
{
if (strstr($table['Comment'], '; InnoDB free') === false) {
if (!strstr($table['Comment'], 'InnoDB free') === false) {
// here we have just InnoDB generated part
$table['Comment'] = '';
}
} else {
// remove InnoDB comment from end, just the minimal part (*? is non greedy)
$table['Comment'] = preg_replace('@; InnoDB free:.*?$@', '', $table['Comment']);
}
if (empty($table['Comment'])) {
$table['Comment'] = $table['Name'];
} else {