LOAD DATA LOCAL INFILE Hangs in Thread State System Lock (Doc ID 1617362.1)

Last updated on MAY 18, 2017

Applies to:

MySQL Server - Version 4.0 to 5.5 [Release 4.0 to 5.5]
Information in this document applies to any platform.

Symptoms

The LOAD DATA LOCAL INFILE command is very slow and have a "System Lock" thread state:

mysql> SHOW PROCESSLIST;

+--------+-------+-----------+------+---------+--------+-------------+------------------------------------------------+
| Id     | User  | Host      | db   | Command | Time   | State       | Info                                           |
+--------+-------+-----------+------+---------+--------+-------------+------------------------------------------------+
| 60310  | mysql | localhost | test | Query   | 869014 | System lock | LOAD DATA LOCAL INFILE '/tmp/data.txt' REPLACE |
+--------+-------+-----------+------+---------+--------+-------------+------------------------------------------------+

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms