Bug #40417 replicate-rewrite-db does not work with schema names of ONE (1) character
Submitted: 30 Oct 2008 8:58 Modified: 4 Dec 2008 18:25
Reporter: Oli Sennhauser Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Options Severity:S3 (Non-critical)
Version:5.1.29 OS:Any
Assigned to: CPU Architecture:Any

[30 Oct 2008 8:58] Oli Sennhauser
Description:
Trying to start a mysqld with replicate-rewrite-db on a one letter schema name prevent mysqld from starting.

081030 09:53:45 mysqld_safe Starting mysqld daemon with databases from /home/mysql/data/mysqld512763172
Bad syntax in replicate-rewrite-db - empty FROM db!
081030 09:53:45 mysqld_safe mysqld from pid file /home/mysql/data/mysqld512763172/mysql-3312.pid ended

As soon as schema name is 2 or more characters long it works.

How to repeat:
[client]

port          = 3312
socket        = /home/mysql/tmp/mysql-3312.sock

[mysqld]

port          = 3312
socket        = /home/mysql/tmp/mysql-3312.sock

log_bin       = bin-log
server_id     = 2

replicate-rewrite-db            = b->aa

Suggested fix:
Do a proper boundary check.
[30 Oct 2008 16:43] Valeriy Kravchuk
Thank you for a problem report. Please, try to repeat with a newer version, 5.1.29, and inform about the results.
[3 Nov 2008 12:39] Oli Sennhauser
Hi Valeriy

Still the same behavior!

Oli
[1 Dec 2008 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[4 Dec 2008 18:25] Sveta Smirnova
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments to the original bug instead.

Thank you for your interest in MySQL.

Duplicate of bug #34332