Missing length check for constraint names
Details
| Detail name | Value |
|---|---|
| Changelog Number | 9254 |
| Type | Bug |
| Status | Resolved |
| Affected Versions | Exasol 6.1.0, Exasol 6.2.0 |
| Fix Versions | Exasol 7.0.0, Exasol 6.2.4, Exasol 6.1.9 |
| Resolution Date | 2019-12-18 |
Problem
Constraint names are limited to 128 characters. However the length of a constraint name is not checked at creation time. If you created a constraint with a name longer than 128 characters, you cannot query the constraint system tables anymore (EXA_ALL_CONSTRAINTS, EXA_ALL_CONSTRAINT_COLUMNS). Nevertheless the constraint is checked as expected.
Example
CREATE TABLE t( x INT, y INT, CONSTRAINT "012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678" PRIMARY key(x) ); SELECT * FROM exa_all_constraints; --> internal server error
Workaround
Rename the constraint with the long name:
ALTER TABLE t RENAME CONSTRAINT "012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678" TO "short_name";