Bug #63734 Appending new value to SET datatype should not require a table rebuild.
Submitted: 13 Dec 2011 14:42 Modified: 13 Dec 2011 16:26
Reporter: Stephen Jackson Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:All OS:Any
Assigned to: CPU Architecture:Any
Tags: SET datatype

[13 Dec 2011 14:42] Stephen Jackson
Description:
When using SET types, appending a new value should not need a table rebuild if the additional value does not increase the SET size above the next byte boundary.

that is to say...

a set type with 1-7,8-15,16-23,24-31 or 32-63 elements should not require a table rebuild if we append one more element to the end as these do not change bit order, neither do they require a larger integer to store them.

How to repeat:
See above - easy
[13 Dec 2011 15:13] Valeriy Kravchuk
What exact server version, x.y, are you talking about. Our manual for 5.5, http://dev.mysql.com/doc/refman/5.5/en/alter-table.html, says:

"For some operations, an in-place ALTER TABLE is possible that does not require a temporary table: 

...

Changing the definition of an ENUM or SET column by adding new enumeration or set members to the end of the list of valid member values, as long as the storage side of the data type does not change. For example, adding a member to a SET column that has 8 members changes the required storage per value from 1 byte to 2 bytes; this will require a table copy. Adding members in the middle of the list causes renumbering of existing members, which requires a table copy."
[13 Dec 2011 16:26] Stephen Jackson
My mistake. Should have checked docs for 5.5 first.

Will just close this...