From 11bdb47d5785052e593a0534bfa6009e2e5770de Mon Sep 17 00:00:00 2001
From: "Alexander M. Turek"
' . ' ' . sprintf($strDefaultEngine, htmlspecialchars($mysql_storage_engines[$engine]['Engine'])) . "\n" . '
' . "\n"; + $engine_supported = TRUE; break; case 'YES': echo '' . "\n" . ' ' . sprintf($strEngineAvailable, htmlspecialchars($mysql_storage_engines[$engine]['Engine'])) . "\n" . '
' . "\n"; + $engine_supported = TRUE; break; case 'NO': echo '' . "\n" @@ -107,25 +110,30 @@ if (empty($engine) || empty($mysql_storage_engines[$engine])) { break; } - switch ($engine) { + if ($engine_supported) switch ($engine) { case 'innodb': case 'innobase': - echo '
' . "\n" - . htmlspecialchars($row[0]) . "\n" - . '' . "\n"; - PMA_DBI_free_result($res); - break; + if ($res = PMA_DBI_try_query('SHOW INNODB STATUS;')) { // We might not have the privileges to do that... + echo '
' . "\n" + . htmlspecialchars($row[0]) . "\n" + . '' . "\n"; + PMA_DBI_free_result($res); + unset($row); + break; + } + unset($res); +// break; default: echo '
' . "\n" . ' ' . $strNoDetailsForEngine . "\n" . '
' . "\n"; break; } + unset($engine_supported); }