Jump to content
  • Join-Us

    https://metin2.dev is the 1st international community on Metin2 development. Join us to develop your skills and share your knowledge with the community, respectful and ethical forum.

  • 0

Collations DB


Akihiro

Question

Hello guys!

How can i fix this?

DirectQuery: AsyncSQL::DirectQuery : mysql_query error: Illegal mix of collations (latin2_general_ci,COERCIBLE), (latin2_general_ci,COERCIBLE), (latin1_swedish_ci,IMPLICIT) for operation 'replace'
query: SELECT ps.id,ps.player_id,REPLACE('#PLAYER_NAME# - Hello','#PLAYER_NAME#',p.name),ps.vnum,ps.count,ps.look,ps.socket0,ps.socket1,ps.socket2,ps.socket3,ps.attrtype0,attrvalue0,ps.attrtype1,attrvalue1,ps.attrtype2,attrvalue2,ps.attrtype3,attrvalue3,ps.attrtype4,attrvalue4,ps.attrtype5,attrvalue5,ps.attrtype6,attrvalue6 FROM `player_shop_items` ps LEFT JOIN player p ON p.id=ps.player_id where not EXISTS(select name from player_shop WHERE id=ps.shop_id) and not ISNULL(p.name)

 

Thank you for your time!

Link to comment
Share on other sites

  • Answers 4
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

4 answers to this question

Recommended Posts

  • 0
  • Distinguished Member
25 minutes ago, Akihiro said:

up

So you're using latin1_swedish_ci and latin2_general_ci, those are the collations of your 2 table. (player_shop_items, player_shop)

The error says "Illegal mix of collations"...

I'm not an expert of mysql but I have a common sense so what if you choose same collation for that 2 table? Then the mix is gone.

Spoiler

If you use navicat, right click to the table, design table, Options, and there "Character set" and "Collation". Choose the same, the default is the "latin1 -- West European", "latin1_swedish_ci" in Metin2 but you can choose the other one if you know you need that.

 

Edited by TMP4
Link to comment
Share on other sites

  • 0
  • Distinguished Member
31 minutes ago, Akihiro said:

Hello @ TMP4,
I've already done this, but still got this error.
Also i've change the tables to the default ones, but still got this error.

So are you saying both table have the same collation but the mysql server thinks otherwise?
Bruh that's some black magic what is beyond my knowledge.
Jokes aside please check again the collations, you may have not saved the tables.
It is also possible after you fixed the collation you still got some nasty syserr but it was different what you did not notice.

If you 100% sure that both table have the same collation and this is actually the current syserr then maybe you are changing collation for one table in runtime, like you set a collation query in your source when you initialize this (offline?) shop system.

Edited by TMP4
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.