From f26226229a45af4053055b8a5ea7aa0f7aa33e0c Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 26 Sep 2021 17:13:26 +0000 Subject: [PATCH] Issue 10768: Avoid MySQL problems when upgrading both index and structure --- src/Database/DBStructure.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index d7f1179d0..f652272a4 100644 --- a/src/Database/DBStructure.php +++ b/src/Database/DBStructure.php @@ -673,6 +673,11 @@ class DBStructure $current_field_definition = DBA::cleanQuery(implode(",", $field_definition)); $new_field_definition = DBA::cleanQuery(implode(",", $parameters)); if ($current_field_definition != $new_field_definition) { + // When the field structure changes then we will not perform the special index handling for MySQL. + // See issue #10768 + $is_unique = false; + $temp_name = $name; + $sql2 = self::modifyTableField($fieldname, $parameters); if ($sql3 == "") { $sql3 = "ALTER" . $ignore . " TABLE `" . $temp_name . "` " . $sql2;