potiuk commented on a change in pull request #17729:
URL: https://github.com/apache/airflow/pull/17729#discussion_r693336982
##########
File path: airflow/models/base.py
##########
@@ -44,6 +44,19 @@ def get_id_collation_args():
if collation:
return {'collation': collation}
else:
+ # Automatically use utf8mb3_general_ci collation for mysql
+ # This is backwards-compatible. All our IDS are ASCII anyway so even if
+ # we migrate from previously installed database with different
collation and we end up mixture of
+ # COLLATIONS, it's not a problem whatsoever (and we keep it small
enough so that our indexes
+ # for MYSQL will not exceed the maximum index size.
+ #
+ # See
https://github.com/apache/airflow/pull/17603#issuecomment-901121618.
+ #
+ # We cannot use session/dialect as at this point we are trying to
determine the right connection
+ # parameters, so we use the connection
+ conn = conf.get('core', 'sql_alchemy_conn', fallback='')
+ if conn.startswith('mysql'):
Review comment:
Conn. is just a string. We do not want to instantiate a session just yet
at this moment, wy just want to use connection string to make a decision here!
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]