From 28a5a2693bb6bd079c1feddd3d0c4b5753156d44 Mon Sep 17 00:00:00 2001 From: Deven Bansod Date: Sat, 26 Dec 2015 12:41:48 +0530 Subject: [PATCH 1/3] Fix error in commit : a4f02ca Signed-off-by: Deven Bansod --- libraries/Table.class.php | 2 +- libraries/mysql_charsets.lib.php | 12 +++++++++--- test/classes/PMA_Table_test.php | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/libraries/Table.class.php b/libraries/Table.class.php index f0311ecadd..6a51f794e3 100644 --- a/libraries/Table.class.php +++ b/libraries/Table.class.php @@ -410,7 +410,7 @@ class PMA_Table $type ); if (! empty($collation) && $collation != 'NULL' && $matches) { - $query .= PMA_generateCharsetQueryPart($collation); + $query .= PMA_generateCharsetQueryPart($collation, true); } if ($null !== false) { diff --git a/libraries/mysql_charsets.lib.php b/libraries/mysql_charsets.lib.php index ad8e2284b7..39049aec4d 100644 --- a/libraries/mysql_charsets.lib.php +++ b/libraries/mysql_charsets.lib.php @@ -84,15 +84,21 @@ function PMA_generateCharsetDropdownBox($type = PMA_CSDROPDOWN_COLLATION, /** * Generate the charset query part * - * @param string $collation Collation + * @param string $collation Collation + * @param boolean optional $override force 'CHARACTER SET' keyword * * @return string */ -function PMA_generateCharsetQueryPart($collation) +function PMA_generateCharsetQueryPart($collation, $override = false) { if (!PMA_DRIZZLE) { list($charset) = explode('_', $collation); - return ' CHARSET=' . $charset + $keyword = ' CHARSET='; + + if ($override) { + $keyword = ' CHARACTER SET '; + } + return $keyword . $charset . ($charset == $collation ? '' : ' COLLATE ' . $collation); } else { return ' COLLATE ' . $collation; diff --git a/test/classes/PMA_Table_test.php b/test/classes/PMA_Table_test.php index fa3e902235..1fd6469d2c 100644 --- a/test/classes/PMA_Table_test.php +++ b/test/classes/PMA_Table_test.php @@ -713,7 +713,7 @@ class PMA_Table_Test extends PHPUnit_Framework_TestCase . "COLLATE charset1 NULL DEFAULT 'VARCHAR' " . "AUTO_INCREMENT COMMENT 'PMA comment' AFTER `new_name`"; } else { - $expect = "`name` `new_name` VARCHAR(2) new_name CHARSET=" + $expect = "`name` `new_name` VARCHAR(2) new_name CHARACTER SET " . "charset1 NULL DEFAULT 'VARCHAR' " . "AUTO_INCREMENT COMMENT 'PMA comment' AFTER `new_name`"; } From 74d27e4fe13573927549f99eff90b0bd28673688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A0nh=20Ph=E1=BA=A1m?= Date: Sat, 26 Dec 2015 11:40:42 +0100 Subject: [PATCH 2/3] Translated using Weblate (Vietnamese) Currently translated at 2.3% (76 of 3210 strings) [CI skip] --- po/vi.po | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/po/vi.po b/po/vi.po index e4ed2c4943..4c22232526 100644 --- a/po/vi.po +++ b/po/vi.po @@ -8,10 +8,10 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.5.3-dev\n" "Report-Msgid-Bugs-To: translators@phpmyadmin.net\n" "POT-Creation-Date: 2015-12-16 07:59+0100\n" -"PO-Revision-Date: 2015-10-15 11:36+0200\n" -"Last-Translator: Michal Čihař \n" -"Language-Team: Vietnamese \n" +"PO-Revision-Date: 2015-12-26 11:40+0000\n" +"Last-Translator: Thành Phạm \n" +"Language-Team: Vietnamese " +"\n" "Language: vi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -254,7 +254,7 @@ msgstr "Không có bảng nào trong CSDL." #: libraries/plugins/export/ExportXml.class.php:120 #: templates/database/structure/show_create.phtml:19 msgid "Tables" -msgstr "" +msgstr "Bảng" #: db_export.php:63 libraries/Menu.class.php:317 libraries/Menu.class.php:425 #: libraries/Util.class.php:3350 libraries/Util.class.php:3360 @@ -275,7 +275,7 @@ msgstr "" #: templates/columns_definitions/table_fields_definitions.phtml:3 #: templates/database/designer/table_list.phtml:28 msgid "Structure" -msgstr "" +msgstr "Cấu trúc" #: db_export.php:64 libraries/build_html_for_db.lib.php:38 #: libraries/config/setup.forms.php:333 libraries/config/setup.forms.php:369 @@ -287,11 +287,10 @@ msgstr "" #: libraries/server_privileges.lib.php:1140 #: templates/table/structure/display_table_stats.phtml:12 msgid "Data" -msgstr "" +msgstr "Dữ liệu" #: db_export.php:67 libraries/DbSearch.class.php:446 #: libraries/display_export.lib.php:44 libraries/replication_gui.lib.php:379 -#, fuzzy #| msgid "Select All" msgid "Select all" msgstr "Chọn tất cả" @@ -695,10 +694,9 @@ msgid "PHP extension:" msgstr "" #: index.php:350 -#, fuzzy #| msgid "Last version" msgid "PHP version:" -msgstr " " +msgstr "Phiên bản PHP:" #: index.php:361 msgid "Show PHP information" @@ -954,7 +952,6 @@ msgid "Reset" msgstr "" #: js/messages.php:91 -#, fuzzy #| msgid "Select All" msgid "Reset all" msgstr "Chọn tất cả" @@ -976,10 +973,9 @@ msgid "Please enter a valid length!" msgstr "" #: js/messages.php:98 -#, fuzzy #| msgid "Add a point" msgid "Add index" -msgstr "Thêm điểm" +msgstr "Thêm chỉ mục" #: js/messages.php:99 msgid "Edit index" @@ -2292,7 +2288,7 @@ msgstr "" #: js/messages.php:529 msgid "More" -msgstr "" +msgstr "Thêm" #: js/messages.php:532 #, fuzzy From 32c6726d6888e7e1646e74910ee68d9260f14624 Mon Sep 17 00:00:00 2001 From: Deven Bansod Date: Sun, 27 Dec 2015 10:57:40 +0530 Subject: [PATCH 3/3] ChangeLog entry for issue #11777 Signed-off-by: Deven Bansod --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 3411c01b8b..63fa326be7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ phpMyAdmin - ChangeLog 4.5.4.0 (not yet released) - issue #11724 live data edit of big sets is not working - issue Table list not saved in db QBE bookmarked search +- issue #11777 While 'changing a column', query fails with a syntax error after the 'CHARSET=' keyword 4.5.3.1 (2015-12-25) - issue #11774 Undefined offset 2