* @param value the new value (may not be null)
*/
public void setVariable(String name, Value value) {
initVariables();
modificationId++;
Value old;
if (value == ValueNull.INSTANCE) {
old = variables.remove(name);
} else {
// link LOB values, to make sure we have our own object
value = value.link(database, LobStorage.TABLE_ID_SESSION_VARIABLE);
old = variables.put(name, value);
}
if (old != null) {
// close the old value (in case it is a lob)
old.unlink();
old.close();
}
}