Reserve minimum space for memo/ole fields so that greedy inline row
usage does not cause spurious write failures for wide tables.
</action>
+ <action dev="jahlborn" type="fix" issue="2018713">
+ Better column type translation for very large MEMO/OLE types in the
+ Database.copyTable logic.
+ </action>
</release>
<release version="1.1.15" date="2008-06-27">
<action dev="jahlborn" type="fix" issue="1998225">
// make sure size is reasonable
int size = lengthInUnits * rtn.getUnitSize();
if(rtn.isVariableLength() && !rtn.isValidSize(size)) {
- // try alternate type
+ // try alternate type. we always accept alternate "long value" types
+ // regardless of the given lengthInUnits
DataType altRtn = ALT_SQL_TYPES.get(sqlType);
- if((altRtn != null) && altRtn.isValidSize(size)) {
+ if((altRtn != null) &&
+ (altRtn.isLongValue() || altRtn.isValidSize(size))) {
// use alternate type
rtn = altRtn;
}
rs.addColumn(Types.BINARY, "col4", 128, 0, 0);
rs.addColumn(Types.BINARY, "col5", 512, 0, 0);
rs.addColumn(Types.NUMERIC, "col6", 0, 7, 15);
+ rs.addColumn(Types.VARCHAR, "col7", Integer.MAX_VALUE, 0, 0);
Database db = create();
db.copyTable("Test1", (ResultSet)Proxy.newProxyInstance(
Table t = db.getTable("Test1");
List<Column> columns = t.getColumns();
- assertEquals(6, columns.size());
+ assertEquals(7, columns.size());
Column c = columns.get(0);
assertEquals("col1", c.getName());
assertEquals(7, c.getScale());
assertEquals(15, c.getPrecision());
+ c = columns.get(6);
+ assertEquals("col7", c.getName());
+ assertEquals(DataType.MEMO, c.getType());
+ assertEquals(0, c.getLength());
+
}