[improve](shcema change)fix alter table faild when modify multiple columns with column changed positions (#34244)

This commit is contained in:
huanghg1994
2024-05-09 17:01:00 +08:00
committed by yiguolei
parent 845732b440
commit 296c343179
2 changed files with 84 additions and 2 deletions

View File

@ -473,7 +473,7 @@ public class SchemaChangeHandler extends AlterHandler {
found = true;
}
if (hasColPos) {
if (col.getName().equalsIgnoreCase(columnPos.getLastCol())) {
if (col.getNonShadowName().equalsIgnoreCase(columnPos.getLastCol())) {
lastColIndex = i;
}
} else {
@ -604,7 +604,7 @@ public class SchemaChangeHandler extends AlterHandler {
}
}
if (hasColPos) {
if (col.getName().equalsIgnoreCase(columnPos.getLastCol())) {
if (col.getNonShadowName().equalsIgnoreCase(columnPos.getLastCol())) {
lastColIndex = i;
}
} else {