-
MySQL Build Team authored
> ------------------------------------------------------------ > revno: 3184.7.1 > revision-id: luis.soares@sun.com-20091027151553-ri74b2zdchw8wyg7 > parent: joro@sun.com-20091019135504-e6fmhf4xyy0wdymb > committer: Luis Soares <luis.soares@sun.com> > branch nick: mysql-5.1-bugteam > timestamp: Tue 2009-10-27 15:15:53 +0000 > message: > BUG#48297: Schema name is ignored when LOAD DATA is written into > binlog, replication aborts > > In SBR or MBR, the schema name is not being written to the binlog > when executing a LOAD DATA statement. This becomes a problem when > the current database (lets call it db1) is different from the > table's schema (lets call it db2). For instance, take the > following statements: > > use db1; > load data local infile 'infile.txt' into table db2.t > > Should this statement be logged without t's schema (db2), when > replaying it, one can get db1.t populated instead of db2.t (if > db1.t exists). On the other hand, if there is no db1.t at all, > replication will stop. > > We fix this by always logging the table (in load file) with fully > qualified name when its schema is different from the current > database or when no default database was selected.
610f0f1b