I'm seeing a strange problem updating the default value for a VARCHAR
column. I'm, using:
alter table TABLE_NAME alter column COL_NAME DEFAULT 'new value'
and with some VARCHAR columns I get an error like this:
Invalid character string format for type long.; nested exception is
java.sql.SQLException: Invalid character string format for type long.
Caused by: ERROR 22018: Invalid character string format for type long.
at
org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.iapi.types.SQLChar.getLong(Unknown Source)
at
org.apache.derby.impl.sql.execute.AlterTableConstantAction.getColumnMax(Unknown
Source)
at
org.apache.derby.impl.sql.execute.AlterTableConstantAction.modifyColumnDefault(Unknown
Source)
at
org.apache.derby.impl.sql.execute.AlterTableConstantAction.execGuts(Unknown
Source)
at
org.apache.derby.impl.sql.execute.AlterTableConstantAction.executeConstantAction(Unknown
Source)
at org.apache.derby.impl.sql.execute.MiscResultSet.open(Unknown
Source)
at
org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
at
org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
The strange this is that this only happens on some VARCVHAR columns.
Others update fine. And I can see no differences.
This seems to happen with 10.2.1.6 and 10.2.2.0.
Any ideas why this might be happening?
Thanks
Tim