Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#200 delete the support when use the show @@datasource where datenode… #252

Merged
merged 1 commit into from
Sep 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ public static void handle(String stmt, ManagerConnection c, int offset) {
if (StringUtil.isEmpty(name)) {
c.writeErrMessage(ErrorCode.ER_YES, "Unsupported statement");
} else {
name = name.replaceAll("'", "");
ShowDataNode.execute(c, name);
}
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1339,10 +1339,7 @@ private static int show2SqlSUCheck(String stmt, int offset) {

if ((c2 == 'U' || c2 == 'u') && (c3 == 'S' || c3 == 's') &&
(c4 == 'E' || c4 == 'e') && (c5 == 'R' || c5 == 'r')) {
if (ParseUtil.isErrorTail(++offset, stmt)) {
return OTHER;
}
return SQL_SUM_USER;
return boolTailCheck(stmt, offset, SQL_SUM_USER);

} else if ((c2 == 'T' || c2 == 't') && (c3 == 'A' || c3 == 'a') &&
(c4 == 'B' || c4 == 'b') && (c5 == 'L' || c5 == 'l') &&
Expand All @@ -1358,7 +1355,7 @@ private static int show2SqlSUCheck(String stmt, int offset) {

return OTHER;
}
return boolTailCheck(stmt, offset, SQL_SUM_TABLE);
return boolTailCheck(stmt, offset, SQL_SUM_USER);
}
}
return OTHER;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ public Map<String, TableStat> getTableStatMap() {
public List<TableStat> getTableStats(boolean isClear) {
SortedSet<TableStat> tableStatSortedSet = new TreeSet<>(tableStatMap.values());
List<TableStat> list = new ArrayList<>(tableStatSortedSet);
if(isClear){
tableStatMap = new ConcurrentHashMap<>();
}
return list;
}

Expand Down