3211 Guilhem Bichot 2010-09-24
fix script now that the trace may not start with \n
modified:
WL4800_validate_json.py
3210 Guilhem Bichot 2010-09-23
test that SELECT INTO DUMPFILE does no escaping of \n
when dumping an optimizer trace.
modified:
WL4800_TODO.txt
mysql-test/include/optimizer_trace.inc
mysql-test/r/optimizer_trace_no_prot.result
mysql-test/r/optimizer_trace_ps_prot.result
=== modified file 'WL4800_validate_json.py'
--- a/WL4800_validate_json.py 2010-09-20 08:12:18 +0000
+++ b/WL4800_validate_json.py 2010-09-24 07:00:36 +0000
@@ -45,16 +45,20 @@ def check(trace, first_trace_line):
print
all = open(sys.argv[1]).readlines()
+trace_start_re = re.compile("^(.*\t)?{\n")
+trace_end_re = re.compile("^}(\t.*)?\n")
first_trace_line = trace_line = 0
trace = None
for l in all:
trace_line += 1
- if l == "{\n":
+ if trace_start_re.match(l):
assert first_trace_line == 0
trace = []
first_trace_line = trace_line
- if l.startswith("}\t") or l.startswith("}\n"): # end of current trace
+ trace.append("{\n")
+ continue
+ if trace_end_re.match(l):
assert first_trace_line != 0
trace.append("}") # eliminate any following columns of table (OS_MALLOC_ERROR etc)
check(trace, first_trace_line)
Attachment: [text/bzr-bundle] bzr/guilhem@mysql.com-20100924070036-ti4jk7ri0alv07xc.bundle
| Thread |
|---|
| • bzr push into mysql-next-mr-bugfixing branch (guilhem:3210 to 3211) | Guilhem Bichot | 24 Sep |