From 3b0f465ba939acf513bab03ba1c1088266d1113f Mon Sep 17 00:00:00 2001 From: Piotr Przybylski Date: Thu, 23 Jun 2011 00:44:42 +0200 Subject: [PATCH 1/2] Fix StorageEngine::getStorageEngines() so it can properly cache data --- libraries/StorageEngine.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/StorageEngine.class.php b/libraries/StorageEngine.class.php index 750489543b..a4d058f63e 100644 --- a/libraries/StorageEngine.class.php +++ b/libraries/StorageEngine.class.php @@ -58,11 +58,11 @@ class PMA_StorageEngine { static $storage_engines = null; - if (null !== $storage_engines) { - return $storage_engines; + if (null == $storage_engines) { + $storage_engines = PMA_DBI_fetch_result('SHOW STORAGE ENGINES', 'Engine'); } - return PMA_DBI_fetch_result('SHOW STORAGE ENGINES', 'Engine'); + return $storage_engines; } /** From 5661c3e14cefe79d01ec8b049d0a8efe4905a2ba Mon Sep 17 00:00:00 2001 From: Piotr Przybylski Date: Thu, 23 Jun 2011 00:49:01 +0200 Subject: [PATCH 2/2] Don't offer PERFORMANCE_SCHEMA engine in table creation dialog and Operations tab --- libraries/StorageEngine.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/StorageEngine.class.php b/libraries/StorageEngine.class.php index a4d058f63e..bcb4f684f4 100644 --- a/libraries/StorageEngine.class.php +++ b/libraries/StorageEngine.class.php @@ -88,7 +88,8 @@ class PMA_StorageEngine foreach (PMA_StorageEngine::getStorageEngines() as $key => $details) { if (!$offerUnavailableEngines - && ($details['Support'] == 'NO' || $details['Support'] == 'DISABLED')) { + && ($details['Support'] == 'NO' || $details['Support'] == 'DISABLED' + || $details['Engine'] == 'PERFORMANCE_SCHEMA')) { continue; }