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

[BUG] run sql on view error [Illegal mix of collations (utf8mb4_bin,NONE) and (utf8mb4_unicode_ci,COERCIBLE) for operation 'like'] #747

Open
jiangbing321 opened this issue Jan 13, 2023 · 2 comments
Labels
bug Something isn't working NotActive

Comments

@jiangbing321
Copy link

  • OS:
  • Mac
  • Database Type:
  • Mysql
  • Extension Version:
  • v6.1.1

I run the sql "select count(*) from view_course_grades WHERE grade_ids LIKE '%,6,%';" on a view. It shows an error:

SQL: select count(*) from view_course_grades WHERE grade_ids LIKE '%,6,%';

Illegal mix of collations (utf8mb4_bin,NONE) and (utf8mb4_unicode_ci,COERCIBLE) for operation 'like'

But It is ok when I run the sql on mysql command client. I don't what's the reason.
Could you help me, thanks.

@jiangbing321 jiangbing321 added the bug Something isn't working label Jan 13, 2023
@jiangbing321 jiangbing321 changed the title [BUG] [BUG] run sql on view error [Illegal mix of collations (utf8mb4_bin,NONE) and (utf8mb4_unicode_ci,COERCIBLE) for operation 'like'] Jan 13, 2023
@cweijan
Copy link
Owner

cweijan commented Jan 13, 2023

This seems to be caused by collation, I will try to fix it.

@cweijan
Copy link
Owner

cweijan commented Jan 13, 2023

Hi, this error should be a bug of the version of MySQL you are using, I can't handle it.

Please try to upgrade your MySQL version, or change the collation of the grade_ids field in the original table of the view from utf8mb4_bin to utf8mb4_unicode_ci.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working NotActive
Projects
None yet
Development

No branches or pull requests

2 participants