Add test for failing OR clause
authorEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 20 Jul 2021 01:14:30 +0000 (13:14 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 20 Jul 2021 01:14:32 +0000 (13:14 +1200)
commitfdbc0f2e8d4b58bf20a19970897d5597f5fe454f
tree93c34491cf1306bb6918a12e21dc84ce792e9957
parent8b1dce5213addc221fb604bbaece46680e1c3db1
Add test for failing OR clause

This fails because when the field is being concatenated like
`a`.`first_name`='x' OR`a`.`last_name`='x'

The lack of a space between OR and `a` is fugly but it
is parsed by mysql. However, when the value requires utf8mb4
to be supported to do the comparison it returns '0=1' if the
database does not support utf8mb (or it thinks it doesn't per

0 = 1 OR0 = 1
Civi/Api4/Query/Api4SelectQuery.php
tests/phpunit/api/v4/Action/ContactGetTest.php