@@ -1399,37 +1399,37 @@ |
||
1399 | 1399 | |
1400 | 1400 | class CompressGzipstream extends CompressManagerFactory |
1401 | 1401 | { |
1402 | - private $fileHandler = null; |
|
1402 | + private $fileHandler = null; |
|
1403 | 1403 | |
1404 | - private $compressContext; |
|
1404 | + private $compressContext; |
|
1405 | 1405 | |
1406 | - /** |
|
1407 | - * @param string $filename |
|
1408 | - */ |
|
1409 | - public function open($filename) |
|
1410 | - { |
|
1406 | + /** |
|
1407 | + * @param string $filename |
|
1408 | + */ |
|
1409 | + public function open($filename) |
|
1410 | + { |
|
1411 | 1411 | $this->fileHandler = fopen($filename, "wb"); |
1412 | 1412 | if (false === $this->fileHandler) { |
1413 | - throw new Exception("Output file is not writable"); |
|
1413 | + throw new Exception("Output file is not writable"); |
|
1414 | 1414 | } |
1415 | 1415 | |
1416 | 1416 | $this->compressContext = deflate_init(ZLIB_ENCODING_GZIP, ['level' => 9]); |
1417 | 1417 | return true; |
1418 | - } |
|
1418 | + } |
|
1419 | 1419 | |
1420 | - public function write($str) |
|
1421 | - { |
|
1420 | + public function write($str) |
|
1421 | + { |
|
1422 | 1422 | if (false === ($bytesWritten = fwrite($this->fileHandler, deflate_add($this->compressContext, $str, ZLIB_NO_FLUSH)))) { |
1423 | - throw new Exception("Writting to file failed! Probably, there is no more free space left?"); |
|
1423 | + throw new Exception("Writting to file failed! Probably, there is no more free space left?"); |
|
1424 | 1424 | } |
1425 | 1425 | return $bytesWritten; |
1426 | - } |
|
1426 | + } |
|
1427 | 1427 | |
1428 | - public function close() |
|
1429 | - { |
|
1428 | + public function close() |
|
1429 | + { |
|
1430 | 1430 | fwrite($this->fileHandler, deflate_add($this->compressContext, '', ZLIB_FINISH)); |
1431 | 1431 | return fclose($this->fileHandler); |
1432 | - } |
|
1432 | + } |
|
1433 | 1433 | } |
1434 | 1434 | |
1435 | 1435 | /** |
@@ -1937,7 +1937,7 @@ discard block |
||
1937 | 1937 | "Please check 'https://bugs.mysql.com/bug.php?id=14564'"); |
1938 | 1938 | } |
1939 | 1939 | $procedureStmt = $row['Create Procedure']; |
1940 | - if ( $this->dumpSettings['skip-definer'] ) { |
|
1940 | + if ($this->dumpSettings['skip-definer']) { |
|
1941 | 1941 | if ($procedureStmtReplaced = preg_replace( |
1942 | 1942 | '/^(CREATE)\s+('.self::DEFINER_RE.')?\s+(PROCEDURE\s.*)$/s', |
1943 | 1943 | '\1 \3', |
@@ -1968,7 +1968,7 @@ discard block |
||
1968 | 1968 | "Please check 'https://bugs.mysql.com/bug.php?id=14564'"); |
1969 | 1969 | } |
1970 | 1970 | $functionStmt = $row['Create Function']; |
1971 | - if ( $this->dumpSettings['skip-definer'] ) { |
|
1971 | + if ($this->dumpSettings['skip-definer']) { |
|
1972 | 1972 | if ($functionStmtReplaced = preg_replace( |
1973 | 1973 | '/^(CREATE)\s+('.self::DEFINER_RE.')?\s+(FUNCTION\s.*)$/s', |
1974 | 1974 | '\1 \3', |
@@ -2111,7 +2111,7 @@ discard block |
||
2111 | 2111 | |
2112 | 2112 | public function start_transaction() |
2113 | 2113 | { |
2114 | - return "START TRANSACTION " . |
|
2114 | + return "START TRANSACTION ". |
|
2115 | 2115 | "/*!40100 WITH CONSISTENT SNAPSHOT */"; |
2116 | 2116 | } |
2117 | 2117 |