提交 036724ce authored 作者: Thomas Mueller's avatar Thomas Mueller

It is always a CreateView instance

上级 39b11771
...@@ -179,7 +179,7 @@ public class Parser { ...@@ -179,7 +179,7 @@ public class Parser {
private char[] sqlCommandChars; private char[] sqlCommandChars;
private int lastParseIndex; private int lastParseIndex;
private int parseIndex; private int parseIndex;
private Prepared prepared; private CreateView createView;
private Prepared currentPrepared; private Prepared currentPrepared;
private Select currentSelect; private Select currentSelect;
private ObjectArray<Parameter> parameters; private ObjectArray<Parameter> parameters;
...@@ -284,7 +284,7 @@ public class Parser { ...@@ -284,7 +284,7 @@ public class Parser {
parameters = ObjectArray.newInstance(); parameters = ObjectArray.newInstance();
currentSelect = null; currentSelect = null;
currentPrepared = null; currentPrepared = null;
prepared = null; createView = null;
recompileAlways = false; recompileAlways = false;
indexedParameterList = null; indexedParameterList = null;
read(); read();
...@@ -941,7 +941,7 @@ public class Parser { ...@@ -941,7 +941,7 @@ public class Parser {
query.setParameterList(params); query.setParameterList(params);
query.init(); query.init();
Session s; Session s;
if (prepared != null && prepared instanceof CreateView) { if (createView != null) {
s = database.getSystemSession(); s = database.getSystemSession();
} else { } else {
s = session; s = session;
...@@ -3815,7 +3815,7 @@ public class Parser { ...@@ -3815,7 +3815,7 @@ public class Parser {
boolean ifNotExists = readIfNoExists(); boolean ifNotExists = readIfNoExists();
String viewName = readIdentifierWithSchema(); String viewName = readIdentifierWithSchema();
CreateView command = new CreateView(session, getSchema()); CreateView command = new CreateView(session, getSchema());
this.prepared = command; this.createView = command;
command.setViewName(viewName); command.setViewName(viewName);
command.setIfNotExists(ifNotExists); command.setIfNotExists(ifNotExists);
command.setComment(readCommentIf()); command.setComment(readCommentIf());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论