Illegal mix of collations leads to error 500

Created on 16 December 2020, over 3 years ago
Updated 13 February 2023, over 1 year ago

"Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (ascii_general_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation '=': SELECT name, value FROM {key_value_expire} WHERE expire > :now AND name IN ( :keys__0 ) AND collection = :collection; Array ( [:now] => 1608110913 [:collection] => form [:keys__0] => NS09<s1﹥DBLʺSNGLʹNS09 ) in Drupal\Core\KeyValueStore\StorageBase->get() (line 35 of /var/www/html/core/lib/Drupal/Core/KeyValueStore/StorageBase.php)."
This issue occurs when we modify the POST request data to a form and insert some utf-8 character in form_build_id.
ParameterName: form_build_id
ParameterType: POST
Payload: NS09<s1﹥DBLʺSNGLʹNS09
But the database uses 'utf8mb4_general_ci' collation and also all the tables in the database also has 'utf8mb4_general_ci' collation.
I could not find any table using the collation 'ascii_general_ci'

🐛 Bug report
Status

Needs work

Version

10.1

Component
Database 

Last updated 1 minute ago

  • Maintained by
  • 🇳🇱Netherlands @daffie
Created by

🇮🇳India prabha.venkatesan

Live updates comments and jobs are added and updated live.
  • Security

    It is used for security vulnerabilities which do not need a security advisory. For example, security issues in projects which do not have security advisory coverage, or forward-porting a change already disclosed in a security advisory. See Drupal’s security advisory policy for details. Be careful publicly disclosing security vulnerabilities! Use the “Report a security vulnerability” link in the project page’s sidebar. See how to report a security issue for details.

  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States smustgrave

    This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.

    Appears to be a bug which will require a test case/coverage

    Also the proposed solution should be added to the issue summary, recommend using default template.

Production build 0.71.5 2024