mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
fix #4071
This commit is contained in:
@@ -2939,7 +2939,9 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Paramet
|
||||
}
|
||||
|
||||
SQLSelect select = stmt.getSelect();
|
||||
this.visit(select);
|
||||
if (select != null) {
|
||||
this.visit(select);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.alibaba.druid.bvt.bug;
|
||||
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSelectStatement;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class Issue4071 extends TestCase {
|
||||
public void test_for_issue() throws Exception {
|
||||
assertEquals("",new SQLSelectStatement().toString());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user