Bug #34332 replicate-rewrite-db doesn't work with single character database names
Submitted: 5 Feb 2008 20:49 Modified: 4 Oct 2011 9:55
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.0.54, 5.1.22, 6.0 BK OS:Any
Assigned to: Libing Song CPU Architecture:Any
Tags: replicate-rewrite-db

[5 Feb 2008 20:49] Shane Bester
Description:
--replicate-rewrite-db=from_name->to_name does not work if from_name is 1 character long.

Error message returned is:
Bad syntax in replicate-rewrite-db - empty FROM db!

How to repeat:
doesn't work:

mysqld --replicate-rewrite-db="a->b"

works:

mysqld --replicate-rewrite-db="aa->bb"

Suggested fix:
fix handle_one_option() ?
[5 Feb 2008 20:50] MySQL Verification Team
s/handle_one_option/get_one_option/ :)
[5 Feb 2008 22:25] Sveta Smirnova
Thank you for the report.

Verified as described.
[4 Dec 2008 18:25] Sveta Smirnova
Bug #40417 was marked as duplicate of this one.
[4 Oct 2011 9:55] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html
[4 Oct 2011 9:57] Jon Stephens
Documented in the 5.6.4 changelog as follows:

        --replicate-rewrite-db=from_name->to_name did not work correctly 
        when the name of the source database (from_name) consisted of 
        only a single character.

Closed.