提交 6f23470c authored 作者: Thomas Mueller's avatar Thomas Mueller

The ConvertTraceFile tool could not parse some files.

上级 d5e6c929
...@@ -207,7 +207,7 @@ public class Trace { ...@@ -207,7 +207,7 @@ public class Trace {
} }
buff.append("*/"); buff.append("*/");
buff.append(StringUtils.javaEncode(sql)); buff.append(StringUtils.javaEncode(sql));
buff.append(params); buff.append(StringUtils.javaEncode(params));
buff.append(';'); buff.append(';');
sql = buff.toString(); sql = buff.toString();
traceWriter.write(TraceSystem.INFO, module, sql, null); traceWriter.write(TraceSystem.INFO, module, sql, null);
......
...@@ -143,6 +143,7 @@ public class ConvertTraceFile extends Tool { ...@@ -143,6 +143,7 @@ public class ConvertTraceFile extends Tool {
} else if (line.startsWith("/*SQL")) { } else if (line.startsWith("/*SQL")) {
int end = line.indexOf("*/"); int end = line.indexOf("*/");
String sql = line.substring(end + "*/".length()); String sql = line.substring(end + "*/".length());
sql = StringUtils.javaDecode(sql);
line = line.substring("/*SQL".length(), end); line = line.substring("/*SQL".length(), end);
if (line.length() > 0) { if (line.length() > 0) {
String statement = sql; String statement = sql;
...@@ -165,7 +166,7 @@ public class ConvertTraceFile extends Tool { ...@@ -165,7 +166,7 @@ public class ConvertTraceFile extends Tool {
} }
addToStats(statement, count, time); addToStats(statement, count, time);
} }
scriptWriter.println(StringUtils.javaDecode(sql)); scriptWriter.println(sql);
} }
} }
javaWriter.println(" }"); javaWriter.println(" }");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论