Alle Wednesday 12 May 2004 11:19, Sergei Golubchik ha scritto:
> Hi!
>
> On May 11, Nico Sabbi wrote:
> > Alle Tuesday 11 May 2004 15:33, Nico Sabbi ha scritto:
> > > Alle Tuesday 11 May 2004 15:00, Egor Egorov ha scritto:
> > > > Nico Sabbi <[EMAIL PROTECTED]> wrote:
> > > > > Hi,
> > > > > as the title says mysqldump 4.0.18 (and previous versions) doesn't
> > > > > want to dump data in the format
> > > > >
> > > > > insert into db.table values()
> > > > >
> > > > > not even using -e or -a.
> > > > >
> > > > > Is there any other cli switch that can do this?
> > > >
> > > > No, but if you use -B option of mysqldump USE db_name statements will
> > > > be included in the output.
> > >
> > > I see, but this creates me a serious problem:
> > > I usually replicate my databases  between a number of mysqld servers;
> > > when I want to copy a database "db" plus some additional metadata from
> > > the local server to the master I usually run
> > >
> > > mysqldump -B db -h local | mysql -h master
> > >
> > > that works correctly on the new_server, but totally messes up the
> > > current slaves that are configured to
> > >
> > > replicate-wild-do-table=db.%
> > >
> > > because there's no db.table syntax, so the slaves discard the insert.
> > > Maybe adding
> > >
> > > replicate-do-db=db (for all of my dbs) will do the trick?
> >
> > sorry for replying to myself, but I verified that adding
> > replicate-do-db=db to my.cnf doesn't work as I expected
>
> What do you mean - it doesn't work ?
> Or, rather, how do you expect it to work ? :)
>
> Regards,
> Sergei
>


I expect the slave servers to execute insert statements related to the 
database "db" that they have in their binlog (that I can see), both when they 
are in the form

insert into db.table values()

and when they show as:

use db;
insert into table values()

but this doesn't happen: the directive replicate-wild-do-table=db.% seems to 
control the behaviour of the slaves, so they only executes statements like
insert into db.table values() 

This behavior breaks replication when I use 
mysqldump -h local -a -B db  | mysql -h master 


Regards,
                Nico

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to