Skip to content

Commit

Permalink
0005698: Prevented data truncation error when inserting/updating log …
Browse files Browse the repository at this point in the history
…event in sym_monitor_event on Interbase
  • Loading branch information
evan-miller-jumpmind committed Feb 21, 2023
1 parent 3ceb02f commit 8e0cc2f
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import java.util.Collections;
import java.util.List;

import org.jumpmind.db.platform.DatabaseNamesConstants;
import org.jumpmind.extension.IBuiltInExtensionPoint;
import org.jumpmind.symmetric.ISymmetricEngine;
import org.jumpmind.symmetric.ext.ISymmetricEngineAware;
Expand Down Expand Up @@ -63,15 +64,15 @@ public MonitorEvent check(Monitor monitor) {
event.setValue(all.size());
event.setCount(count);
String details = serializeDetails(all);
/*if (engine.getDatabasePlatform() instanceof InterbaseDatabasePlatform) {
while (details != null && details.length() > InterbaseDdlBuilder.SWITCH_TO_LONGVARCHAR_SIZE && all.size() > 1) {
if (DatabaseNamesConstants.INTERBASE.equals(engine.getDatabasePlatform().getName())) {
while (details != null && details.length() > 4096 && all.size() > 1) {
all.remove(all.size() - 1);
details = serializeDetails(all);
}
if (details != null && details.length() > InterbaseDdlBuilder.SWITCH_TO_LONGVARCHAR_SIZE) {
details = details.substring(0, InterbaseDdlBuilder.SWITCH_TO_LONGVARCHAR_SIZE);
if (details != null && details.length() > 4096) {
details = details.substring(0, 4096);
}
}*/
}
event.setDetails(details);
return event;
}
Expand Down

0 comments on commit 8e0cc2f

Please sign in to comment.