brianchandotcom/liferay-portal — pull request #4370 by holatuwol (2012-02-29 18:24:07+00:00)
Title: LPS-25807

Instead of CAST_TEXT, wrap the runSQL in a try-catch and replace each match individually. Otherwise, the databases that require the CAST_TEXT will have corrupt data if the length of the value is higher than the length of what we cast to (in the worst case, 254 characters in DB2).