Mikhail-M commented on a change in pull request #18506:
URL: https://github.com/apache/airflow/pull/18506#discussion_r739517675



##########
File path: airflow/utils/sqlalchemy.py
##########
@@ -177,6 +179,14 @@ def process_result_value(self, value, dialect):
         return data
 
 
+def _is_dialect_good_for_row_locks(dialect: DefaultDialect) -> bool:
+    supports_for_update_of = dialect.name != "mysql" or 
dialect.supports_for_update_of
+    mariadb_10_6 = (
+        isinstance(dialect, MySQLDialect) and dialect._is_mariadb and 
dialect.server_version_info >= (10, 6)
+    )

Review comment:
       Unfortunately, it looks like there is no better way. 
   
   In our version of sqlalchemy it realized this way --  
https://github.com/sqlalchemy/sqlalchemy/blob/rel_1_3_24/lib/sqlalchemy/dialects/mysql/base.py#L2686,
 so we can inline it, but this is most likely worse
   
   In the modern version of sqlalchemy we can replace it with 
dialect.is_mariadb (and it is backward compatible)
   
https://github.com/sqlalchemy/sqlalchemy/blob/main/lib/sqlalchemy/dialects/mysql/base.py#L2756
   
   
   




-- 
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]


Reply via email to