var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: ERROR 1223: Can't execute the query because you have a conflicting read lock
I'm currently working on a JDBC project, I have one page which has a SELECT * FROM table to retrieve column headers - This is a JDBC transaction
But my next page contains an insert - However when I try to insert into the table I get: ERROR 1223: Can't execute the query because you have a conflicting read lock
I have tried "UNLOCK TABLES" and I have set permissions with the user as Select in the User table, and everything except GRANT in the db table.
I'm using version 4.024, and I have a dev machine which is the same, however the dev machine works fine, but my other machine just throws this error at me!
I have tried the insert at command line with the same user and I get the same error.
Does anyone have any ideas what could be causing this? And How to solve the problem?
Thanks and best regards
What you have done is start a transaction, done a READ LOCK select on a table, and then tried to insert into when its locked in the same transaction. Use seperate transactions...
You may find your production server has a different MySQL setup with read locks set on by default (if that is possible?)
Thanks guys but the problem was my mistake - It was a snapshot server which I have put into read-only mode in the "my.cnf"
Sorted it now - Thanks anyway guys