Comment 5 for bug 791783

Revision history for this message
John H. Embretsen (johnemb) wrote : Re: MTR testcase creation fails for MIN()/MAX() functions

I find pretty-printing useful for two reasons:

1) Easier to read and understand the actual query (no need to have a 100" monitor to see the entire query). However, the current pretty printing is far from perfect in that regard, so I often tend to prettify the SQL more or less manually when I need to (for myself or for developers), anyway.

2) Further automatic simplification of MTR test cases. The RQG test simplifier works on a line-by-line basis, right? So if the query is split into multiple lines, it can more easily simplify the actual query. This seems especially useful when the initial automatic simplification fails for some reason, where you still may get a test case with the original query pretty-printed, which you can massage slightly and then initiate further simplification using simplify-mysqltest.pl.

Will removing the pretty-print regexp lead to a reduced ability to automatically simplify queries in Transformer / ResultsetComparator context?

If not, I guess removing it is fine. Otherwise, the regexp should take care so that function calls are not split (no whitespace between function name and opening parenthesis).