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

REF Ensure that when doing RLIKE BINARY the field is cast as BINARY t… #19399

Merged
merged 1 commit into from
Jan 17, 2021

Conversation

seamuslee001
Copy link
Contributor

…o prevent issue on MySQL 8

Overview

This fixes an error on MySQL 8.0.22 nativecode=3995 ** Character set 'utf8mb4_unicode_ci' cannot be used in conjunction with 'binary' in call to regexp_like.

Before

MySQL 8 errors

After

No Error

ping @demeritcowboy @eileenmcnaughton @totten

@civibot
Copy link

civibot bot commented Jan 17, 2021

(Standard links)

@civibot civibot bot added the master label Jan 17, 2021
@seamuslee001
Copy link
Contributor Author

Jenkins re test this please

@demeritcowboy
Copy link
Contributor

I've only run on mariadb at the moment but just noting EXPLAIN is the same before and after, e.g. regarding performance. It depends more what the other fields in the select and where clauses are.

@eileenmcnaughton
Copy link
Contributor

As soon as we are casting the field we will be bypassing the index - but we may already have been doing so.

How do we actually reach this clause?

@eileenmcnaughton
Copy link
Contributor

I can't rule out that this will cause a performance regression in some cases but I don't think merging it is really optional given mysql8 can't be supported unless it works

@eileenmcnaughton eileenmcnaughton merged commit efbd974 into civicrm:master Jan 17, 2021
@eileenmcnaughton eileenmcnaughton deleted the mysql8_rlike branch January 17, 2021 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants