case ROLLBACK_TRANSACTION:
server.rollbackTransaction();
break;
case TRANSACTION_ISOLATION:
{
SetTransactionIsolationNode node = (SetTransactionIsolationNode)statement;
IsolationLevel level = node.getIsolationLevel();
switch (level) {
case UNSPECIFIED_ISOLATION_LEVEL:
case SERIALIZABLE_ISOLATION_LEVEL:
break;
default:
if (server.getAttribute(ISOLATION_LEVEL_WARNED) == null) {
context.warnClient(new IsolationLevelIgnoredException(level.getSyntax(), IsolationLevel.SERIALIZABLE_ISOLATION_LEVEL.getSyntax()));
server.setAttribute(ISOLATION_LEVEL_WARNED, Boolean.TRUE);
}
break;
}
}
break;
case TRANSACTION_ACCESS:
{
SetTransactionAccessNode node = (SetTransactionAccessNode)statement;
boolean current = node.isCurrent();
boolean readOnly = (node.getAccessMode() ==
AccessMode.READ_ONLY_ACCESS_MODE);
if (current)
server.setTransactionReadOnly(readOnly);
else
server.setTransactionDefaultReadOnly(readOnly);
}
break;
case SET_CONFIGURATION:
{
SetConfigurationNode node = (SetConfigurationNode)statement;
setVariable (server, node.getVariable(), node.getValue());
}
break;
case SHOW_CONFIGURATION:
{
ShowConfigurationNode node = (ShowConfigurationNode)statement;
showVariable (context, server, node.getVariable());
}
break;
case SET_CONSTRAINTS:
{
SetConstraintsNode node = (SetConstraintsNode)statement;
deferConstraints(server,
node.isAll(), node.getConstraints(), node.isDeferred());
}
break;
default:
throw new UnsupportedSQLException("session control", statement);
}