Skip to content

Commit a65ec4d

Browse files
author
ffffwh
committed
ddl: alter table rename and lower_case_table_names #1048
1 parent 336ce50 commit a65ec4d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

driver/mysql/binlog/binlog_reader.go

+7
Original file line numberDiff line numberDiff line change
@@ -1086,6 +1086,13 @@ func (b *BinlogReader) resolveQuery(currentSchema string, sql string,
10861086
result.isSkip = true
10871087
case *ast.AlterTableStmt:
10881088
setTable(v.Table, false)
1089+
for _, spec := range v.Specs {
1090+
switch spec.Tp {
1091+
case ast.AlterTableRenameTable:
1092+
mayLowerTable(spec.NewTable)
1093+
}
1094+
}
1095+
10891096
case *ast.RevokeStmt, *ast.RevokeRoleStmt:
10901097
result.isExpand = true
10911098
case *ast.SetPwdStmt:

0 commit comments

Comments
 (0)