Bug #98259 Bug with check like constraints
Submitted: 16 Jan 22:56 Modified: 18 Feb 13:28
Reporter: Gustavo Calle Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version:8.0.17 OS:Microsoft Windows (Microsoft Windows 10 Pro)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[16 Jan 22:56] Gustavo Calle
Description:
# Exist an error in commands with check like constraints:

CREATE TABLE carer(
 id_carrera CHAR(3) PRIMARY KEY,
check (id_carrer like '[A-Z]')
name_carer VARCHAR(30)
)Engine=INNODB;

#In this case the code compiles but the error comes when we try to insert #values with '[A-Z]' type (Same case with numbers '[0-9]'):

insert into carer values ('C', 'Systems');

How to repeat:

CREATE TABLE carer(
 id_carrera CHAR(3) PRIMARY KEY,
check (id_carrer like '[A-Z]')
name_carer VARCHAR(30)
)Engine=INNODB;

insert into carer values ('C', 'Systems');

Suggested fix:
Fix it
[17 Jan 13:15] MySQL Verification Team
Hi Mr. Calle,

Thank you for your bug report.

First of all, please follow the syntax exactly as described in our latest Reference Manual.

Also, I do not see where have you enforced the check ???

Next, after you still do not get expected results, send us the results that you have got.
[18 Feb 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".