From 3f47fcf9ea4c37688d3ed9c4a8d95986b49a1e99 Mon Sep 17 00:00:00 2001 From: Burak Yavuz Date: Wed, 27 May 2015 18:54:16 +0200 Subject: [PATCH 1/2] Translated using Weblate (Turkish) Currently translated at 100.0% (3035 of 3035 strings) [CI skip] --- po/tr.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/po/tr.po b/po/tr.po index abbc54cd6b..25ee9b9069 100644 --- a/po/tr.po +++ b/po/tr.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.4.6-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2015-05-05 15:46-0400\n" -"PO-Revision-Date: 2015-05-06 09:26+0200\n" +"PO-Revision-Date: 2015-05-27 18:54+0200\n" "Last-Translator: Burak Yavuz \n" "Language-Team: Turkish " "\n" From 2b143889049f8304ad4e50bc6ef485b13b2d5956 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Thu, 28 May 2015 07:21:07 +0530 Subject: [PATCH 2/2] bug #4930 Database copy doesn't work for tables with more than one FULLTEXT index Signed-off-by: Madhura Jayaratne --- ChangeLog | 1 + libraries/Table.class.php | 61 ++++++++++++++++++++++++++------------- 2 files changed, 42 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index e471ec9e58..b5a6908847 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ phpMyAdmin - ChangeLog - bug #4918 Date field popup dialog position bug - bug In /setup, PMA_messages is not defined - bug #4924 Recaptcha failure +- bug #4930 Database copy doesn't work for tables with more than one FULLTEXT index 4.4.7.0 (2015-05-16) - bug #4876 Settings issues (Favorite tables shown twice in Settings) diff --git a/libraries/Table.class.php b/libraries/Table.class.php index 8ece698b86..0400fc136d 100644 --- a/libraries/Table.class.php +++ b/libraries/Table.class.php @@ -970,33 +970,54 @@ class PMA_Table // add indexes to the table if (!empty($GLOBALS['sql_indexes'])) { - $parsed_sql = PMA_SQP_parse($GLOBALS['sql_indexes']); - $i = 0; - while ($parsed_sql[$i]['type'] != $table_delimiter) { - $i++; - } - - $parsed_sql[$i]['data'] = $target; + $index_queries = []; + $sql_indexes = $GLOBALS['sql_indexes']; + $GLOBALS['sql_indexes'] = ''; + $parsed_sql = PMA_SQP_parse($sql_indexes); $cnt = $parsed_sql['len'] - 1; + $k = 0; - for ($j = $i; $j < $cnt; $j++) { - $dataUpper = /*overload*/mb_strtoupper($parsed_sql[$j]['data']); - if ($parsed_sql[$j]['type'] == 'alpha_reservedWord' - && $dataUpper == 'CONSTRAINT' - ) { - if ($parsed_sql[$j+1]['type'] == $table_delimiter) { - $parsed_sql[$j+1]['data'] = ''; - } + for ($j = 0; $j < $cnt; $j++) { + if ($parsed_sql[$j]['type'] == 'punct_queryend') { + $index_queries[] = substr($sql_indexes, $k, $parsed_sql[$j]['pos']); + $k = $parsed_sql[$j]['pos']; } } - $GLOBALS['sql_indexes'] = PMA_SQP_format( - $parsed_sql, 'query_only' - ); - if ($mode == 'one_table' || $mode == 'db_copy') { - $GLOBALS['dbi']->query($GLOBALS['sql_indexes']); + + foreach ($index_queries as $index_query) { + + $parsed_sql = PMA_SQP_parse($index_query); + $i = 0; + + while ($parsed_sql[$i]['type'] != $table_delimiter) { + $i++; + } + + $parsed_sql[$i]['data'] = $target; + + $cnt = $parsed_sql['len'] - 1; + + for ($j = $i; $j < $cnt; $j++) { + $dataUpper = /*overload*/mb_strtoupper($parsed_sql[$j]['data']); + if ($parsed_sql[$j]['type'] == 'alpha_reservedWord' + && $dataUpper == 'CONSTRAINT' + ) { + if ($parsed_sql[$j+1]['type'] == $table_delimiter) { + $parsed_sql[$j+1]['data'] = ''; + } + } + } + + $sql_index = PMA_SQP_format($parsed_sql, 'query_only'); + if ($mode == 'one_table' || $mode == 'db_copy') { + $GLOBALS['dbi']->query($sql_index); + } + + $GLOBALS['sql_indexes'] .= $sql_index; } + $GLOBALS['sql_query'] .= "\n" . $GLOBALS['sql_indexes']; if ($mode == 'one_table' || $mode == 'db_copy') { unset($GLOBALS['sql_indexes']);