patternsqlMinor
Is the "load data infile" command in MySQL unsafe in general, or just when using statement based replication?
Viewed 0 times
thestatementjustgeneralunsafereplicationinfilemysqlusingbased
Problem
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?
Solution
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:
accumulate on disk and never be removed.
parse the output of mysqlbinlog, which is hard and there is still no guarantee that the
format never changes, etc.)
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.
Context
StackExchange Database Administrators Q#14227, answer score: 2
Revisions (0)
No revisions yet.