Skip to content

Commit

Permalink
0004159: INTERBASE Length of ROW_DATA and OLD_DATA are now only
Browse files Browse the repository at this point in the history
varchar(3840) !!
  • Loading branch information
philipmarzullo64 committed Nov 22, 2019
1 parent b83f63b commit 4030b2e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
Expand Up @@ -20,9 +20,13 @@
*/
package org.jumpmind.symmetric.db.interbase;

import java.sql.Types;
import java.util.List;

import org.apache.commons.lang.StringUtils;
import org.jumpmind.db.model.Column;
import org.jumpmind.db.model.Database;
import org.jumpmind.db.model.TypeMap;
import org.jumpmind.db.platform.IDatabasePlatform;
import org.jumpmind.db.sql.ISqlTransaction;
import org.jumpmind.db.sql.mapper.StringMapper;
Expand Down Expand Up @@ -228,4 +232,19 @@ public String massageDataExtractionSql(String sql, boolean isContainsBigLob) {
public long getCurrentSequenceValue(SequenceIdentifier identifier) {
return platform.getSqlTemplate().queryForLong("select gen_id(GEN_" + getSequenceName(identifier) + ", 0) from rdb$database");
}

@Override
public Database readSymmetricSchemaFromXml() {
Database db = super.readSymmetricSchemaFromXml();
// Change sym_trigger table column description to only allow 1024 characters to make row width less than 64K characters
String prefix = parameterService.getTablePrefix();
if (StringUtils.isNotBlank(prefix) && !prefix.endsWith("_")) {
prefix = prefix + "_";
}
Column description = db.findTable(prefix+"trigger").findColumn("description");
description.setJdbcTypeCode(Types.VARCHAR);
description.setMappedType(TypeMap.VARCHAR);
description.setSize("1024");
return db;
}
}
Expand Up @@ -46,7 +46,7 @@
*/
public class InterbaseDdlBuilder extends AbstractDdlBuilder {

public static int SWITCH_TO_LONGVARCHAR_SIZE = 3840;
public static int SWITCH_TO_LONGVARCHAR_SIZE = 4096;

public InterbaseDdlBuilder() {

Expand Down

0 comments on commit 4030b2e

Please sign in to comment.