N98\Magento\Command\Database\Maintain\CheckTablesCommand::_checkMyISAM PHP Method

_checkMyISAM() protected method

protected _checkMyISAM ( string $tableName ) : array
$tableName string
return array
    protected function _checkMyISAM($tableName)
    {
        $table = array();
        $type = $this->input->getOption('type');
        $result = $this->_query(sprintf('CHECK TABLE %s %s', $tableName, $type));
        if ($result['Msg_text'] == self::MESSAGE_CHECK_NOT_SUPPORTED) {
            return array();
        }
        $table[] = array('table' => $tableName, 'operation' => $result['Op'], 'type' => $type, 'status' => $result['Msg_text']);
        if ($result['Msg_text'] != 'OK' && $this->input->getOption('repair')) {
            $result = $this->_query(sprintf('REPAIR TABLE %s %s', $tableName, $type));
            if ($result['Msg_text'] != self::MESSAGE_REPAIR_NOT_SUPPORTED) {
                $table[] = array('table' => $tableName, 'operation' => $result['Op'], 'type' => $type, 'status' => $result['Msg_text']);
            }
        }
        return $table;
    }