提交 85de815a authored 作者: Thomas Mueller's avatar Thomas Mueller

Local temporary tables can now be created without having to commit a transaction.

上级 d261c4f8
...@@ -36,6 +36,7 @@ import org.h2.command.ddl.CreateUser; ...@@ -36,6 +36,7 @@ import org.h2.command.ddl.CreateUser;
import org.h2.command.ddl.CreateUserDataType; import org.h2.command.ddl.CreateUserDataType;
import org.h2.command.ddl.CreateView; import org.h2.command.ddl.CreateView;
import org.h2.command.ddl.DeallocateProcedure; import org.h2.command.ddl.DeallocateProcedure;
import org.h2.command.ddl.DefineCommand;
import org.h2.command.ddl.DropAggregate; import org.h2.command.ddl.DropAggregate;
import org.h2.command.ddl.DropConstant; import org.h2.command.ddl.DropConstant;
import org.h2.command.ddl.DropDatabase; import org.h2.command.ddl.DropDatabase;
...@@ -1112,7 +1113,10 @@ public class Parser { ...@@ -1112,7 +1113,10 @@ public class Parser {
ifExists = readIfExists(ifExists); ifExists = readIfExists(ifExists);
command.setIfExists(ifExists); command.setIfExists(ifExists);
if (readIf("CASCADE")) { if (readIf("CASCADE")) {
command.setDropAction(ConstraintReferential.CASCADE);
readIf("CONSTRAINTS"); readIf("CONSTRAINTS");
} else if (readIf("RESTRICT")) {
command.setDropAction(ConstraintReferential.RESTRICT);
} }
return command; return command;
} else if (readIf("INDEX")) { } else if (readIf("INDEX")) {
...@@ -4669,7 +4673,7 @@ public class Parser { ...@@ -4669,7 +4673,7 @@ public class Parser {
} }
} }
private Prepared parseAlterTableAddConstraintIf(String tableName, Schema schema) { private DefineCommand parseAlterTableAddConstraintIf(String tableName, Schema schema) {
String constraintName = null, comment = null; String constraintName = null, comment = null;
boolean ifNotExists = false; boolean ifNotExists = false;
if (readIf("CONSTRAINT")) { if (readIf("CONSTRAINT")) {
...@@ -4848,7 +4852,7 @@ public class Parser { ...@@ -4848,7 +4852,7 @@ public class Parser {
read("("); read("(");
if (!readIf(")")) { if (!readIf(")")) {
do { do {
Prepared c = parseAlterTableAddConstraintIf(tableName, schema); DefineCommand c = parseAlterTableAddConstraintIf(tableName, schema);
if (c != null) { if (c != null) {
command.addConstraintCommand(c); command.addConstraintCommand(c);
} else { } else {
...@@ -4943,6 +4947,9 @@ public class Parser { ...@@ -4943,6 +4947,9 @@ public class Parser {
read("LOGGED"); read("LOGGED");
} }
} }
if (readIf("TRANSACTIONAL")) {
command.setTransactional(true);
}
} else if (!persistIndexes && readIf("NOT")) { } else if (!persistIndexes && readIf("NOT")) {
read("PERSISTENT"); read("PERSISTENT");
command.setPersistData(false); command.setPersistData(false);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论