Ejemplo n.º 1
0
         $GLOBALS['db'] = $oldDb;
         $GLOBALS['dbi']->selectDb($oldDb);
         $_message .= $pma_table->getLastMessage();
         $result = true;
         $GLOBALS['table'] = $pma_table->getName();
         $reread_info = true;
         $reload = true;
     } else {
         $_message .= $pma_table->getLastError();
         $result = false;
     }
 }
 if (!empty($_REQUEST['new_tbl_storage_engine']) && mb_strtoupper($_REQUEST['new_tbl_storage_engine']) !== $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) = PMA_setGlobalVariablesForEngine($new_tbl_storage_engine);
     if ($is_aria) {
         $create_options['transactional'] = isset($create_options['transactional']) && $create_options['transactional'] == '0' ? '0' : '1';
         $create_options['page_checksum'] = isset($create_options['page_checksum']) ? $create_options['page_checksum'] : '';
     }
 } else {
     $new_tbl_storage_engine = '';
 }
 $table_alters = PMA_getTableAltersArray($is_myisam_or_aria, $is_isam, $create_options['pack_keys'], empty($create_options['checksum']) ? '0' : '1', $is_aria, isset($create_options['page_checksum']) ? $create_options['page_checksum'] : '', empty($create_options['delay_key_write']) ? '0' : '1', $is_innodb, $is_pbxt, $create_options['row_format'], $new_tbl_storage_engine, isset($create_options['transactional']) && $create_options['transactional'] == '0' ? '0' : '1', $tbl_collation);
 if (count($table_alters) > 0) {
     $sql_query = 'ALTER TABLE ' . PMA\libraries\Util::backquote($GLOBALS['table']);
     $sql_query .= "\r\n" . implode("\r\n", $table_alters);
     $sql_query .= ';';
     $result .= $GLOBALS['dbi']->query($sql_query) ? true : false;
     $reread_info = true;
     unset($table_alters);
Ejemplo n.º 2
0
            $reload = true;
        } else {
            $_message .= $pma_table->getLastError();
            $result = false;
        }
    }

    if (! empty($_REQUEST['new_tbl_storage_engine'])
        && strtolower($_REQUEST['new_tbl_storage_engine'])
            !== strtolower($tbl_storage_engine)
    ) {
        $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);

        if ($is_aria) {
            $transactional = (isset($transactional) && $transactional == '0')
                ? '0'
                : '1';
            $page_checksum = (isset($page_checksum)) ? $page_checksum : '';
        }
    }

    $table_alters = PMA_getTableAltersArray(
        $is_myisam_or_aria, $is_isam, $pack_keys,
        (empty($checksum) ? '0' : '1'),
        $is_aria,
        ((isset($page_checksum)) ? $page_checksum : ''),
        (empty($delay_key_write) ? '0' : '1'),