Skip to content

Commit

Permalink
Merge pull request #8337 from planetscale/online-ddl-vrepl-suite-drop…
Browse files Browse the repository at this point in the history
…-add-same-name

Online DDL/VReplication: support DROP+ADD column of same name
  • Loading branch information
shlomi-noach authored Jun 16, 2021
2 parents 0e0755f + 334b448 commit bd5bb8c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions go/vt/vttablet/onlineddl/vrepl.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,12 @@ func (v *VRepl) getSharedColumns(sourceColumns, targetColumns *vrepl.ColumnList,
break
}
}
for droppedColumn := range v.parser.DroppedColumnsMap() {
if strings.EqualFold(sourceColumn, droppedColumn) {
isSharedColumn = false
break
}
}
for _, virtualColumn := range sourceVirtualColumns.Names() {
// virtual/generated columns on source are silently skipped
if strings.EqualFold(sourceColumn, virtualColumn) {
Expand Down

0 comments on commit bd5bb8c

Please sign in to comment.