From afe00d7c10f5894b33e0cd855669731787935018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 9 Feb 2016 16:49:53 +0100 Subject: [PATCH 1/2] The storage engine needs to be upper case all the time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit So far the current was uppercase, but the possibly new was lower case leading to many weird effects. Fixes #11930 Signed-off-by: Michal Čihař --- ChangeLog | 1 + tbl_operations.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 02b3f827a1..986cea3f7a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ phpMyAdmin - ChangeLog - issue #11881 Full processlist lost on refresh - issue #11834 Adjust privileges fails if database name contains underscores - issue #11906 'Loading...' banner shows on login screen +- issue #11930 Fixed changing of table parameters, eg. AUTO_INCREMENT 4.5.4.1 (2016-01-29) - issue #11892 Error with PMA 4.4.15.3 diff --git a/tbl_operations.php b/tbl_operations.php index a4402d45f9..9dcaa6ffa0 100644 --- a/tbl_operations.php +++ b/tbl_operations.php @@ -136,9 +136,9 @@ if (isset($_REQUEST['submitoptions'])) { } if (! empty($_REQUEST['new_tbl_storage_engine']) - && /*overload*/mb_strtolower($_REQUEST['new_tbl_storage_engine']) !== $tbl_storage_engine + && /*overload*/mb_strtoupper($_REQUEST['new_tbl_storage_engine']) !== $tbl_storage_engine ) { - $new_tbl_storage_engine = $_REQUEST['new_tbl_storage_engine']; + $new_tbl_storage_engine = mb_strtoupper($_REQUEST['new_tbl_storage_engine']); // reset the globals for the new engine list($is_myisam_or_aria, $is_innodb, $is_isam, $is_berkeleydb, $is_aria, $is_pbxt From 84ed3ae6ca1dcb6cb1f6f246debf366f8c7c67a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 9 Feb 2016 16:53:37 +0100 Subject: [PATCH 2/2] Correctly document what this function expects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue #11930, #11931 Signed-off-by: Michal Čihař --- libraries/operations.lib.php | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/libraries/operations.lib.php b/libraries/operations.lib.php index 950d002256..597bdd466b 100644 --- a/libraries/operations.lib.php +++ b/libraries/operations.lib.php @@ -1847,26 +1847,24 @@ function PMA_getTableAltersArray($is_myisam_or_aria, $is_isam, $pack_keys, /** * set initial value of the set of variables, based on the current table engine * - * @param string $tbl_storage_engine table storage engine + * @param string $tbl_storage_engine table storage engine in upper case * * @return array ($is_myisam_or_aria, $is_innodb, $is_isam, * $is_berkeleydb, $is_aria, $is_pbxt) */ function PMA_setGlobalVariablesForEngine($tbl_storage_engine) { - $upperTblStorEngine = $tbl_storage_engine; - //Options that apply to MYISAM usually apply to ARIA - $is_myisam_or_aria = ($upperTblStorEngine == 'MYISAM' - || $upperTblStorEngine == 'ARIA' - || $upperTblStorEngine == 'MARIA' + $is_myisam_or_aria = ($tbl_storage_engine == 'MYISAM' + || $tbl_storage_engine == 'ARIA' + || $tbl_storage_engine == 'MARIA' ); - $is_aria = ($upperTblStorEngine == 'ARIA'); + $is_aria = ($tbl_storage_engine == 'ARIA'); - $is_isam = ($upperTblStorEngine == 'ISAM'); - $is_innodb = ($upperTblStorEngine == 'INNODB'); - $is_berkeleydb = ($upperTblStorEngine == 'BERKELEYDB'); - $is_pbxt = ($upperTblStorEngine == 'PBXT'); + $is_isam = ($tbl_storage_engine == 'ISAM'); + $is_innodb = ($tbl_storage_engine == 'INNODB'); + $is_berkeleydb = ($tbl_storage_engine == 'BERKELEYDB'); + $is_pbxt = ($tbl_storage_engine == 'PBXT'); return array( $is_myisam_or_aria, $is_innodb, $is_isam,