Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a slave database that bears a different name than it's production counterpart. (We are using the replicate-rewrite-db option.)

When I run a mysqldump from the slave (which I do for making dev copies), two of the database views have the database name attached to them. I cannot use the dump file to create another copy without manually editing it.

If I run the same mysqldump from the production copy, everything comes out clean. So for some reason the slave has created these two views incorrectly. (The other four views were created before replication was established, which I believe explains the difference. I have confirmed replication is in sync.)

Snippet of the mysqldump from the slave:

/*!50001 VIEW `database_slave`.`view_company` AS select `database`.`company`.`id` AS `id`,
         `database`.`company`.`name` AS `name`,`database`.`company`.`state` AS `state`,

Same snippet of the mysqldump, but from production (nice and clean):

/*!50001 VIEW `view_company` AS select `company`.`id` AS `id`,
         `company`.`name` AS `name`,`company`.`state` AS `state`,

Can I fix this without having to dump from prod to the slave?

share|improve this question

1 Answer 1

Looks like you've hit mysql bug: http://bugs.mysql.com/bug.php?id=40345 Consider upgrading mysql to recent 5.1.X version.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.