For some reason, the DB backend’s AutocompleteTest is failing on MySQL 5.6/5.7. We should figure out, why, and whether this leads to real-world problems, too. (Otherwise, we might want to decide to just not test against those versions – if the fix would complicate the test too much.)
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 3091198-7.patch | 894 bytes | alexpott |
| #7 | 6-7-interdiff.txt | 1.6 KB | alexpott |
| #6 | 3091198-6.patch | 741 bytes | alexpott |
Comments
Comment #2
drunken monkeyIt’s now just a single fail, which I can’t reproduce locally: test result.
Does anyone have more luck?
Comment #3
mkalkbrennerI just want to mention that we have one single fail in Search API Solr as well which is really strange:
1) Drupal\Tests\search_api_solr_defaults\Functional\IntegrationTest::testInstallAndDefaultSetupWorking
Behat\Mink\Exception\ElementNotFoundException: Button with id|name|label|value "Save" not found.
Comment #4
effulgentsia commentedYes, I can reproduce that Autocomplete test failure locally just by running:
php ./vendor/bin/phpunit -c core ./modules/contrib/search_api/modules/search_api_db/tests/src/Kernel/AutocompleteTest.phpwith a MySQL 5.7 database specified for
SIMPLETEST_DBwithincore/phpunit.xml.It happens on PHP 7.3 too, not just on 7.4.
Per #3126751-5: Fix calls to deprecated PHPUnit methods, it only happens on MySQL 5.6 and 5.7, not 5.5 or 8, and not on other databases.
Comment #5
drunken monkeyThanks a lot for confirming this and investigating! Then, apparently, we don’t have any problems with PHP 7.4 at all, just with those two MySQL versions. (Further confirmed by this test run.)
Changing the issue title and description accordingly, and decreasing priority.
Unfortunately, I’m not running MySQL at all, just all other supported DBMSs (more or less – MariaDB, SQLite, Postgres), so I can’t reproduce this problem. It would be awesome if someone with the right setup could investigate.
I tried to do it visually, just by looking at the code, but I’m stumped – I don’t see how this would suddenly fail, when the previous assertions don’t. The fact that it only fails on very specific MySQL versions indicates that we trigger some very weird MySQL bug, though, I’d guess? However, don’t really have any further clue.
(I did spot #3133011: Clean up AutocompleteTest::assertSuggestionsEqual(), though.)
Comment #6
alexpottHere's a patch to prove the problem exists and is not related to PHP 8.1 or Drupal 9.3.x
Comment #7
alexpottAnd here's the fix. Not sure why but changing the order of the NOT IT and LIKE conditions fixes this.
Comment #8
alexpottI think the reason this is hard to reproduce locally with current MySQL builds is the bug is fixed but DrupalCI is on a very old version on MySQL - ie. 5.7.22
Comment #9
drunken monkeyThanks a lot for digging into this and providing a patch!
Yes, pretty strange that this fixes it, but as long as it’s fixed I’m happy.
Committed. Thanks again!