cubicweb #3098165 [schema] erroneous warning on some case of constraint/rqlexpr [validation pending]

if you specify in mainvars a non-predefined variable and this variable is only used once in the expression, you get a warning telling that you don't use the variable.

Eg:

RQLUniqueConstraint('S ref R, X ref R',
                    mainvars='X',
                    msg=_('an entity using this reference already exists'))

will give at startup:

2013-08-29 12:53:59 - (cubicweb.schemaloader) WARNING: You did not use the X variable in your RQL expression RQLUniqueConstraint(Any X WHERE S ref R, X ref R)
prioritynormal
typebug
done in3.17.7
load0.100
load left0.000
closed by#762a331db741 [schema] fix spurious warning when rqlexpr/constraint mainvars specify a non predefined variable. Closes #3098165
patch[schema] fix spurious warning when rqlexpr/constraint mainvars specify a non predefined variable. Closes #3098165 [applied]