And it tells me that I have an error in my query (same query works with MySQL Workbench perfectly).
Is it issue with Metabase configuration/setting, or it's just not supported?
Overall issue is close to the one described here:
but I didn't see a response there that there are any problems with using SET, that's why I wonder.
Currently we do not support multi-statement SQL expressions like this. So using the SET command to create a variable which is then used in a subsequent statement will indeed result in an error.