From: James Ahlborn Date: Wed, 29 May 2013 22:15:10 +0000 (+0000) Subject: merge trunk changes through r729 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2fe9f3ed40c1bb5e16682c53611d8b1cff6fcb73;p=jackcess.git merge trunk changes through r729 git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/branches/jackcess-2@730 f203690c-595d-4dc9-a70b-905162fa7fd2 --- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 0564cc5..260f266 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -4,6 +4,12 @@ Tim McCune + + + Fix partial page updates when using CodecHandlers which can only do + full page encoding. + + Do not unicode compress strings which are longer than 1024 chars. diff --git a/src/java/com/healthmarketscience/jackcess/impl/PageChannel.java b/src/java/com/healthmarketscience/jackcess/impl/PageChannel.java index ab39447..79dff31 100644 --- a/src/java/com/healthmarketscience/jackcess/impl/PageChannel.java +++ b/src/java/com/healthmarketscience/jackcess/impl/PageChannel.java @@ -236,6 +236,7 @@ public class PageChannel implements Channel, Flushable { // reset so we can write the whole page page = fullPage; pageOffset = 0; + writeLen = getFormat().PAGE_SIZE; } else { diff --git a/test/src/java/com/healthmarketscience/jackcess/util/ExportTest.java b/test/src/java/com/healthmarketscience/jackcess/util/ExportTest.java index 7b3bfc6..a271771 100644 --- a/test/src/java/com/healthmarketscience/jackcess/util/ExportTest.java +++ b/test/src/java/com/healthmarketscience/jackcess/util/ExportTest.java @@ -90,8 +90,7 @@ public class ExportTest extends TestCase .exportWriter(new BufferedWriter(out)); String expected = - "some text||some more,13,13.25,\"61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78" + NL + - "79 7A 61 62 63 64\",true," + testDate + NL + + "some text||some more,13,13.25,\"61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78\n79 7A 61 62 63 64\",true," + testDate + NL + "\"crazy'data\"\"here\",-345,-3.45E-4,61 62 63 64 65 66 67,true," + NL + "C:\\temp\\some_file.txt,25,0.0,,false," + NL; @@ -107,8 +106,7 @@ public class ExportTest extends TestCase expected = "col1||col2||col3||col4||col5||col6" + NL + - "'some text||some more'||13||13.25||'61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78" + NL + - "79 7A 61 62 63 64'||true||" + testDate + NL + + "'some text||some more'||13||13.25||'61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78\n79 7A 61 62 63 64'||true||" + testDate + NL + "'crazy''data\"here'||-345||-3.45E-4||61 62 63 64 65 66 67||true||" + NL + "C:\\temp\\some_file.txt||25||0.0||||false||" + NL; assertEquals(expected, out.toString()); @@ -131,8 +129,7 @@ public class ExportTest extends TestCase .exportWriter(new BufferedWriter(out)); expected = - "some text||some more,13,13.25,\"61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78" + NL + - "79 7A 61 62 63 64\",true," + testDate + NL + + "some text||some more,13,13.25,\"61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78\n79 7A 61 62 63 64\",true," + testDate + NL + "C:\\temp\\some_file.txt,25,0.0,,false," + NL; assertEquals(expected, out.toString());