title: Lost connection to mysqld on a single large insert
body: <p>I am trying to restore data in a table with definition</p>
  
  <pre><code>CREATE TABLE UserDomainSummaries (
  summary_id              INT UNSIGNED,
  user_id                 BIGINT UNSIGNED,
  domain_id               BIGINT UNSIGNED,
  city_id                 INT UNSIGNED,
  state_id                INT UNSIGNED,
  country_id              INT UNSIGNED,
  visitCount              INT UNSIGNED NOT NULL,
  pageViewCount           INT UNSIGNED NOT NULL,
  totalTimeSpentInSecs    INT UNSIGNED NOT NULL,
  ffVisitCount            INT UNSIGNED NOT NULL,
  ffPageViewCount         INT UNSIGNED NOT NULL,
  ffTotalTimeSpentInSecs  INT UNSIGNED NOT NULL,
  
  PRIMARY KEY(summary_id, user_id, domain_id, country_id, state_id, city_id),
  FOREIGN KEY(summary_id) REFERENCES Summaries(id) ON DELETE CASCADE
  ) ENGINE=INNODB DEFAULT CHARSET=utf8;`
  </code></pre>
  
  <p>from a file with single insert with large number of rows totaling to 200MB. But, in between a error pops up saying</p>
  
  <pre><code>ERROR 2013 (HY000): Lost Connection To MySQL Server During Query
  </code></pre>
  
  <p>I have tried tweaking with the values of </p>
  
  <pre><code>innodb_buffer_pool_size
  net_read_timeout
  bulk_insert_buffer_size
  max_allowed_packet
  </code></pre>
  
  <p>but to no avail.</p>
  
  <p>Why is this happening?</p>