bug fixed for mysql sql parser. fixed issue #2065

This commit is contained in:
wenshao
2017-10-26 21:24:38 +08:00
parent 4fe1145090
commit 29adf584fb
3 changed files with 92 additions and 8 deletions
@@ -18,7 +18,7 @@ package com.alibaba.druid.sql.ast.statement;
import com.alibaba.druid.sql.ast.SQLExpr;
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
public class SQLCheck extends SQLConstraintImpl implements SQLTableElement {
public class SQLCheck extends SQLConstraintImpl implements SQLTableElement, SQLTableConstraint {
private SQLExpr expr;
@@ -34,11 +34,11 @@ public class SQLCheck extends SQLConstraintImpl implements SQLTableElement {
return expr;
}
public void setExpr(SQLExpr expr) {
if (expr != null) {
expr.setParent(this);
public void setExpr(SQLExpr x) {
if (x != null) {
x.setParent(this);
}
this.expr = expr;
this.expr = x;
}
@Override