table2 where id > 1);
++
| id |
++
| 3 |
| 2 |
++
2 rows in set (33.36 sec)
mysql> commit;
Query OK, 0 rows affected (0.00 sec)
mysql>
Client 2:
mysql> delete from table1
-> where id=3;
Query OK, 1 row affected (22.33 sec)
mysql>
........
F
How do I lock rows in a union query so that I know they won't change during
the rest of my transaction?
I want to do the following query, using "LOCK IN SHARE MODE":
(select id from table1 where id > 1)
union
(select id from table2 where id > 1);
If I try:
(select id from table1 w