Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Illegal mix of collations" error when using CSV Static Endpoint for queries with emojis #1046

Open
shuttie opened this issue Jul 30, 2024 · 0 comments

Comments

@shuttie
Copy link

shuttie commented Jul 30, 2024

Describe the bug
When I create a CSV Static File endpoint with a CSV file having queries with UTF surrogate pairs (e.g. emojis), import fails:

[75432bc3-6079-4423-8949-020bdc6d7abb] Completed 500 Internal Server Error in 15ms (ActiveRecord: 7.5ms | Allocations: 2639)
[75432bc3-6079-4423-8949-020bdc6d7abb]   
[75432bc3-6079-4423-8949-020bdc6d7abb] ActiveRecord::StatementInvalid (Mysql2::Error: Illegal mix of collations (utf8mb3_general_ci,IMPLICIT) and (utf8mb4_bin,COERCIBLE) for operation '='):

A sample file reproducing the issue: kfc.csv
Where the query is kfc 🍟➕🍔➕🍗 - yes I also wonder who searches like that, but here we are.

To Reproduce
Steps to reproduce the behavior on v7.17.1:

  1. Go to Relevance Cases > Create case
  2. Click on 'CSV Static Endpoint' and upload sample file (or any other with surrogate pairs)
  3. Click 'import',
  4. UI hangs, and in console there's Mysql2::Error: Illegal mix of collations error.

Expected behavior
Expected the UI and import not to break on such weird queries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant