fixed issue #1640 , support schema partition

This commit is contained in:
agapple
2019-03-28 17:01:36 +08:00
parent 39aeeb8c58
commit a7f9a779ad

View File

@@ -221,7 +221,7 @@ public class MQMessageUtils {
partitionEntries[pkHash].add(entry);
} else {
for (CanalEntry.RowData rowData : rowChange.getRowDatasList()) {
int hashCode = table.hashCode();
int hashCode = database.hashCode();
if (hashMode.autoPkHash) {
// isEmpty use default pkNames
for (CanalEntry.Column column : rowData.getAfterColumnsList()) {
@@ -230,7 +230,6 @@ public class MQMessageUtils {
}
}
} else {
hashCode = database.hashCode();
for (CanalEntry.Column column : rowData.getAfterColumnsList()) {
if (checkPkNamesHasContain(hashMode.pkNames, column.getName())) {
hashCode = hashCode ^ column.getValue().hashCode();
@@ -438,7 +437,7 @@ public class MQMessageUtils {
int idx = 0;
for (Map<String, String> row : flatMessage.getData()) {
int hashCode = table.hashCode();
int hashCode = database.hashCode();
for (String pkName : pkNames) {
String value = row.get(pkName);
if (value == null) {