RE: Crazy replication problem

2009-07-10 Thread Gary Smith


> -Original Message-
> From: Gary Smith
> Sent: Friday, July 10, 2009 5:26 PM
> To: Gary Smith; mysql@lists.mysql.com
> Subject: RE: Crazy replication problem
> 
> One quick follow up note:
> 
> In the top of the big script, I'm doing:
> 
> CREATE DATABASE x;
> CREATE TABLE x.whatever (...);
> 
> Reading into the various bug reports, do I need to issue a USE x; ?
> I'm assuming that MySql isn't picking up the replica because there is
> no current database specified, even though the tables are qualified.
> 
> Can anyone confirm this?
> 
> Gary
> 

So I found that adding a USE database to the tables allowed it to replicate.  I 
vaguely remember something like that a couple years back.  

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



RE: Crazy replication problem

2009-07-10 Thread Gary Smith
One quick follow up note:

In the top of the big script, I'm doing:

CREATE DATABASE x;
CREATE TABLE x.whatever (...);

Reading into the various bug reports, do I need to issue a USE x; ?  I'm 
assuming that MySql isn't picking up the replica because there is no current 
database specified, even though the tables are qualified.

Can anyone confirm this?

Gary


From: Gary Smith [g...@primeexalia.com]
Sent: Friday, July 10, 2009 5:12 PM
To: mysql@lists.mysql.com
Subject: Crazy replication problem

Here is steps take to get to the problem.  Version is 5.1.35

To be on the safe side, I did this prior to executing the scripts.  I deleted 
the mysql directory and the mysql-log directory, recreated them, chowned them, 
ran mysql_install_db, chowned them again.  So, I know at least I'm working with 
a clean setup.  I did this on both servers.

So, I have a script, which is actually a combination about 200 other scripts, 
cat'ed into a single script.  The first half of the script creates a database 
and several tables.  After all of the tables are created, a trigger is created 
on one of the tables.  Following the trigger, about 150 stored procedures.

This loads fine on the master server.  All looks well.  I then set the slave to 
slave against the master and it chokes on the creation of the trigger saying it 
can't find the table.  quickly glancing at the tables, there are none.  The 
database creation was replicated but the tables were not.

Here is what I have in the my.cnf file for replication (we had this setup for 
master/master earlier, thus the replicate-do-db, but we will not be doing that 
in this round):

log-slave-updates
sync_binlog = 1
replicate-same-server-id= 0
log_bin_trust_function_creators = 1
log-bin = /exports/mysql-log/log-repl
binlog-do-db= weblog
binlog-do-db= webarchive
replicate-do-db = weblog
replicate-do-db = webarchive

relay-log   = relay-bin
relay-log-index = relay-index
relay-log-info-file = relay-info
relay-log-purge = 1

Everything is INNODB.

Any ideas as to why the tables didn't replicate?  Also, I know that triggers 
shouldn't be replicated.  Is there any was to prevent trigger replication?
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=g...@primeexalia.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Crazy replication problem

2009-07-10 Thread Gary Smith
Here is steps take to get to the problem.  Version is 5.1.35

To be on the safe side, I did this prior to executing the scripts.  I deleted 
the mysql directory and the mysql-log directory, recreated them, chowned them, 
ran mysql_install_db, chowned them again.  So, I know at least I'm working with 
a clean setup.  I did this on both servers.

So, I have a script, which is actually a combination about 200 other scripts, 
cat'ed into a single script.  The first half of the script creates a database 
and several tables.  After all of the tables are created, a trigger is created 
on one of the tables.  Following the trigger, about 150 stored procedures.

This loads fine on the master server.  All looks well.  I then set the slave to 
slave against the master and it chokes on the creation of the trigger saying it 
can't find the table.  quickly glancing at the tables, there are none.  The 
database creation was replicated but the tables were not.

Here is what I have in the my.cnf file for replication (we had this setup for 
master/master earlier, thus the replicate-do-db, but we will not be doing that 
in this round):

log-slave-updates
sync_binlog = 1
replicate-same-server-id= 0
log_bin_trust_function_creators = 1
log-bin = /exports/mysql-log/log-repl
binlog-do-db= weblog
binlog-do-db= webarchive
replicate-do-db = weblog
replicate-do-db = webarchive

relay-log   = relay-bin
relay-log-index = relay-index
relay-log-info-file = relay-info
relay-log-purge = 1

Everything is INNODB.

Any ideas as to why the tables didn't replicate?  Also, I know that triggers 
shouldn't be replicated.  Is there any was to prevent trigger replication?
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org