On Wed, Jan 17, 2001 at 11:53:40PM -0800, Mike Wexler wrote:
> 
> Actually, I'm pretty sure it would need to be done in the MySQL
> server.  It could be done with either the master or the slave, but I
> think the slave would be cleaner.

Probably true. I just haven't thought too hard about it. I might be
possible today for the *first* slave, but after that it seems like it
can't be done.

> When I first read the documentation I thought that
>
>       LOAD TABLE tblname FROM MASTER
>
> would do the trick. I figured you would set up the server to handle
> replication. Set of the client. Run LOAD TABLE tblname FROM master
> for each table and be done. If LOAD TABLE read-locked the master and
> turned on replication for that table, this would actually work
> really nicely.

Yeah, it sounded like a nice silver bullet. That's why I took the
mention of LOAD TABLE FROM MASTER out of the HOWTO for now. Far too
many people misunderstood it and ended up frustrated.

> Given the current implementation of MySQL it should be possible to
> write a script that locked all the tables in a database (but not all
> databases). Copied the files from the master to the slave. Started
> up replication for that database by adding another:
> 
>       binlog-do-db=database_name
> 
> to the slaves my.cnf and restarting the slave.  I don't see anyway
> of implementing the mysqlhotrepl with a finer locking granularity
> than table level without modifying the implementation of the MySQL
> server.

Agreed. Right now I'm aiming just to do the entire server. It'll be an
all-or-nothing setup. Once it works, it shouldn't be hard to include
or exclude particular databases or tables from the snapshot.

Including or excluding them from the replication (binlog) itself is
left as an exercise to the admin who has to actually edit my.cnf.

> > Good point. I'll sleep tomorrow. :-)
> 
> You must not have kids :-)

True statement. Plus I have flexible work hours. It's a double-edged
sword, really...
-- 
Jeremy D. Zawodny, <[EMAIL PROTECTED]>
Technical Yahoo - Yahoo Finance
Desk: (408) 328-7878    Fax: (408) 530-5454
Cell: (408) 439-9951

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to