Merge remote-tracking branch 'origin/QA_4_4' into QA_4_4
This commit is contained in:
commit
c99a0cd805
@ -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)
|
||||
|
||||
@ -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']);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user