[MDEV-24139] CHECK_CLAUSE field in INFORMATION_SCHEMA.CHECK_CONSTRAINTS truncate check constraints expressions Created: 2020-11-05 Updated: 2020-12-07 Resolved: 2020-12-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Information Schema |
| Affects Version/s: | None |
| Fix Version/s: | 10.2.37, 10.3.28, 10.4.18, 10.5.9 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Anastasiya Volkova | Assignee: | Anel Husakovic |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
MariaDB 10.3.1, DBeaver 7.2.4 |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
Hello. And it seems the number of characters in the CHECK_CLAUSE field is limited (64?). This creates some inconvenience when working with data for our users. We use SHOW CREATE TABLE to get tables DDL, but pulling the constraint expression out of there is difficult. Are there any other alternative solutions for this problem? |
| Comments |
| Comment by Anastasiya Volkova [ 2020-11-05 ] | ||
|
oh, i see the problem is known | ||
| Comment by Anel Husakovic [ 2020-11-05 ] | ||
|
Hi, | ||
| Comment by Daniel Black [ 2020-11-05 ] | ||
|
Table definitions are defined in terms of character length, so using NAME_CHAR_LEN makes sense, if it was a field/table name, which is isn't. So work out how big CHECK can be, does it actually have a character set? Maybe MYSQL_TYPE_BLOB is more approprate in the information_schema? | ||
| Comment by Anel Husakovic [ 2020-12-01 ] | ||
|
Example of MYSQL_TYPE_BLOB filed type has length PROCESS_LIST_INFO_WIDTH=65535, which is only used for IS.PROCESSLIST. | ||
| Comment by Daniel Black [ 2020-12-02 ] | ||
|
The maximum is probably MAX_FIELD_VARCHARLENGTH (65535-2-1) which seems to match GENERATION_EXPRESSION and COLUMN_DEFAULT in the information schema. | ||
| Comment by Anel Husakovic [ 2020-12-07 ] | ||
|
Pushed to 10.2 with f924a3bd6cd70c140f |