tags:

views:

138

answers:

1

How can I break SP execution in an Exception like fashion in MySQL?

I need a to break SP execution when an illegal argument is passed so no UPDATE/INSERT is performed.

My teacher actually did it by creating an SP called "raise_error" which did nothing but execute a non extising table. Which I would argue is a WTF...

+2  A: 

Short answer, no. It won't be implemented in the immediate future either.

Please see http://bugs.mysql.com/bug.php?id=16999

Your teacher is, sadly, pretty much correct (although, yes, it would be a WTFy way of doing things in almost any other dialect of SQL!).

RB