<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 23 Jul 2012, at 11:40, Phil Mayers wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On 23/07/12 10:10, alan buxey wrote:<br><blockquote type="cite">Hi,<br></blockquote><blockquote type="cite"><blockquote type="cite">What do people think to stripping out tabs in xlated SQL queries so that the debug output is actually readable?<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">why play with the queries? Why not just strip the space in the debug output - that way, you get<br></blockquote><br>This is a safer approach IMO.<br><br>Certainly munging them for readability would be good, though.<br><br>One other option, that might be more generally usable, is to modify the config file parser to strip the indent present on the 1st from 2nd and subsequent lines when using continuations. At the moment, this:<br><br>some_query = "select foo from \<br>              bar where x=1"<br><br>...becomes:<br><br>"select foo from               bar where x=1"<br><br>...whereas the more intuitive result is:<br><br>"select foo from bar where x=1"<br><br>I think this is what leads to the whitespace in debugged SQL queries?<br></div></blockquote><div><br></div><div>Partially, the other part is arranging the fields into neat columns, and something happening to the line endings if they're escaped.</div><div><br></div><div>The problem is more pronounced with the V3.0 style SQL configuration.</div><div><br></div><div><a href="https://github.com/arr2036/freeradius-server/blob/ad8813369daa240ce75a3a75630d7da0cba0d11b/raddb/sql/mysql/dialup.conf">https://github.com/arr2036/freeradius-server/blob/ad8813369daa240ce75a3a75630d7da0cba0d11b/raddb/sql/mysql/dialup.conf</a></div><div><br></div><div><br></div><div><br></div><div><br></div></div></body></html>