예제 #1
0
            $_message .= $pma_table->getLastError();
            $result = false;
        }
    }
    if (!empty($_REQUEST['new_tbl_storage_engine']) && mb_strtolower($_REQUEST['new_tbl_storage_engine']) !== mb_strtolower($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($new_tbl_storage_engine);
        if ($is_aria) {
            $transactional = isset($transactional) && $transactional == '0' ? '0' : '1';
            $page_checksum = isset($page_checksum) ? $page_checksum : '';
        }
    } else {
        $new_tbl_storage_engine = '';
    }
    $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', $is_innodb, $is_pbxt, $row_format, $new_tbl_storage_engine, isset($transactional) && $transactional == '0' ? '0' : '1', $tbl_collation);
    if (count($table_alters) > 0) {
        $sql_query = 'ALTER TABLE ' . PMA_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);
        $warning_messages = PMA_getWarningMessagesArray();
    }
}
/**
 * Reordering the table has been requested by the user
 */
if (isset($_REQUEST['submitorderby']) && !empty($_REQUEST['order_field'])) {
    list($sql_query, $result) = PMA_getQueryAndResultForReorderingTable();
예제 #2
0
            $_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);
        $warning_messages = PMA_getWarningMessagesArray();
    }
    if (isset($_REQUEST['tbl_collation']) && !empty($_REQUEST['tbl_collation']) && isset($_REQUEST['change_all_collations']) && !empty($_REQUEST['change_all_collations'])) {
        PMA_changeAllColumnsCollation($GLOBALS['db'], $GLOBALS['table'], $_REQUEST['tbl_collation']);
    }
}
/**
 * Reordering the table has been requested by the user
예제 #3
0
            $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']);
        if ($pma_table->isEngine('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($pma_table, $create_options['pack_keys'], empty($create_options['checksum']) ? '0' : '1', isset($create_options['page_checksum']) ? $create_options['page_checksum'] : '', empty($create_options['delay_key_write']) ? '0' : '1', $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);
        $warning_messages = PMA_getWarningMessagesArray();
    }
    if (isset($_REQUEST['tbl_collation']) && !empty($_REQUEST['tbl_collation']) && isset($_REQUEST['change_all_collations']) && !empty($_REQUEST['change_all_collations'])) {
        PMA_changeAllColumnsCollation($GLOBALS['db'], $GLOBALS['table'], $_REQUEST['tbl_collation']);
    }
}
/**
 * Reordering the table has been requested by the user