Check constraint display length limitation?

hthyme's profile image hthyme posted 3 years ago in General Permalink

Hello,

is there a 65-charcter limitation when displaying check constraints in HeidiSQL?

I checked with HeidiSQL 11.2.0.6213 and MariaDB 10.5.8 and the check constraint expression seems to get cut off when shown in different places inside HeidiSQL ('Prüfbedingungen' and 'CREATE code' for a table).

The contraint itself is working fine and an SQL "show create table XYZ" shows the proper, full length expression.

The problem is when you copy+paste the "CREATE code" and rely on it, but the check expression was cut after 65 characters ... this limitation could end up in syntactically wrong code (missing quote), which is good - so you see the problem. But if the expression is syntactically valid but incomplete, you might not recognize it when copying .. and the check statement is invalid.

Is this something known or you can reproduce?

ansgar's profile image ansgar posted 3 years ago Permalink

Yes, this is a known issue in MariaDB: https://jira.mariadb.org/browse/MDEV-24139

Updating to MariaDB 10.2.37, 10.3.28, 10.4.18 or 10.5.9 should help.

hthyme's profile image hthyme posted 3 years ago Permalink

Ah - perfect, thank you for the quick reply. I will check upgrading the DB to 10.5.9.

Please login to leave a reply, or register at first.