SET @@sql_mode = (SELECT ...); not supported


I’m using an ORM that needs to add PIPES_AS_CONCAT to the @@sql_mode variable.

It does so by calling SET sql_mode=(SELECT CONCAT(@@sql_mode, ',PIPES_AS_CONCAT')); but, when doing so, MemSQL returns ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT CONCAT(@@sql_mode, ',PIPES_AS_CONCAT')' at line 1.

(NOTE: it doesn’t work either when removing the parentheses.)

Thank you for the help :slight_smile:

Thanks for reporting this.

MemSQL doesn’t support using expressions in SET clauses. This does pop up now and then as a blocker for using some MySQL tool vs MemSQL. I’ve linked your feedback to the internal task we have for adding this support.