提交 0c6d0c44 authored 作者: Owner's avatar Owner

Removed last meta fix - seems to not be needed

上级 341a5915
......@@ -23,7 +23,6 @@ import org.h2.schema.Sequence;
import org.h2.table.Column;
import org.h2.table.IndexColumn;
import org.h2.table.Table;
import org.h2.util.ColumnNamer;
import org.h2.util.New;
import org.h2.value.DataType;
import org.h2.value.Value;
......@@ -100,7 +99,6 @@ public class CreateTable extends SchemaCommand {
@Override
public int update() {
boolean metaLockAquired = false;
if (!transactional) {
session.commit(true);
}
......@@ -109,10 +107,8 @@ public class CreateTable extends SchemaCommand {
data.persistIndexes = false;
}
boolean isSessionTemporary = data.temporary && !data.globalTemporary;
try {
if (!isSessionTemporary) {
db.lockMeta(session);
metaLockAquired = true;
}
if (getSchema().resolveTableOrView(session, data.tableName) != null) {
if (ifNotExists) {
......@@ -228,24 +224,16 @@ public class CreateTable extends SchemaCommand {
}
throw e;
}
}
finally{
if (!isSessionTemporary && metaLockAquired) {
db.unlockMeta(session);
}
}
return 0;
}
private void generateColumnsFromQuery() {
int columnCount = asQuery.getColumnCount();
ArrayList<Expression> expressions = asQuery.getExpressions();
ColumnNamer columnNamer= new ColumnNamer(session);
for (int i = 0; i < columnCount; i++) {
Expression expr = expressions.get(i);
int type = expr.getType();
String name = columnNamer.getColumnName(expr,i,expr.getAlias());
String name = expr.getAlias();
long precision = expr.getPrecision();
int displaySize = expr.getDisplaySize();
DataType dt = DataType.getDataType(type);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论