MySQL Forums
Forum List  »  MyISAM

Confusing "Waiting for table level lock"
Posted by: William Oberman
Date: June 27, 2015 03:02PM

I'm running:
Server version: 5.5.38-log MySQL Community Server (GPL)

I'm doing an import of 22 million row to a MyISAM table using:
LOAD DATA LOCAL INFILE '$file' INTO TABLE $table

I was running "show full processlist" over and over. During the import, everything is fine, and the import looks like:
| 40199565 | redacted | redacted:35430 | redacted | Query | 25 | NULL | LOAD DATA LOCAL INFILE 'redacted' INTO TABLE redacted |

Then it goes into Repair by sorting (and everything is still fine):
40199565 | redacted | redacted:35430 | redacted | Query | 44 | Repair by sorting | LOAD DATA LOCAL INFILE 'redacted' INTO TABLE redacted |
|

BUT, then goes into "query end" and I get a lot of "Waiting for table level lock" on different, unrelated MyISAM tables:

40199565 | redacted | redacted:35430 | redacted | Query | 76 | query end | LOAD DATA LOCAL INFILE 'redacted' INTO TABLE redacted |

Example of the many (from different tables) locked queries, all inserts or updates:
40192932 | redacted | redacted:59804 | redacted | Query | 5 | Waiting for table level lock | INSERT IGNORE INTO redacted SET redacted='redacted' |
|

Does this make any sense? Unless MySQL has some kind of global table lock mechanism for imports at the end, this makes no sense to me.

Options: ReplyQuote


Subject
Views
Written By
Posted
Confusing "Waiting for table level lock"
4577
June 27, 2015 03:02PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.