in reply to Re^3: How can I make DBI's prepare() fail? [MySQL]
in thread How can I make DBI's prepare() fail? [MySQL]

I think there was a fundamental misunderstanding here, possibly caused by my wording.

Your answers are perfectly good answers to "how should I create a test so that I can see what happens if a particular function fails?", which is one interpretation of my question.

However my question is really "how can I make real-life code fail at the prepare() stage if the SQL code is bad?"

kschwab's answer here is the answer to the question I was trying to ask.