Attaching a patch which makes the following changes to the test:
runTestUpdateXXXAllDataTypesInsertRow() - create a single statement that is re-used across iterations, instead of creating a new statement on each iteration, and close it when done.
verifyData() - reorganize some if/else-if statements to get rid of return statements that prevent close() from being called, and use BaseJDBCTestCase.closeStatement() to prevent BaseJDBCTestCase.statements from accumulating hundreds of statements.
resetData() - close the statement when done.
It was primarily the changes in verifyData() that helped on the heap usage.
The test finished successfully with 15 MB heap after the patch was applied.