Bug 46120

GemStone/S 64 Bit

3.3, 3.2.13, 3.2.12, 3.2.11, 3.2.10, 3.2.9, 3.2.8.1, 3.2.8, 3.2.7, 3.2.6, 3.2.5, 3.2.4, 3.2.3, 3.2.2, 3.2.1, 3.2, 3.1.0.6, 3.1.0.5, 3.1.0.4, 3.1.0.2, 3.1.0.1, 3.1, 3.x

3.3.1, 3.2.14

GsFile write following a read may write at end of file

When a GsFile is open for update (that is, for both reading and writing), in certain cases if a read operation is followed by a write, the text to be written will be appended to the end, not at the desired location.

The problem occurs when the position at which the write is intended is larger (later in the file) than the position of the previous read.

Workaround

Writing to positions earlier in the file than were most recently read avoids the problem; however, to be safe, close and reopen the file after read and before a write.


Last updated: 3/25/16