← Back to team overview

randgen team mailing list archive

Re: Thoughts on being able to select Transformers for theTransformer Validator


While it is a powerful and useful bug hunting tool, it seems that we are
approaching territory where we have useful Transforms that don't apply well
to every grammar.

It is more about which Transform applies to which generated query and not to which grammar.

In the past, failures in Transforms were suppressed, however this caused a situation where some 100% non-working Transforms were not detected, providing a false sense that stuff is being tested. So, now the balance is in the other direction, where most SQL errors in Transforms would cause the test to fail with STATUS_ENVIRONMENT_FAILURE.

For example, the ExecuteAsView Transform does not like subqueries and thus
breaks with optimizer_subquery.yy.

I just pushed a fix in this where the Transform is not applied if the query has several SELECT keywords in its body, which is sort of a poor regexp check for subqueries, in the absence of full parsing. Note that each Transform can reject any query it does not like outright without processing it.

It is possible to manually alter files and select what Transforms will be
used (
but I was wondering if there was any support for allowing options to be
passed, for example, an ignore-transform switch or something that would
eliminate certain ones or even a use-transforms to allow a user to specify a
single transform (for example if we wanted to only beat up code with
ExecuteAsSPTwice or something).

In any case, the manual method works, but I just wanted to see what the rest
of you guys were thinking.

Yes, we are in need of a system where we can pass options to Validators, Reporters, Transforms and the like. It has to be integrated with the existing system of perl-based configuration files and gnu-based command-line options. Any suggestion for a general syntax that we can apply to this and future situations would be much appreciated.

Even if the ExecuteAsView situation can be fixed, we will have more of the same in the future, as the various database products diverge in the syntax and features they support. At the same time, I intend to continue to expand the list of Transforms, because I think they are very useful because they silently check a lot of stuff people would not normally put in their grammars.

Philip Stoev



Mailing list: https://launchpad.net/~randgen
Post to     : randgen@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~randgen
More help   : https://help.launchpad.net/ListHelp