title: Are mysql multiple inserts within a Single query atomic?
body: <p>I'm doing multiple inserts in a <strong>single</strong> query:</p>
  
  <pre><code>INSERT INTO table (c1, c2) VALUES (1,2),
                                    (2,3),
                                    (3,4),......
           ON DUPLICATE KEY UPDATE c2 = VALUES(c2)
  </code></pre>
  
  <p>Now suppose that there's over tens of thousands of VALUES specified in the query (hence the ellipsis)....</p>
  
  <p>Can there ever be a case in which some parts of the VALUES managed to get inserted/updated in the database but the rest did not get inserted/updated possibly due to some sort of db error/failure/memory-running-out etc?</p>
  
  <p><strong>Are mysql queries ALL or Nothing?</strong></p>
  
  <p>Is it true that for every mysql query executed, either all values specified in the query will be inserted/updated smoothly, or none of the values will be inserted/updated?</p>