|
@@ -58,13 +58,12 @@ class ConnBase
|
|
$connection = $this->_connections['WRITE'] = $this->getWriteConnection();
|
|
$connection = $this->_connections['WRITE'] = $this->getWriteConnection();
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
if(get_called_class() == 'Qii\Driver\Pdo\Connection'){
|
|
if(get_called_class() == 'Qii\Driver\Pdo\Connection'){
|
|
$connection->setAttribute(\PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);
|
|
$connection->setAttribute(\PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);
|
|
$connection->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_WARNING);
|
|
$connection->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_WARNING);
|
|
$connection->query('set names utf8');
|
|
$connection->query('set names utf8');
|
|
}
|
|
}
|
|
return $connection;
|
|
return $connection;
|
|
- throw new \Exception('Call undefined driver', __LINE__);
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|