From e7c3eed36a5f1484fb994075af1cde9891b89143 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Thu, 11 Dec 2008 22:12:29 +0000 Subject: Limit direct CLOB updates to 1000 characters. --- .../java/com/amazon/carbonado/repo/jdbc/OracleSupportStrategy.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main/java/com/amazon/carbonado/repo') diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/OracleSupportStrategy.java b/src/main/java/com/amazon/carbonado/repo/jdbc/OracleSupportStrategy.java index 2a0c9be..8c55a4b 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/OracleSupportStrategy.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/OracleSupportStrategy.java @@ -40,7 +40,8 @@ class OracleSupportStrategy extends JDBCSupportStrategy { private static final String TRUNCATE_STATEMENT = "TRUNCATE TABLE %s"; - private static final int LOB_CHUNK_LIMIT = 2000; + private static final int BLOB_CHUNK_LIMIT = 2000; + private static final int CLOB_CHUNK_LIMIT = 1000; //private static final String PLAN_TABLE_NAME = "TEMP_CARBONADO_PLAN_TABLE"; @@ -152,7 +153,7 @@ class OracleSupportStrategy extends JDBCSupportStrategy { { try { long length = blob.getLength(); - if (length > LOB_CHUNK_LIMIT || ((long) ((int) length)) != length) { + if (length > BLOB_CHUNK_LIMIT || ((long) ((int) length)) != length) { if (mBLOB_empty_lob == null) { return super.setBlobValue(ps, column, blob); } @@ -191,7 +192,7 @@ class OracleSupportStrategy extends JDBCSupportStrategy { { try { long length = clob.getLength(); - if (length > LOB_CHUNK_LIMIT || ((long) ((int) length)) != length) { + if (length > CLOB_CHUNK_LIMIT || ((long) ((int) length)) != length) { if (mCLOB_empty_lob == null) { return super.setClobValue(ps, column, clob); } -- cgit v1.2.3