quepid
quepid copied to clipboard
"Illegal mix of collations" error when using CSV Static Endpoint for queries with emojis
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:
- Go to
Relevance Cases>Create case - Click on 'CSV Static Endpoint' and upload sample file (or any other with surrogate pairs)
- Click 'import',
- UI hangs, and in console there's
Mysql2::Error: Illegal mix of collationserror.
Expected behavior Expected the UI and import not to break on such weird queries.