Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm also trying to understand why MySQL considers "load data infile" unsafe and switches to RBR if running in mixed mode, does that mean it is only unsafe when using SBR?

share|improve this question
up vote 2 down vote accepted

As always, there is a trace on why they marked it unsafe in 5.5.6 and also in 5.1.52

There are several problems with reproducing LOAD DATA INFILE queries in this manner:

  • If the user does not know the internal workings of mysqlbinlog, the temp files will accumulate on disk and never be removed.
  • There is no easy way to remove the temp files automatically (the safest way is to parse the output of mysqlbinlog, which is hard and there is still no guarantee that the format never changes, etc.)
  • Temp files will accumulate on the pushbuild server.
share|improve this answer
Your answer is a much more compact version of my novel. +1 !!! – RolandoMySQLDBA Mar 1 '12 at 21:00
Do you mean that if I'm using SBR that there are temp files for me to clean up, but with RBR there are not? – tmcallaghan Mar 1 '12 at 21:20
Correct. RBR stores the rows that were changed ONLY in the binlog. no need for a temp file. – Derek Downey Mar 1 '12 at 21:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.