[clug] MySQL prepared statements issue
Tim Murphy
tim at murphy.org
Thu Feb 14 02:38:22 GMT 2008
Hi guys and gals,
I've come across a strange MySQL occurrence when doing prepared statements.
I'm using MySQL 5.0.45.
I run the usual syntax:
PREPARE prepared_stmt FROM "SELECT first_name FROM table WHERE id = ?";
SET @a1 = "123";
EXECUTE prepared_stmt USING @a1;
DEALLOCATE PREPARE prepared_stmt;
half of the time I get the right result, a quarter of the time I get the
error
Unknown prepared statement handler (prepared_stmt) given to DEALLOCATE
PREPARE
and the other quarter of the time I get the error
Unknown prepared statement handler (prepared_stmt) given to EXECUTE
I'm getting this pattern on two different machines. Has anyone come across
this problem before?
TIA
Tim
More information about the linux
mailing list