From: Kristian Nielsen Date: March 24 2009 7:00am Subject: Re: LOAD DATA LOCAL INFILE in background thread brings down MySQL server List-Archive: http://lists.mysql.com/internals/36471 Message-Id: <87zlfbz9pe.fsf@knielsen-hq.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Andrej van der Zee writes: > able have this command supported. It works perfectly fine from the > test program below. But if I use the same commands in my background > thread in the MySQL server, then the call to mysql_query() hangs and You only showed the code that works, not the code that fails ... But the #1 reason for thread problems is using a single mysql connection with multiple threads simultaneously. Each thread needs exclusive locking around the use of the mysql connection object. - Kristian.