Bug #46584 Attribute (downwards) promotion for cluster
Submitted: 6 Aug 2009 13:26 Modified: 8 Mar 2010 12:37
Reporter: Oli Sennhauser Email Updates:
Status: Closed Impact on me:
Category:MySQL Cluster: Replication Severity:S4 (Feature request)
Version:mysql-5.1-telco-6.3 OS:Any
Assigned to: Martin Skold CPU Architecture:Any

[6 Aug 2009 13:26] Oli Sennhauser
Customer would like to have attribute promotion in cluster replication.
For example INT to TINYINT or BIT(x+n) to BIT(x).

How to repeat:
See support case.

Suggested fix:
Allow replication to force data types somehow.
[14 Oct 2009 7:52] Lars Thalmann
(The below is for row-based events only.  For statement-based events, it will work as before.)

I think type changes should be controlled by an option.

Perhaps having values:
- off - no convertion at all for RBR 
- simple - as it is now
- promotion - values can be promoted (to a type with more bits)
- demotion_with_error - values can be demoted (to type with less bits).  Will generate error if value is larger than fits in type

One could also consider this (I doubt it is useful, but perhaps someone wants it):
- demotion_with_default - values can be demoted (to type with less bits).  Will use default value if value is larger than fits in type
[23 Oct 2009 7:15] Lars Thalmann
See also BUG#47163
[8 Mar 2010 9:14] Martin Skold
This has now been implemented as part of
WL#5151 Conversion between different types when replicating
Pushed to to mysql-5.1-telco-6.3 and merged up to
mysql-5.1-telco-7.0 and mysql-5.1-telco-7.1
[8 Mar 2010 12:37] Jon Stephens
To be documented as part of documenting WL#5151.
[1 Apr 2010 14:16] Jon Stephens
Documented as part of documenting WL#5151.