Bug #65691 a new param replicate-wild-rewrite-table for rewite table name in slave
Submitted: 20 Jun 2012 18:56 Modified: 21 Jun 2012 6:12
Reporter: xiaobin lin (OCA) Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Replication Severity:S4 (Feature request)
Version:5.5.25 OS:Any
Assigned to: CPU Architecture:Any
Tags: Contribution, replicate-rewrite

[20 Jun 2012 18:56] xiaobin lin
There is a param replicate-rewrite-db already, for from_db.* -> to_db.*
It is useful for environment that need split tables into several dbs in master, and collect all the updates into one db in slave.

Another requirement will be spliting table into several ones in on schema,
such as split a into a_01, a_02, .... a_n, for performance issues.
There may be requirement that need to collect all the a_% data into a single table, in slave.

So if there is way to translate updates from a_% into a, it will be convenient.
Patch follow based on Percona Server 5.5.18, offer a new param for the purpose above.
  replicate-wild-rewrite-table=test_%.abc_% -> test.abc
can translate all updates in tables that match the "test_%.abc_%" patten, into test.abc

How to repeat:
new feature

Suggested fix:
As the patch in attachment
[20 Jun 2012 18:57] xiaobin lin
Based on 5.5.25

Attachment: table_rewritten.diff (application/octet-stream, text), 7.00 KiB.

[21 Jun 2012 6:12] Valeriy Kravchuk
Thank you for the feature request and patch contributed.