I need to do some operations which insert mass amounts of records which then
must be sorted, and would like to use table locking.
The flow I'm looking for is:
LOCK TABLE A WRITE LOW_PRIO
DELETE FROM TABLE A (This used to be TRUNCATE TABLE A, but that complained
when I started locking)
LOAD DATA INFILE ... REPLACE INTO TABLE A
LOCK TABLE B WRITE
*while* SELECT FROM TABLE A
*process data and then* REPLACE INTO TABLE B
DELETE FROM TABLE A (Also, used to be truncate)
I don't seem to be able to lock a and then b later.
I don't want to lock B from the start, because the LOAD DATA might take a
I don't want to unlock and relock A, because other scripts may modify the
Any suggestions, pointers, RTFMs? (I looked at 14.4.5 and links from there
|• Multiple locks||Issac Goldstand||7 Jun|