mysql error handling stored procedure doesn't catch error
Out of the box answer:

mysql&gt; SELECT @@version REGEXP '^5.[6789]';
+------------------------------+
| @@version REGEXP '^5.[6789]' |
+------------------------------+
|                            1 |
+------------------------------+


(Granted, it won't work forever.)