The answer is 3 =)
With myisam tables, you can have partially complete statements. That is if you get an
error, all rows handled before the error are still in the table. With innodb, an error
generates a rollback and your table is returned to its state before the statement was run.
To find the actual number of rows processed when using REPLACE or IGNORE, see the
From: James W. McKelvey [mailto:James.W.McKelvey@stripped]
Sent: Monday, October 25, 2010 12:16 PM
Subject: Load Data Infile Errors
I have a question about the execution cycle of LOAD DATA INFILE.
If I issue a large file via LDI LOCAL, I know that the file is copied to
the MySQL server and executed there.
But at what point does the statement finish from the sender's point of view?
1) When the file is successfully copied?
2) When the file is copied and parsed?
3) When the file is completely processed?
I'm guessing 2).
The reason for asking is to determine what errors may be returned and
how I can deal with them.
Is it possible for the file to be partially processed, say, inserting
the first half of the rows? If 2) or 3), I would say no (barring some
serious server error).
Since LOCAL implies IGNORE, is there any way to get the number of
ignored rows? What about replace?
Ultimately I want to know under what conditions I should reissue the
file, and whether or not that could introduce duplicate entries for
tables with non-unique keys.
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=1
This message contains confidential information and is intended only for the individual
named. If you are not the named addressee, you are notified that reviewing,
disseminating, disclosing, copying or distributing this e-mail is strictly prohibited.
Please notify the sender immediately by e-mail if you have received this e-mail by mistake
and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be
secure or error-free as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses. The sender therefore does not accept
liability for any loss or damage caused by viruses or errors or omissions in the contents
of this message, which arise as a result of e-mail transmission. [FriendFinder Networks,
Inc., 220 Humboldt Court, Sunnyvale, CA 94089, USA, FriendFinder.com