title: MySQL LOAD XML takes too long (System lock)
body: <p>There are 4 local xml files on my server, and I try to load all them to 4 Mysql tables like this:</p>
  
  <pre><code>LOAD XML LOCAL INFILE "file1.xml"
              REPLACE
              INTO TABLE `table1`
              CHARACTER SET "utf8"
              ROWS IDENTIFIED BY "&lt;item&gt;"
  </code></pre>
  
  <p>Now comes the weird part.</p>
  
  <p>3 of the xml files are loaded perfectly, BUT ONE of the xml files takes forever to load, and if I look at the process it says "System lock". I thought maybe it's too big (600MB), but even dividing it into 10 pieces and loading each one of them gives pretty much the same result.</p>
  
  <p>here's the problematic xml:</p>
  
  <pre><code>&lt;item id="48121384"&gt;
      &lt;name&gt;&lt;![CDATA[BRIDGESTONE Blizzak Dm-v1 XL 285/50R20 116R]]&gt;&lt;/name&gt;
      &lt;shop_id&gt;2465&lt;/shop_id&gt;
      &lt;category&gt;&lt;![CDATA[362195]]&gt;&lt;/category&gt;
      &lt;price&gt;30.67&lt;/price&gt;
      &lt;country&gt;uk&lt;/country&gt;
      &lt;product_id&gt;325937&lt;/product_id&gt;
      &lt;product_pid&gt;395&lt;/product_pid&gt;
      &lt;ordering&gt;27&lt;/ordering&gt;
      &lt;img&gt;&lt;![CDATA[]]&gt;&lt;/img&gt;
      &lt;href&gt;&lt;![CDATA[http://blah.com/price/48121384/p1317/xml/?t=1392794884&amp;u=238221047]]&gt;&lt;/href&gt;
      &lt;description&gt;&lt;![CDATA[]]&gt;&lt;/description&gt;
  &lt;/item&gt;
  </code></pre>
  
  <p>and the table i'm trying to put it into (I've tried InnoDb and MyIsam - same thing)</p>
  
  <pre><code>field          type    
  id             int(11)     
  name           varchar(255) 
  shop_id        int(11)     
  category       int(11)     
  price          varchar(30)  
  country        varchar(30)  
  product_id     int(11)  
  product_pid    int(11)  
  ordering       int(11)  
  img            varchar(255) 
  href           text 
  description    text 
  </code></pre>