arguably better to "prepare" before "execute". anyway, the problem is probably not quoting the value you want to set for didDiagnostic column. i remember having such problem with a database when using a stored procedure vs executing at console, with the console being a bit smarter(?) to quote the value automatically terminated by whitespace. you could also turn on dbd/mysql debugging to see what happens.
the hardest line to type correctly is: stty erase ^H