diff --git a/libraries/server_synchronize.lib.php b/libraries/server_synchronize.lib.php
index 23cd6785e..004eccb7f 100644
--- a/libraries/server_synchronize.lib.php
+++ b/libraries/server_synchronize.lib.php
@@ -564,7 +564,7 @@ function PMA_insertIntoTargetTable($matching_table, $src_db, $trg_db, $src_link,
unset($add_column_array[$table_index[0]]);
}
if (isset($add_indexes_array[$table_index[0]]) || isset($remove_indexes_array[$table_index[0]])
- ||isset($alter_indexes_array[$table_index[0]])) {
+ || isset($alter_indexes_array[$table_index[0]])) {
PMA_applyIndexesDiff ($trg_db, $trg_link, $matching_tables, $source_indexes, $target_indexes, $add_indexes_array, $alter_indexes_array,
$remove_indexes_array, $table_index[0], $display);
@@ -1213,7 +1213,7 @@ function PMA_removeColumnsFromTargetTable($trg_db, $trg_link, $matching_tables,
* @param $source_indexes array containing the indexes of the source table
* @param $target_indexes array containing the indexes of the target table
* @param $add_indexes_array array containing the name of the column on which the index is to be added in the target table
-* @param $alter_indexes_array array containing the name of the column on which the index is to be altered
+* @param $alter_indexes_array array containing the key name which needs to be altered
* @param $remove_indexes_array array containing the key name of the index which is to be removed from the target table
* @param $table_counter number of the matching table
*/
@@ -1223,45 +1223,47 @@ function PMA_indexesDiffInTables($src_db, $trg_db, $src_link, $trg_link, $matchi
//Gets indexes information for source and target table
$source_indexes[$table_counter] = PMA_DBI_get_table_indexes($src_db, $matching_tables[$table_counter],$src_link);
$target_indexes[$table_counter] = PMA_DBI_get_table_indexes($trg_db, $matching_tables[$table_counter],$trg_link);
- for ($a = 0; $a
' . $query . '
'; + } + PMA_DBI_try_query($query, $trg_link, 0); } - //Removes indexes from targe table + //Removes indexes from target table if(isset($remove_indexes_array[$table_counter])) { $drop_index_query = "ALTER TABLE " . PMA_backquote($trg_db) . "." . PMA_backquote($matching_tables[$table_counter]); for ($a = 0; $a < sizeof($target_indexes[$table_counter]); $a++) diff --git a/server_synchronize.php b/server_synchronize.php index 0a6025f12..6312467f7 100644 --- a/server_synchronize.php +++ b/server_synchronize.php @@ -203,7 +203,7 @@ if ((isset($_REQUEST['submit_connect']))) { $target_columns, $alter_str_array, $add_column_array, $uncommon_columns, $criteria, $target_tables_keys, $i); PMA_indexesDiffInTables($src_db, $trg_db, $src_link, $trg_link, $matching_tables, $source_indexes, $target_indexes, - $add_indexes_array, $alter_indexes_array,$remove_indexes_array, $i); + $add_indexes_array, $alter_indexes_array, $remove_indexes_array, $i); } for($j = 0; $j < sizeof($source_tables_uncommon); $j++) { @@ -321,7 +321,7 @@ if ((isset($_REQUEST['submit_connect']))) {