From fafa03f9af32a69eddb0c94c5e76319efecab3eb Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sat, 8 Aug 2015 12:15:16 -0400 Subject: [PATCH 1/2] Revert "Handle comments in the beginning of the query" This reverts commit 55a2d06cca355a4bbbe075d518062e0b4a209aee. Signed-off-by: Marc Delisle --- libraries/plugins/import/ImportSql.class.php | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/libraries/plugins/import/ImportSql.class.php b/libraries/plugins/import/ImportSql.class.php index 20161f8896..8226b57fcc 100644 --- a/libraries/plugins/import/ImportSql.class.php +++ b/libraries/plugins/import/ImportSql.class.php @@ -253,7 +253,6 @@ class ImportSql extends ImportPlugin { $this->_firstSearchChar = null; $firstSqlDelimiter = null; - $commentStartPosition = null; $matches = null; /* while not at end of line */ @@ -273,14 +272,6 @@ class ImportSql extends ImportPlugin "\n", $this->_delimiterPosition ); - //Set _queryBeginPosition if comment is at the beginning of the query - if ($commentStartPosition === 0) { - if (false === $posClosingComment) { - $this->_queryBeginPosition = $this->_stringFctToUse['strlen']($this->_data); - } else { - $this->_queryBeginPosition = $posClosingComment + 1; - } - } if (false === $posClosingComment) { return false; } @@ -288,7 +279,6 @@ class ImportSql extends ImportPlugin $this->_delimiterPosition = $posClosingComment + 1; $this->_isInComment = false; $this->_openingComment = null; - $commentStartPosition = null; } elseif ('/*' === $this->_openingComment) { //Search for closing comment $posClosingComment = $this->_stringFctToUse['strpos']( @@ -296,14 +286,6 @@ class ImportSql extends ImportPlugin '*/', $this->_delimiterPosition ); - //Set _queryBeginPosition if comment is at the beginning of the query - if ($commentStartPosition === 0) { - if (false === $posClosingComment) { - $this->_queryBeginPosition = $this->_stringFctToUse['strlen']($this->_data); - } else { - $this->_queryBeginPosition = $posClosingComment + 2; - } - } if (false === $posClosingComment) { return false; } @@ -311,7 +293,6 @@ class ImportSql extends ImportPlugin $this->_delimiterPosition = $posClosingComment + 2; $this->_isInComment = false; $this->_openingComment = null; - $commentStartPosition = null; } else { //We shouldn't be able to come here. //throw new Exception('Unknown case.'); @@ -380,7 +361,6 @@ class ImportSql extends ImportPlugin if (in_array($specialChars, array('#', '-- ', '/*'))) { $this->_isInComment = true; $this->_openingComment = $specialChars; - $commentStartPosition = $this->_firstSearchChar; //Move before comment opening. $this->_delimiterPosition = $this->_firstSearchChar + $this->_stringFctToUse['strlen']($specialChars); From cbb921a2ecf34aa83b67f9a6dcc133d094ef465c Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sat, 8 Aug 2015 12:15:59 -0400 Subject: [PATCH 2/2] 4.4.13.1 release date Signed-off-by: Marc Delisle --- ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index 73b5267fe4..4ce527e8fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,9 @@ phpMyAdmin - ChangeLog 4.4.14.0 (not yet released) +4.4.13.1 (2015-08-08) +- issue #11368 SQL error when importing phpMyAdmin dump file + 4.4.13.0 (2015-08-07) - issue #1808 "Improve table structure" generates invalid SQL - issue Once checked "Show only active" checkbox is always checked