You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/11/24 17:59:47 UTC

[GitHub] [airflow] potiuk edited a comment on pull request #12591: Actually run against the version of the DB we select in the matrix.

potiuk edited a comment on pull request #12591:
URL: https://github.com/apache/airflow/pull/12591#issuecomment-733142534


   It's so bad on the MYSQL side, that I even do not know how to react .....
   
   It seems that when you use Mysql8 Client and request utf8mb4 character, the database is created with :facepalm: :facepalm: :facepalm: :facepalm: :facepalm: :facepalm: :facepalm:  latin1 collation....
   
   This is what happens in our case. When we changed client in the docker image to use mysql8 client, our 5.7 database silently started to be created as latin1 database instead of utf8mb4 and it worked fine with the increased size, because in latin1 the row size is much smaller.
   
   Mysql 8 client's utf8mb4 is turned into utf8mb4_0900_ai_ci which is not known to mysql 5.7 and it falls back to default which is latin1 in MySQL5.7.
   
   TRUE STORY.
   
   
    https://dev.mysql.com/doc/refman/8.0/en/charset-connection.html
   
   > Why does this occur? After all, utf8mb4 is known to the 8.0 client and the 5.7 server, so both of them recognize it. To understand this behavior, it is necessary to understand that when the client tells the server which character set it wants to use, it really tells the server the default collation for that character set. Therefore, the aforementioned behavior occurs due to a combination of factors:
   
   > The default collation for utf8mb4 differs between MySQL 5.7 and 8.0 (utf8mb4_general_ci for 5.7, utf8mb4_0900_ai_ci for 8.0).
   
   > When the 8.0 client requests a character set of utf8mb4, what it sends to the server is the default 8.0 utf8mb4 collation; that is, the utf8mb4_0900_ai_ci.
   
   > utf8mb4_0900_ai_ci is implemented only as of MySQL 8.0, so the 5.7 server does not recognize it.
   
   > Because the 5.7 server does not recognize utf8mb4_0900_ai_ci, it cannot satisfy the client character set request, and falls back to its default character set and collation (latin1 and latin1_swedish_ci).
   
   
   
   
   
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org