Trying to run a prepared insert statement after locking the table for write give me this error for mysql : This command is not supported in the prepared statement protocol yet : LOCK TABLES tbl WRITE.
Any workaround for this issue ? Engine using for the table : INNODB .
P.S. : I wanted to lock the tables so i could avoid duplicate inserts (making the duplicate check on the application side not db side , unique index is out of question for varchar(5000)) . So i would need to lock the tables , but i can't do this with prepared statements . Will I get same error for stored procedures ? Any other ideeas regarding this issue ?
SELECT ... FOR UPDATE
.