Uploaded image for project: 'Apache Airflow'
  1. Apache Airflow
  2. AIRFLOW-4464

Fix case-insensitive id columns in mysql



    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: database
    • Labels:


      By default, string comparisons in mysql are case-insensitive, so the task ids "foo" and "FOO" are treated as identical. This means that a dag with those task ids will fail to schedule with a sqlalchemy `IntegrityError` using mysql, but not postgres or sqlite. This situation probably doesn't happen often, and users probably shouldn't use task ids that are identical except for case, but I think we should improve the behavior here. A few options:


      • Configure sqlalchemy to use a binary collation for string id columns under mysql so that string comparisons are case-sensitive.
      • Require dag and task ids to be unique regardless of case. This would be a breaking change.
      • Document that mysql users should configure mysql to use binary collations for string types by default. This would still show users a 500 if the database isn't configured correctly.


      I'll submit a pull request with a failing unit test to describe the issue.


          Issue Links



              • Assignee:
                jmcarp Joshua Carp
                jmcarp Joshua Carp
              • Votes:
                0 Vote for this issue
                4 Start watching this issue


                • Created: