cmangos / issues

This repository is used as a centralized point for all issues regarding CMaNGOS.
179 stars 47 forks source link

MySQL 8.0.2+ new keyword RANK #1719

Closed dsx75 closed 5 years ago

dsx75 commented 5 years ago

MySQL server 8.0.2 introduced a new reserved keyword RANK, which is now causing some issues with columns named rank (could be fixed by enclosing column names with ` ).

For example (tbc-db): \sql\base\dbc\cmangos_fixes\Spell.sql

or in Server.log

ERROR:SQL: SELECT guildid,rank FROM guild_member WHERE guid = '1'

ERROR:SQL: SELECT spell_id, prev_spell, first_spell, rank, req_spell FROM spell_chain

ERROR:SQL: SELECT arena_team.arenateamid,name,captainguid,type,BackgroundColor,EmblemStyle,EmblemColor,BorderStyle,BorderColor, rating,games_week,wins_week,games_season,wins_season,rank FROM arena_team LEFT JOIN arena_team_stats ON arena_team.arenateamid = arena_team_stats.arenateamid ORDER BY arena_team.arenateamid ASC

It's no big deal, everything's working fine on older versions of MySQL server, just wanted to let you guys know, in case you didn't know already :)

dsx75 commented 5 years ago

I've just noticed that this is actually mentioned in the installation instructions.

My bad, sorry. Delete this issue, please.

Pooch11 commented 5 years ago

I didn't notice this in the installation instructions and made a fix for TBC version here I think it would be pretty convenient for new people interested in the project

dsx75 commented 5 years ago

I didn't notice this in the installation instructions

I meant this note in the Installation instructions:

(Note 2018-05-02: Do not use MySQL version 8.0 for now since build will fail on some queries. Use 5.7 until resolved)

Maybe there's more issues with the new MySQL besides this new keyword, who knows :)

and made a fix for TBC version here I think it would be pretty convenient for new people interested in the project

Great, thank you.

Lillecarl commented 5 years ago

@cyberium this is the MySQL weirdness I'm talking about