Skip to content

Commit 194383e

Browse files
committed
code cleaning
1 parent 99168e0 commit 194383e

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/Ifsnop/Mysqldump/Mysqldump.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ private function listValues($tablename)
390390
$lineSize = $this->_compressManager->write(";\n");
391391
}
392392
}
393+
$resultSet->closeCursor();
393394

394395
if (!$onlyOnce) {
395396
$this->_compressManager->write(";\n");
@@ -744,12 +745,13 @@ public function add_drop_database()
744745

745746
$ret .= "/*!40000 DROP DATABASE IF EXISTS `" . $dbName . "`*/;\n";
746747

747-
$rs = $dbHandler->query("SHOW VARIABLES LIKE 'character_set_database';");
748-
$characterSet = $rs->fetchColumn(1);
749-
$rs->closeCursor();
748+
$resultSet = $dbHandler->query("SHOW VARIABLES LIKE 'character_set_database';");
749+
$characterSet = $resultSet->fetchColumn(1);
750+
$resultSet->closeCursor();
750751

751-
$rs = $dbHandler->query("SHOW VARIABLES LIKE 'collation_database';");
752-
$collationDb = $rs->fetchColumn(1);
752+
$resultSet = $dbHandler->query("SHOW VARIABLES LIKE 'collation_database';");
753+
$collationDb = $resultSet->fetchColumn(1);
754+
$resultSet->closeCursor();
753755

754756
$ret .= "CREATE DATABASE /*!32312 IF NOT EXISTS*/ `" . $dbName .
755757
"` /*!40100 DEFAULT CHARACTER SET " . $characterSet .

0 commit comments

Comments
 (0)