Skip to content

Commit

Permalink
Fixed broken storage engine selection on tbl_operation.php
Browse files Browse the repository at this point in the history
  • Loading branch information
roccivic committed Nov 30, 2012
1 parent 222f484 commit 5491e69
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions libraries/operations.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1444,7 +1444,7 @@ function PMA_getQueryAndResultForReorderingTable()
*/
function PMA_getTableAltersArray($is_myisam_or_aria, $is_isam, $pack_keys,
$checksum, $is_aria, $page_checksum, $delay_key_write, $is_innodb,
$is_pbxt, $row_format, $tbl_storage_engine, $transactional, $tbl_collation
$is_pbxt, $row_format, $new_tbl_storage_engine, $transactional, $tbl_collation
) {
$table_alters = array();

Expand All @@ -1454,10 +1454,10 @@ function PMA_getTableAltersArray($is_myisam_or_aria, $is_isam, $pack_keys,
$table_alters[] = 'COMMENT = \''
. PMA_Util::sqlAddSlashes($_REQUEST['comment']) . '\'';
}
if (! empty($_REQUEST['new_tbl_storage_engine'])
&& strtolower($_REQUEST['new_tbl_storage_engine']) !== strtolower($tbl_storage_engine)
if (! empty($new_tbl_storage_engine)
&& strtolower($new_tbl_storage_engine) !== strtolower($GLOBALS['tbl_storage_engine'])
) {
$table_alters[] = 'ENGINE = ' . $_REQUEST['new_tbl_storage_engine'];
$table_alters[] = 'ENGINE = ' . $new_tbl_storage_engine;
}
if (! empty($_REQUEST['tbl_collation'])
&& $_REQUEST['tbl_collation'] !== $tbl_collation
Expand Down
6 changes: 3 additions & 3 deletions tbl_operations.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@
&& strtolower($_REQUEST['new_tbl_storage_engine'])
!== strtolower($tbl_storage_engine)
) {
$tbl_storage_engine = $_REQUEST['new_tbl_storage_engine'];
$new_tbl_storage_engine = $_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
) = PMA_setGlobalVariablesForEngine($tbl_storage_engine);
) = PMA_setGlobalVariablesForEngine($new_tbl_storage_engine);

if ($is_aria) {
$transactional = (isset($transactional) && $transactional == '0')
Expand All @@ -131,7 +131,7 @@
((isset($page_checksum)) ? $page_checksum : ''),
(empty($delay_key_write) ? '0' : '1'),
$is_innodb, $is_pbxt, $row_format,
$tbl_storage_engine,
$new_tbl_storage_engine,
((isset($transactional) && $transactional == '0') ? '0' : '1'),
$tbl_collation
);
Expand Down

0 comments on commit 5491e69

Please sign in to comment.