From 6f802746d6887e3ea3dc30513a5f80ec27d9e7dd Mon Sep 17 00:00:00 2001 From: Dan Ungureanu Date: Tue, 6 Oct 2015 23:18:03 +0300 Subject: [PATCH 1/3] Fix #11542. Import parser broken in 4.5.x.x. Cherry-picked udan11/sql-parser@402890bc7b74534f2150bba7dc40562bf436b085. Signed-off-by: Dan Ungureanu --- libraries/sql-parser/src/Utils/BufferedQuery.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/libraries/sql-parser/src/Utils/BufferedQuery.php b/libraries/sql-parser/src/Utils/BufferedQuery.php index 1da0b81dfe..7a2e5f4374 100644 --- a/libraries/sql-parser/src/Utils/BufferedQuery.php +++ b/libraries/sql-parser/src/Utils/BufferedQuery.php @@ -186,19 +186,31 @@ class BufferedQuery $loopLen = $end ? $len : $len - 16; for (; $i < $loopLen; ++$i) { + /** + * Handling backslash. + * + * Even if the next character is a special character that should be + * treated differently, because of the preceding backslash, it will + * be ignored. + */ + if ($this->query[$i] === '\\') { + $this->current .= $this->query[$i] . $this->query[++$i]; + continue; + } + /* * Handling special parses statuses. */ if ($this->status === static::STATUS_STRING_SINGLE_QUOTES) { // Single-quoted strings like 'foo'. - if (($this->query[$i - 1] != '\\') && ($this->query[$i] === '\'')) { + if ($this->query[$i] === '\'') { $this->status = 0; } $this->current .= $this->query[$i]; continue; } elseif ($this->status === static::STATUS_STRING_DOUBLE_QUOTES) { // Double-quoted strings like "bar". - if (($this->query[$i - 1] != '\\') && ($this->query[$i] === '"')) { + if ($this->query[$i] === '"') { $this->status = 0; } $this->current .= $this->query[$i]; From 1fb6395e613bbaaab5199cf0f6f4ef25853335ed Mon Sep 17 00:00:00 2001 From: disorderman Date: Tue, 6 Oct 2015 16:42:49 +0200 Subject: [PATCH 2/3] Translated using Weblate (Chinese (China)) Currently translated at 84.4% (2711 of 3209 strings) [CI skip] --- po/zh_CN.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/po/zh_CN.po b/po/zh_CN.po index ea0e3c37ea..1226f263af 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.5.0-beta2\n" "Report-Msgid-Bugs-To: translators@phpmyadmin.net\n" "POT-Creation-Date: 2015-09-06 07:29-0400\n" -"PO-Revision-Date: 2015-10-06 11:54+0200\n" +"PO-Revision-Date: 2015-10-06 16:42+0200\n" "Last-Translator: disorderman \n" "Language-Team: Chinese (China) " "\n" @@ -15483,7 +15483,7 @@ msgstr "横坐标:" #: templates/table/chart/tbl_chart.phtml:72 msgid "Series:" -msgstr "数据系列:" +msgstr "图例项(系列):" #: templates/table/chart/tbl_chart.phtml:102 msgid "X-Axis label:" @@ -15508,7 +15508,7 @@ msgstr "数据系列名称位于一个字段中" #: templates/table/chart/tbl_chart.phtml:118 #| msgid "Inside column:" msgid "Series column:" -msgstr "数据系列字段:" +msgstr "水平(分类)轴标签字段:" #: templates/table/chart/tbl_chart.phtml:130 #| msgid "Values for column %s" From ee958f08cba82e0c83da705b41db99cd941c12bd Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Tue, 6 Oct 2015 16:42:47 -0400 Subject: [PATCH 3/3] ChangeLog entry Signed-off-by: Marc Delisle --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 8aa5eac66b..1a963a2c55 100644 --- a/ChangeLog +++ b/ChangeLog @@ -28,6 +28,7 @@ phpMyAdmin - ChangeLog - issue #11541 Missing arguments for PMA_Table::generateAlter() - issue #11544 Notices about undefined indexes on structure pages of information_schema tables - issue Change minimum PHP version for Composer +- issue #11542 Import parser and backslash 4.5.0.2 (2015-09-25) - issue #11497 Incorrect indexes when exporting