Fix a couple of little bugs in TKO.
-make sure selected fields get properly referenced by their table to avoid ambiguity errors
-centralize functionality for escaping user SQL - I did this because I was messing around with the code, but ended up leaving it unmodified.  But it's better centralized.
-change the way extra_select_fields are passed, to use a dictionary mapping alias to SQL instead of just passing the plain SQL with AS included.  This is how Django does it, and it's more safe and correct (in this case, it helps us automatically quote field names properly).
-clean up SQL for completed test count a bit
-replace "escapeQuotes" on client with "escapeSqlValue", which actually does the right thing, and get rid of TODO to this effect.  This was causing a bug when trying to drilldown on complex values (like long reasons)



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2235 592f7852-d20e-0410-864c-8624ca9c26a4
5 files changed