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

mysql 8.34 binary search change since 8.21 gives sql error on server start #3573

Closed
mxdog opened this issue Aug 30, 2023 · 0 comments
Closed

Comments

@mxdog
Copy link

mxdog commented Aug 30, 2023

I know the default server on linux is mariadb but i ran into this today setting up a new server with mysql
and below is a patch/change ? for one query to the /eqemu_source/common/say_link.cpp file that fixed it for me for mysql 8.34
MYSQL SERVER ERROR :
Error Code: 3995. Character set 'utf8mb3_bin' cannot be used in conjunction with 'binary' in call to regexp_like.

funny there are like 70 other binary queries in the code but this is the only one that gives the error, because rest are numbers i assume. Sad how long it took to find an answer, oracle is good at making arbitrary changes but not so good at telling you how to get around them **** a note to anyone else this might be useful to 8.22 is where they changed it.

say link.cpp line 379
from:
auto saylinks = SaylinkRepository::GetWhere(database, "phrase not REGEXP BINARY '[A-Z]' and phrase not REGEXP '[0-9]'");
to :
auto saylinks = SaylinkRepository::GetWhere(database, "CAST(phrase as BINARY) not REGEXP BINARY '[A-Z]' and phrase not REGEXP '[0-9]'");

sorry , i had a patch file but lost it in a redo and don't know if this works in mariadb (I don't use it )

I DID NOT TEST TO DOUBLE CHECK RESULT WAS CORRECT/EXPECTED for whatever that query is used for
just assumed so since there is no logic change and assume the regex will evaluate the same.
hope this helps someone else ...

fryguy503 added a commit to wayfarershaven/server that referenced this issue Dec 29, 2023
Fixes issue present in MySQL 8.0+ servers

Resolves issue EQEmu/Server#3573
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants