Merge remote-tracking branch 'upstream/master'

This commit is contained in:
yakolee
2014-05-30 15:19:22 +08:00
5 changed files with 90 additions and 2 deletions
@@ -253,6 +253,10 @@ public class MySqlExprParser extends SQLExprParser {
} else if ("COLLATE".equalsIgnoreCase(lexer.stringVal()) && !(expr instanceof SQLIdentifierExpr)) {
lexer.nextToken();
if (lexer.token() == Token.EQ) {
lexer.nextToken();
}
if (lexer.token() != Token.IDENTIFIER) {
throw new ParserException("syntax error");
}
@@ -384,6 +384,11 @@ public class MySqlOutputVisitor extends SQLASTOutputVisitor implements MySqlASTV
print(" CHARACTER SET ");
print(x.getCharSetName());
}
if (x.getCollate() != null) {
print(" COLLATE ");
print(x.getCollate());
}
if (x.getCollate() != null) {
print(" COLLATE ");
print(x.getCollate());
@@ -1371,7 +1371,17 @@ public class SQLExprParser extends SQLParser {
charType.setCollate(lexer.stringVal());
lexer.nextToken();
}
}else if(identifierEquals("COLLATE")){
lexer.nextToken();
if (lexer.token() != Token.IDENTIFIER) {
throw new ParserException();
}
charType.setCollate(lexer.stringVal());
lexer.nextToken();
}
return charType;
}
@@ -31,6 +31,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
import com.alibaba.druid.support.logging.Log;
import com.alibaba.druid.support.logging.LogFactory;
import com.alibaba.druid.util.LRUCache;
import java.util.Collections;
public class WebAppStat {
@@ -504,7 +505,7 @@ public class WebAppStat {
public List<Map<String, Object>> getSessionStatDataList() {
List<Map<String, Object>> sessionStatDataList = new ArrayList<Map<String, Object>>(this.sessionStatMap.size());
for (WebSessionStat sessionStat : this.sessionStatMap.values()) {
for (WebSessionStat sessionStat : Collections.unmodifiableCollection(this.sessionStatMap.values())) {
Map<String, Object> sessionStatData = sessionStat.getStatData();
int runningCount = ((Number) sessionStatData.get("RunningCount")).intValue();
@@ -642,7 +643,6 @@ public class WebAppStat {
}
} else if (isLinux) {
osLinuxCount.incrementAndGet();
isAndroid = computeUserAgentAndroid(userAgent);
} else if (userAgent.indexOf("Symbian") != -1) {
osSymbianCount.incrementAndGet();