Fix writing of large memo/ole fields. Apparently Access does not like
long value fields longer than 4076 bytes.
</action>
+ <action dev="jahlborn" type="fix">
+ Reduce maximum row size to what Access considers valid.
+ </action>
</release>
<release version="1.1.14" date="2008-04-29">
<action dev="jahlborn" type="fix" issue="1924705">
public final long MAX_DATABASE_SIZE;
public final int MAX_ROW_SIZE;
+ public final int PAGE_INITIAL_FREE_SPACE;
public final int OFFSET_NEXT_TABLE_DEF_PAGE;
public final int OFFSET_NUM_ROWS;
MAX_DATABASE_SIZE = defineMaxDatabaseSize();
MAX_ROW_SIZE = defineMaxRowSize();
+ PAGE_INITIAL_FREE_SPACE = definePageInitialFreeSpace();
OFFSET_NEXT_TABLE_DEF_PAGE = defineOffsetNextTableDefPage();
OFFSET_NUM_ROWS = defineOffsetNumRows();
protected abstract long defineMaxDatabaseSize();
protected abstract int defineMaxRowSize();
+ protected abstract int definePageInitialFreeSpace();
protected abstract int defineOffsetNextTableDefPage();
protected abstract int defineOffsetNumRows();
}
@Override
- protected int defineMaxRowSize() { return PAGE_SIZE - 16; }
+ protected int defineMaxRowSize() { return 4060; }
+ @Override
+ protected int definePageInitialFreeSpace() { return PAGE_SIZE - 14; }
@Override
protected int defineOffsetNextTableDefPage() { return 4; }
PageChannel pageChannel, JetFormat format)
throws IOException
{
- // USAGE_MAP_DEF_FREE_SPACE = 3940;
int usageMapRowLength = format.OFFSET_USAGE_MAP_START +
format.USAGE_MAP_TABLE_BYTE_LENGTH;
- int freeSpace = getRowSpaceUsage(format.MAX_ROW_SIZE, format)
+ int freeSpace = format.PAGE_INITIAL_FREE_SPACE
- (2 * getRowSpaceUsage(usageMapRowLength, format));
ByteBuffer rtn = pageChannel.createPageBuffer();
ByteBuffer dataPage = _addRowBufferH.setNewPage(getPageChannel());
dataPage.put(PageTypes.DATA); //Page type
dataPage.put((byte) 1); //Unknown
- dataPage.putShort((short)getRowSpaceUsage(getFormat().MAX_ROW_SIZE,
- getFormat())); //Free space in this page
+ dataPage.putShort((short)getFormat().PAGE_INITIAL_FREE_SPACE); //Free space in this page
dataPage.putInt(_tableDefPageNumber); //Page pointer to table definition
dataPage.putInt(0); //Unknown
dataPage.putShort((short)0); //Number of rows on this page