mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
添加SQL统计功能,统计SQL中所使用的表和字段
git-svn-id: http://code.alibabatech.com/svn/druid/trunk@268 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
+4
-4
@@ -354,8 +354,8 @@ public class MySqlSchemaStatVisitor extends MySqlASTVisitorAdapter {
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int tableHashCode = table != null ? table.hashCode() : 0;
|
||||
int nameHashCode = name != null ? name.hashCode() : 0;
|
||||
int tableHashCode = table != null ? table.toLowerCase().hashCode() : 0;
|
||||
int nameHashCode = name != null ? name.toLowerCase().hashCode() : 0;
|
||||
|
||||
return tableHashCode + nameHashCode;
|
||||
}
|
||||
@@ -376,7 +376,7 @@ public class MySqlSchemaStatVisitor extends MySqlASTVisitorAdapter {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (!table.equals(column.getTable())) {
|
||||
if (!table.equalsIgnoreCase(column.getTable())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -386,7 +386,7 @@ public class MySqlSchemaStatVisitor extends MySqlASTVisitorAdapter {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (!name.equals(column.getName())) {
|
||||
if (!name.equalsIgnoreCase(column.getName())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user