MySQL Forums
Forum List  »  General

ENUM and SET column types member changes
Posted by: Ken Gillett
Date: June 20, 2019 04:54AM

This is not about how great or evil they are, just a specific question about their use.

I was under the impression that if you edit the list of ‘members’, existing data (i.e. the underlying numbers actually stored) would be unchanged and so might no longer then display the same text because the list of members is now different. But...

I was just looking into this with a SET column and adding new members, anywhere, kept existing data displaying exactly as before, but with the new members now available to be used. So..

The alteration of the member list caused MySQL to restructure the existing data to ensure that column still displayed the same text as before the change.

Was I simply wrong before, and MySQL has always done this or is it a new feature and can I assume ENUMs will receive the same treatment when changing the members list as for SET type columns?

I realise I could test it myself, but would appreciate this all being confirmed by those more experienced with MySQL than me.

Options: ReplyQuote

Written By
ENUM and SET column types member changes
June 20, 2019 04:54AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.