MySQL Inserting into locked aliased table
- by Whitey
I am trying to insert data into a InnoDB MySQL table which is locked using an alias and I cannot for the life of me get it to work!
The following works:
LOCK TABLES Problems p1 WRITE, Problems p2 WRITE, Server READ;
SELECT * FROM Problems p1;
UNLOCK TABLES;
But try and do an insert and it doesn't work (it claims there is a syntax error round the 'p1' in my INSERT):
LOCK TABLES Problems p1 WRITE, Problems p2 WRITE, Server READ;
INSERT INTO Problems p1 (SomeCol) VALUES(43534);
UNLOCK TABLES;
Help please!