Ensure even select values in UNION query [RUN AS-IF-FOSS]
What does this MR do?
This MR adds an extra check to the Gitlab::SQL::Union
class to verify the number of select values of the passed in relations. If uneven number of columns are detected, an error will be raised. This only happens in test environment.
The MR also adds documentation explaining and fixing the problem.
-
I have added/updated tests following the Testing Guide, or it's not needed. (Consider all test levels. See the Test Planning Process.) -
I have tested this MR in all supported browsers, or it's not needed. -
I have informed the Infrastructure department of a default or new setting change per definition of done, or it's not needed.
Security
Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Edited by Adam Hegyi