MySQL Inserting into locked aliased table
Posted
by Whitey
on Stack Overflow
See other posts from Stack Overflow
or by Whitey
Published on 2010-06-11T12:04:27Z
Indexed on
2010/06/11
21:42 UTC
Read the original article
Hit count: 257
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!
© Stack Overflow or respective owner