@@ -1141,9 +1141,9 @@ discard block |
||
1141 | 1141 | "INSERT$ignore INTO `$tableName` VALUES (".implode(",", $vals).")" |
1142 | 1142 | ); |
1143 | 1143 | } |
1144 | - if ($replace) { |
|
1144 | + if ($replace) { |
|
1145 | 1145 | $lineSize += $this->compressManager->write(" ON DUPLICATE KEY UPDATE {$strUpdates}"); |
1146 | - } |
|
1146 | + } |
|
1147 | 1147 | $onlyOnce = false; |
1148 | 1148 | } else { |
1149 | 1149 | $lineSize += $this->compressManager->write(",(".implode(",", $vals).")"); |
@@ -1173,13 +1173,13 @@ discard block |
||
1173 | 1173 | * |
1174 | 1174 | * @return bool |
1175 | 1175 | */ |
1176 | - public function getHasPrimaryKey($tableName) |
|
1177 | - { |
|
1176 | + public function getHasPrimaryKey($tableName) |
|
1177 | + { |
|
1178 | 1178 | foreach ($this->tableColumnTypes[$tableName] as $colName => $colType) { |
1179 | 1179 | if ($colType['key_sql'] == 'PRI') { |
1180 | 1180 | return true; |
1181 | 1181 | } |
1182 | - } |
|
1182 | + } |
|
1183 | 1183 | return false; |
1184 | 1184 | } |
1185 | 1185 | |
@@ -1919,8 +1919,8 @@ discard block |
||
1919 | 1919 | $createTable = preg_replace($match, $replace, $createTable); |
1920 | 1920 | } |
1921 | 1921 | |
1922 | - if ($this->dumpSettings['if-not-exists'] ) { |
|
1923 | - $createTable = preg_replace('/^CREATE TABLE/', 'CREATE TABLE IF NOT EXISTS', $createTable); |
|
1922 | + if ($this->dumpSettings['if-not-exists'] ) { |
|
1923 | + $createTable = preg_replace('/^CREATE TABLE/', 'CREATE TABLE IF NOT EXISTS', $createTable); |
|
1924 | 1924 | } |
1925 | 1925 | |
1926 | 1926 | $ret = "/*!40101 SET @saved_cs_client = @@character_set_client */;".PHP_EOL. |
@@ -1119,7 +1119,7 @@ discard block |
||
1119 | 1119 | $resultSet = $this->dbHandler->query($stmt); |
1120 | 1120 | $resultSet->setFetchMode(PDO::FETCH_ASSOC); |
1121 | 1121 | |
1122 | - $replace = $this->dumpSettings['replace'] && $this->getHasPrimaryKey($tableName); |
|
1122 | + $replace = $this->dumpSettings['replace'] && $this->getHasPrimaryKey($tableName); |
|
1123 | 1123 | $strUpdates = $replace ? $this->getUpdateColumnsOnDuplicate($tableName) : ''; |
1124 | 1124 | $extendedInsert = $this->dumpSettings['extended-insert'] && !$replace; |
1125 | 1125 | $ignore = $this->dumpSettings['insert-ignore'] && !$replace ? ' IGNORE' : ''; |
@@ -1198,7 +1198,7 @@ discard block |
||
1198 | 1198 | $colUpdates[] = "`${colName}`=`${colName}`"; |
1199 | 1199 | } |
1200 | 1200 | } |
1201 | - return implode(',',$colUpdates); |
|
1201 | + return implode(',', $colUpdates); |
|
1202 | 1202 | } |
1203 | 1203 | |
1204 | 1204 | /** |
@@ -1919,7 +1919,7 @@ discard block |
||
1919 | 1919 | $createTable = preg_replace($match, $replace, $createTable); |
1920 | 1920 | } |
1921 | 1921 | |
1922 | - if ($this->dumpSettings['if-not-exists'] ) { |
|
1922 | + if ($this->dumpSettings['if-not-exists']) { |
|
1923 | 1923 | $createTable = preg_replace('/^CREATE TABLE/', 'CREATE TABLE IF NOT EXISTS', $createTable); |
1924 | 1924 | } |
1925 | 1925 | |
@@ -2022,7 +2022,7 @@ discard block |
||
2022 | 2022 | $characterSetClient = $row['character_set_client']; |
2023 | 2023 | $collationConnection = $row['collation_connection']; |
2024 | 2024 | $sqlMode = $row['sql_mode']; |
2025 | - if ( $this->dumpSettings['skip-definer'] ) { |
|
2025 | + if ($this->dumpSettings['skip-definer']) { |
|
2026 | 2026 | if ($functionStmtReplaced = preg_replace( |
2027 | 2027 | '/^(CREATE)\s+('.self::DEFINER_RE.')?\s+(FUNCTION\s.*)$/s', |
2028 | 2028 | '\1 \3', |