diff options
author | James Ahlborn <jtahlborn@yahoo.com> | 2008-07-17 02:46:42 +0000 |
---|---|---|
committer | James Ahlborn <jtahlborn@yahoo.com> | 2008-07-17 02:46:42 +0000 |
commit | 48404ab2d688d5fb9af63166e049a0a5c95800cd (patch) | |
tree | 92bb259913b8018c21bbd681012c93eebda04ede /test | |
parent | 506b7c28ee353058c8d3fdedba3098c60dfaabb3 (diff) | |
download | jackcess-48404ab2d688d5fb9af63166e049a0a5c95800cd.tar.gz jackcess-48404ab2d688d5fb9af63166e049a0a5c95800cd.zip |
Reserve minimum space for memo/ole fields so that greedy inline row usage does not cause spurious write failures for wide tables.
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@358 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'test')
-rw-r--r-- | test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java b/test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java index abdb88b..6102c6c 100644 --- a/test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java +++ b/test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java @@ -380,6 +380,32 @@ public class DatabaseTest extends TestCase { } + public void testManyMemos() throws Exception { + final int numColumns = 126; + Database db = create(); + TableBuilder bigTableBuilder = new TableBuilder("myBigTable"); + + for (int i = 0; i < numColumns; i++) + { + Column column = new ColumnBuilder("column_" + i, DataType.MEMO) + .toColumn(); + bigTableBuilder.addColumn(column); + } + + Table bigTable = bigTableBuilder.toTable(db); + + for (int j = 999; j < 1010; j++) + { + Object[] rowData = new String[numColumns]; + for (int i = 0; i < numColumns; i++) + { + rowData[i] = "v_" + i + ";" + j; + } + bigTable.addRow(rowData); + } + db.close(); + } + public void testMissingFile() throws Exception { File bogusFile = new File("fooby-dooby.mdb"); assertTrue(!bogusFile.exists()); |