diff --git a/findbugs-exclude.xml b/findbugs-exclude.xml
index b9acbcd8b..fced062b1 100644
--- a/findbugs-exclude.xml
+++ b/findbugs-exclude.xml
@@ -26,10 +26,20 @@
-
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -40,11 +50,29 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -123,4 +151,4 @@
-
+
\ No newline at end of file
diff --git a/src/main/java/io/mycat/backend/mysql/nio/MySQLDataSource.java b/src/main/java/io/mycat/backend/mysql/nio/MySQLDataSource.java
index 647f44b40..fc3c1b77e 100644
--- a/src/main/java/io/mycat/backend/mysql/nio/MySQLDataSource.java
+++ b/src/main/java/io/mycat/backend/mysql/nio/MySQLDataSource.java
@@ -173,6 +173,9 @@ public class MySQLDataSource extends PhysicalDatasource {
r323.write(out);
out.flush();
break;
+ default:
+ isConnected = false;
+ break;
}
} catch (IOException e) {
diff --git a/src/main/java/io/mycat/config/Versions.java b/src/main/java/io/mycat/config/Versions.java
index 614f8df34..53d45bd34 100644
--- a/src/main/java/io/mycat/config/Versions.java
+++ b/src/main/java/io/mycat/config/Versions.java
@@ -32,7 +32,7 @@ public abstract class Versions {
public static final byte PROTOCOL_VERSION = 10;
/**服务器版本**/
- public static byte[] SERVER_VERSION = "5.6.29-mycat-2.17.08.0-dev-20170813134310".getBytes();
+ public static byte[] SERVER_VERSION = "5.6.29-mycat-2.17.08.0-dev-20170814145517".getBytes();
public static byte[] VERSION_COMMENT = "MyCat Server (OpenCloundDB)".getBytes();
public static final String ANNOTATION_NAME = "mycat:";
public static final String ROOT_PREFIX = "mycat";
diff --git a/src/main/java/io/mycat/config/loader/xml/XMLSchemaLoader.java b/src/main/java/io/mycat/config/loader/xml/XMLSchemaLoader.java
index 3391a9810..db1054f8c 100644
--- a/src/main/java/io/mycat/config/loader/xml/XMLSchemaLoader.java
+++ b/src/main/java/io/mycat/config/loader/xml/XMLSchemaLoader.java
@@ -545,25 +545,21 @@ public class XMLSchemaLoader implements SchemaLoader {
private void checkRuleSuitTable(TableConfig tableConf) {
AbstractPartitionAlgorithm function = tableConf.getRule().getRuleAlgorithm();
int suitValue = function.suitableFor(tableConf);
- switch(suitValue) {
- case -1:
- // 少节点,给提示并抛异常
- throw new ConfigException("Illegal table conf : table [ " + tableConf.getName() + " ] rule function [ "
- + tableConf.getRule().getFunctionName() + " ] partition size : " + tableConf.getRule().getRuleAlgorithm().getPartitionNum() + " > table datanode size : "
- + tableConf.getDataNodes().size() + ", please make sure table datanode size = function partition size");
- case 0:
- // table datanode size == rule function partition size
- break;
- case 1:
- // 有些节点是多余的,给出warn log
- LOGGER.warn("table conf : table [ {} ] rule function [ {} ] partition size : {} < table datanode size : {} , this cause some datanode to be redundant",
- new String[]{
- tableConf.getName(),
- tableConf.getRule().getFunctionName(),
- String.valueOf(tableConf.getRule().getRuleAlgorithm().getPartitionNum()),
- String.valueOf(tableConf.getDataNodes().size())
- });
- break;
+ if (suitValue <0) {// 少节点,给提示并抛异常
+ throw new ConfigException("Illegal table conf : table [ " + tableConf.getName() + " ] rule function [ "
+ + tableConf.getRule().getFunctionName() + " ] partition size : " + tableConf.getRule().getRuleAlgorithm().getPartitionNum() + " > table datanode size : "
+ + tableConf.getDataNodes().size() + ", please make sure table datanode size = function partition size");
+ }else if (suitValue >0) {// 有些节点是多余的,给出warn log
+ LOGGER.warn("table conf : table [ {} ] rule function [ {} ] partition size : {} < table datanode size : {} , this cause some datanode to be redundant",
+ new String[]{
+ tableConf.getName(),
+ tableConf.getRule().getFunctionName(),
+ String.valueOf(tableConf.getRule().getRuleAlgorithm().getPartitionNum()),
+ String.valueOf(tableConf.getDataNodes().size())
+ });
+
+ } else {
+ // table datanode size == rule function partition size
}
}
diff --git a/src/main/java/io/mycat/net/mysql/BinaryRowDataPacket.java b/src/main/java/io/mycat/net/mysql/BinaryRowDataPacket.java
index 195551437..6c5238b55 100644
--- a/src/main/java/io/mycat/net/mysql/BinaryRowDataPacket.java
+++ b/src/main/java/io/mycat/net/mysql/BinaryRowDataPacket.java
@@ -241,6 +241,8 @@ public class BinaryRowDataPacket extends MySQLPacket {
LOGGER.error("error",e);
}
break;
+ default:
+ throw new IllegalArgumentException("Field type is not supported");
}
}
diff --git a/src/main/java/io/mycat/plan/visitor/MySQLItemVisitor.java b/src/main/java/io/mycat/plan/visitor/MySQLItemVisitor.java
index 8c549f6a4..66d28cebb 100644
--- a/src/main/java/io/mycat/plan/visitor/MySQLItemVisitor.java
+++ b/src/main/java/io/mycat/plan/visitor/MySQLItemVisitor.java
@@ -491,6 +491,8 @@ public class MySQLItemVisitor extends MySqlASTVisitorAdapter {
case "STDDEV":
item = new ItemSumStd(args, 0, false, null);
break;
+ default:
+ throw new MySQLOutPutException(ErrorCode.ER_OPTIMIZER, "", "not supported "+funcName);
}
}
@Override
diff --git a/src/main/java/io/mycat/statistic/stat/QueryConditionAnalyzer.java b/src/main/java/io/mycat/statistic/stat/QueryConditionAnalyzer.java
index 009c488ec..99a205731 100644
--- a/src/main/java/io/mycat/statistic/stat/QueryConditionAnalyzer.java
+++ b/src/main/java/io/mycat/statistic/stat/QueryConditionAnalyzer.java
@@ -63,39 +63,26 @@ public class QueryConditionAnalyzer implements QueryResultListener {
@Override
public void onQueryResult(QueryResult queryResult) {
-
-// this.lock.lock();
-// try {
-
- int sqlType = queryResult.getSqlType();
- String sql = queryResult.getSql();
-
- switch(sqlType) {
- case ServerParse.SELECT:
- List