Bug #95143 | No support for CHECK constraints in Workbench | ||
---|---|---|---|
Submitted: | 26 Apr 2019 6:30 | Modified: | 14 May 2019 7:32 |
Reporter: | Georgi Sotirov | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Workbench | Severity: | S3 (Non-critical) |
Version: | 8.0.16 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[26 Apr 2019 6:30]
Georgi Sotirov
[26 Apr 2019 6:31]
Georgi Sotirov
No CHECK constraint item for tables in navigator
Attachment: wb_8016_navigator_no_check.png (image/png, text), 22.59 KiB.
[26 Apr 2019 6:31]
Georgi Sotirov
No way to create or modify CHECK constarints in table editor
Attachment: wb_8016_table_no_check.png (image/png, text), 86.89 KiB.
[26 Apr 2019 6:41]
MySQL Verification Team
Hello Georgi Sotirov, Thank you for the report and feedback. Verified as described with WB 8.0.16 on Win7(and connected to MySQL Server 8.0.16). Thanks, Umesh
[29 Apr 2019 11:51]
Georgi Sotirov
There is also an error in Query Tab (SQL editor) on a queries like: ALTER TABLE emp DROP CHECK emp_chks; /* on DROP keyword */ and like: ALTER TABLE emp DROP COLUMN created, DROP CHECK emp_chks; /* on CHECK keyword */ which in the first case is: "DROP" is not valid at this position for this server version, expecting : CHARSET, CHECKSUM, COMMENT, PARTITION, REMOVE, REPAIR, ... and in the second it is: "CHECK" is not valid at this position for this server version, expecting an identifier although both queries are syntactically correct and could be successfully executed (against server 8.0.16 of course).
[14 May 2019 7:32]
Georgi Sotirov
I just made an additional observation with the example from the documentation (see https://dev.mysql.com/doc/refman/8.0/en/create-table-check-constraints.html). The following query: 1: CREATE TABLE t1 2: ( 3: CHECK (c1 <> c2), 4: c1 INT CHECK (c1 > 10), 5: c2 INT CONSTRAINT c2_positive CHECK (c2 > 0), 6: c3 INT CHECK (c3 < 100), 7: CONSTRAINT c1_nonzero CHECK (c1 <> 0), 8: CHECK (c1 > c3) 9: ); is flagged with error on line 5 (i.d. that defines column constraint) stating: "CONSTRAINT" is not a valid at this position, expecting : ')' although the query is perfectly valid and accepted by the server. Please, fix as well.
[14 May 2019 7:39]
MySQL Verification Team
Thank you for your feedback. regards, Umesh
[14 May 2019 7:47]
Georgi Sotirov
MySQL Workbench SQL Editor shows error on column check constraint
Attachment: wb_column_chk_error.png (image/png, text), 8.77 KiB.