Bug #93072 ENUM Datatype storing undefined value in column which is not in list
Submitted: 4 Nov 2018 10:39 Modified: 4 Nov 2018 16:52
Reporter: Md Arshad Ali Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Data Types Severity:S3 (Non-critical)
Version:5.7.20 OS:Linux (Centos)
Assigned to: CPU Architecture:Any

[4 Nov 2018 10:39] Md Arshad Ali
Description:
By defining ENUMs datatype with not NULL,we allow the end user to give correct input as in case the user provides an input which is not part of the ENUM defined data then the query won't execute and an error message will be displayed which says "Wrong Query". 

But the above case is not satisfying and query get execute without producing error and do not restrict the query and the column get updated as blank while it should not.

How to repeat:

For instance suppose we want to take the gender of the user as an input so we specify ENUM('male', 'female', 'other') and hence whenever the user tries to input any string any other than these three it results in an error.

Suggested fix:
Value should store which are available in list else produce error.
[4 Nov 2018 16:52] MySQL Verification Team
Thank you for the bug report. No repeatable test case was provide here, a test case should include create table statement, insert data, real result and expected result.