Skip to content

Commit

Permalink
Not closing more cursors than we should
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Nov 1, 2013
1 parent a37455b commit ffb744e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion Cake/Database/Query.php
Expand Up @@ -1651,7 +1651,6 @@ protected function _transformQuery() {

if ($transformed !== $this) {
$this->_transformedQuery = $transformed;

}

return $transformed;
Expand Down
3 changes: 0 additions & 3 deletions Cake/Database/Schema/Collection.php
Expand Up @@ -83,20 +83,17 @@ public function describe($name) {
if (count($statement) === 0) {
throw new Exception(__d('cake_dev', 'Cannot describe %s. It has 0 columns.', $name));
}
$statement->closeCursor();

$table = new Table($name);
foreach ($statement->fetchAll('assoc') as $row) {
$this->_dialect->convertFieldDescription($table, $row);
}
$statement->closeCursor();

list($sql, $params) = $this->_dialect->describeIndexSql($name, $config);
$statement = $this->_executeSql($sql, $params);
foreach ($statement->fetchAll('assoc') as $row) {
$this->_dialect->convertIndexDescription($table, $row);
}
$statement->closeCursor();

list($sql, $params) = $this->_dialect->describeForeignKeySql($name, $config);
$statement = $this->_executeSql($sql, $params);
Expand Down

0 comments on commit ffb744e

Please sign in to comment.