You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
get_indexes_sql() fails on MySQL < 8.0.13 and MariaDB (missing EXPRESSION column) #1436
get_indexes_sql() in src/datajoint/adapters/mysql.py queries COALESCE(COLUMN_NAME, CONCAT('(', EXPRESSION, ')')) from information_schema.STATISTICS, but the EXPRESSION column only exists in MySQL 8.0.13+. On MySQL 5.7 or MariaDB, this fails with Unknown column 'EXPRESSION' in 'field list' the first time any table class is decorated with @schema.
Introduced in commit bd35a7e (PR #1338). Prior to that, the query just selected COLUMN_NAME directly.
A fallback for when EXPRESSION isn't available would fix this for both MySQL < 8.0.13 and MariaDB.
Activity
fix: handle missing EXPRESSION column in get_indexes_sql()