I am using mysql version- 3.23.49a. Sometime i am getting a exception that is -
java.sql.SQLException: General error message from server: "Table 'X' was not locked with LOCK TABLES".
please send me solution if anybody had faced this kind of problem.
You have locked another table, and per MySQL docs:
A session that requires locks must acquire all the locks that it needs in a single LOCK TABLES statement.
See the hyperlink above for the cause and solution.
OCUP UML fundamental
Joined: Mar 20, 2008
thank you for reply, I have seen the MYSQl doc.Well, I am explain you the what is the problem actually I am getting.
I am using LOCK for a table(eg: Table A) in a method, And after complete process of that method doing UNLOCk that table(Table A)in finally block. But I got the LOCK Exception from different table(eg: Table B) of a different method on a select sql query. Which is doesn't have any relation with Table A. Please suggest me how to fixed this issue.