java.sql.SQLSyntaxErrorException: Variable 'sql_mode' can't be set to the value of 'ALLOW_INVALID_DATES'

Running Metbase docker latest and attempting to create a database connection in the admin to a MemSQL v6.7.15 cluster and receiving the error message:

java.sql.SQLSyntaxErrorException: Variable 'sql_mode' can't be set to the value of 'ALLOW_INVALID_DATES'

I have contacted MemSQL support and they informed me that “ALLOW_INVALID_DATES” is not supported. Please advise how to proceed.

Using Metabase docker v0.31.2 works fine. Something in v0.32 broke this functionality.

Hi @daemon_of_chaos

Metabase 0.32 changed the driver to MariaDB Connector/J, but I don’t think that’s related to this.

But the driver also added the sql_mode='ALLOW_INVALID_DATES'
https://github.com/metabase/metabase/blob/0829dc7a1659036af07b5d25c0e48af709fcd8f9/src/metabase/driver/mysql.clj#L286

I’ve been trying to use “Additional parameters” in the database settings, to change the value to sql_mode='' and sessionVariables=sql_mode='' without success.

@camsaul Can you help with this?

Hi @flamber

I too tried using the “Additional Parameters” with various different modes with no apparent effect. I also tried different minor versions of the v0.32 docker images also with no change.

It was only after moving back to v0.31.2 did it work.

Hopefully some of that information is helpful.

Will be fixed in 0.32.3 by https://github.com/metabase/metabase/pull/9731