Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Follow-up to #2529188: Provide better error handling for MySQL client and server utf8mb4 incompatibility
Problem/Motivation
Reported in https://www.drupal.org/node/2529188#comment-10264753:
The error message shows the wrong version:
The libmysqlclient driver version 5.6.19-67.0-log is less than the minimum required version. Upgrade to libmysqlclient version 5.5.3 or up, or alternatively switch mysql drivers to MySQLnd version 5.0.9 or up.
Proposed resolution
Show the right version
Remaining tasks
Review patch
User interface changes
N/A
API changes
N/A
Data model changes
N/A
Beta phase evaluation
Issue category | Bug because the wrong version is listed. |
---|---|
Issue priority | Follow up to #2529188: Provide better error handling for MySQL client and server utf8mb4 incompatibility. Major because this can cause issues for anyone starting Drupal 8 for the first time. |
Comment | File | Size | Author |
---|---|---|---|
#7 | 2558615-7.patch | 2.55 KB | stefan.r |
#3 | 2558615-3.patch | 3.03 KB | stefan.r |
Comments
Comment #2
stefan.r CreditAttribution: stefan.r commentedComment #3
stefan.r CreditAttribution: stefan.r commentedComment #5
cilefen CreditAttribution: cilefen commentedComment #6
stefan.r CreditAttribution: stefan.r commentedAlmost ;)
It does show the correct server version, it's just that that's we're not interested in that when we do the client check
Comment #7
stefan.r CreditAttribution: stefan.r commentedComment #8
cilefen CreditAttribution: cilefen commentedGood - you can tell I was confused.
Comment #9
stefan.r CreditAttribution: stefan.r commentedJust a heads up, @ansorg posted in https://www.drupal.org/node/2529188#comment-10269023 that applying this patch fixed his issue.
Comment #10
cilefen CreditAttribution: cilefen commentedIs this a duplicate of #2529188: Provide better error handling for MySQL client and server utf8mb4 incompatibility or does it just improve the error making #2529188: Provide better error handling for MySQL client and server utf8mb4 incompatibility more solvable?
Comment #11
stefan.r CreditAttribution: stefan.r commentedThat issue introduced a client version check on top of a server version clint check, but the error message it introduced shows the wrong version number in the client check, so it's not very helpful as it shows the server version instead of the client version.
Comment #12
cilefen CreditAttribution: cilefen commentedSince this is a follow-up, I supposed we need some test coverage for this message, if that is even possible with the testbots.
Comment #13
stefan.r CreditAttribution: stefan.r commentedNo not possible sadly. Can't be unit tested either, just manually tested.
@ansorg did some manual testing in https://www.drupal.org/node/2529188#comment-10269023
Comment #14
stefan.r CreditAttribution: stefan.r commentedJust bumping this as @eranmatis just posted this in the issue queue, which illustrates how wrong the current message is and the kind of confusion this is causing:
Comment #15
eranmatis CreditAttribution: eranmatis as a volunteer commentedThanks Stefan,
I applied the patche, and as expected, I'm getting the following message:
Comment #16
stefan.r CreditAttribution: stefan.r commentedGreat, good to hear this is working with the patch applied now!
Comment #17
cilefen CreditAttribution: cilefen commentedI had to
git diff --word-diff=color
to get a good look at this. The problem is that for whatever reason, the client $version that is determined above this chunk of code is not used in the error messages. Instead, the server version is used. This is just a straight-up bug. The patch changes exactly what is needed and no more.Comment #19
stefan.r CreditAttribution: stefan.r commentedBack to RTBC assuming this was unrelated
Comment #22
catchCommitted/pushed to 8.0.x, thanks!