Issue Details (XML | Word | Printable)

Key: CORE-1465
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Claudio Valderrama C.
Reporter: Claudio Valderrama C.
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Firebird Core

isql ignores explicit constraint name when it's confused with an internal, automatic name.

Created: 15/Sep/07 11:29 PM   Updated: 29/Dec/07 05:48 AM
Component/s: ISQL
Affects Version/s: 1.0.3, 1.5.2, 1.5.3, 2.0.0, 1.5.4, 2.0.1, 2.1 Alpha 1, 2.1 Beta 1, 2.0.2
Fix Version/s: 2.1 Beta 2

Time Tracking:
Original Estimate: 1 hour
Original Estimate - 1 hour
Remaining Estimate: 1 hour
Remaining Estimate - 1 hour
Time Spent: Not Specified
Remaining Estimate - 1 hour

Environment: Independent of operating system.
Issue Links:
Relate
 


 Description  « Hide
The following commands in isql cause the following output:

create table test(a int constraint integral unique);
show table test;
A INTEGER Nullable
CONSTRAINT INTEGRAL:
  Unique key (A)

Now, doing
isql CONSTRAINT.FDB -x
we get:

CREATE TABLE TEST (A INTEGER,
UNIQUE (A));

Notice the name "INTEGRAL" should be included in the definition because it was a user-defined, explicit name. However, isql (since it does the wrong internal logic) confuses it with the INTEG_* implicit constraint names and ignores it. Therefore, reconstructing the db from the script causes the creation of a constraint with an internal name and the loss of the original name.

 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Claudio Valderrama C. added a comment - 16/Sep/07 04:57 AM
The correct output is:

/* Table: TEST, Owner: ATENEA\ADMINISTRATOR */
CREATE TABLE TEST (A INTEGER,
CONSTRAINT INTEGRAL UNIQUE (A));