While using version-control on a file repeatedly after a while "ORA-01401: inserted value too large for column" (e.g. with ORACLE store) occurs. Affects: some of the stores -> table PROPERTIES, column PROPERTY_VALUE. Identified limitation: "PROPERTY_VALUE" VARCHAR2(255), some stores use type "text" and avoid the limitation. Reproduction: - use a store with mentioned limitation ("PROPERTY_VALUE" VARCHAR2(255)), in this case it was the oracle store) - upload file - put file under version control - replace file 5 or few more times The limit was reached after replacing a versioned file 5 times. The property name in this case was "version-set". SQL-Query: select max(length(property_value)) from properties t --> 368 Ann: File was versioned 8 times. Possible workaround for ORACLE store (?): altering PROPERTY_VALUE to CLOB
*** Bug 31020 has been marked as a duplicate of this bug. ***
Quick fix for Oracle: change VARCHAR2(255) to VARCHAR2(4000) To Do: http://www.mail-archive.com/slide-user%40jakarta.apache.org/msg07576.html
One possible solution (that we have implemented on our project) would be to change the type of the PROPERTY_VALUE column from VARCHAR2(4000) to CLOB. While varchars have a limitation of 4000 bytes clobs limitation is 4Gb, which should be sufficient for most usages.
For Oracle that is not the only size issue. Anywhere a parameter on a prepared statement is set the parameter length is limited to 4000 bytes. I believe there is 1 place in the code where this occurs. Also be aware that the property queries can only use non-indexed searches when examining property content.