Bug #56487 length of arg value in `--replicate-*= value' is not checked
Submitted: 2 Sep 2010 9:43
Reporter: Andrei Elkin Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.1+ OS:Any
Assigned to: Assigned Account CPU Architecture:Any
Tags: replication filtering rules

[2 Sep 2010 9:43] Andrei Elkin
--replicate-{do,wild,ignore}-* requires an arg string that length is not controlled neither it is specified what are max sizes for
corresponding fields of Show Slave Status' pseudo-table.

In the current implementation the fields' capacity is same as  LARGE BLOB|TEXT
which does not appear as reasonable.

Notice, Performance_Schema SLAVE_STATUS table really needs to know max:s in order
to define the table attributes.

Given that it is suggested:

0. to declare the max size for the Show-Slave-Status' replicate-* fields;
1. to check the arg string length at command line params parsing.

A reasonable value can be settled on as 65535 the max of VARCHAR so that

How to repeat:
Look at docs and sources to find no traces of the max sizes for the mentioned command-line parameters and SSS attributes.

Suggested fix:
To define Max, could be one number for all 6 parameters and use that for controlling the length at parsing.
That guarantees the size of SSS' and P_S.SLAVE_STATUS attributes is within
[0, Max] valid range.