SET @foo=bar; This would cause a deadlock in mysqld, it now generates the error: ER_SET_CONSTANTS_ONLY as follows: mysql> set @foo=bar; ERROR 1204: You may only use constant expressions with SET