CONTENTS
VASResult shore_vas::truncObj(
const lrid_t &obj,
ObjectSize newlen
);
VASResult shore_vas::truncObj(
const lrid_t &obj,
ObjectSize newlen,
ObjectOffset newtstart,
bool zeroed=true
);
TruncObj
changes the size of an object to a given size, either by
truncating or appending zero-valued bytes to the object.
The argument
obj
is the full logical object identifier of the object to be read or
updated.
The argument
newlen
indicates the desired length of the object after the
truncation occurs.
If this is larger than the size of the object before
truncation, the SVAS pads the object
up to the desired length.
Unless the default value for the argument
zeroed
is overridden,
the bytes padding the object are
zero-valued bytes.
TruncObj
can change the location and size
of the TEXT portion of the object.
If the argument
newtstart
is given, it indicates the new location
of the beginning of the TEXT attribute.
An exclusive lock is acquired before the truncation occurs.
All these methods are available
on both the server and clients.
All forms of
truncObj
must be called when a transaction is active.
Deadlocks can occur while locks are being acquired. See
transaction(svas)
for information about deadlocks.
A complete list of errors is in
errors(svas).
This manual page applies to Version 1.1.1 of the Shore software.
The Shore project is sponsored by the Advanced Research Project Agency, ARPA
order number 018 (formerly 8230), monitored by the U.S. Army Research
Laboratory under contract DAAB07-91-C-Q518.
Copyright © 1994, 1995, 1996, 1997,
Computer Sciences Department, University of
Wisconsin -- Madison. All Rights Reserved.
sysprops(svas)
readObj(svas),
appendObj(svas),
writeObj(svas),
transaction(svas),
errors(svas),
and
text(svas).