Subject | Strange issue on 1.5 |
---|---|
Author | Adam |
Post date | 2009-02-20T00:45:56Z |
Hello Group,
I am encountering a strange issue when running a particular insert
statement on Firebird 1.5. It is still early days and I can not yet
present a reproducible test case, but I am hoping someone here has
some memory about the preconditions so I can work around it.
The same insert statement works fine in the same database when using
Firebird 2.1 (ie, using the ODS 10 database), so it is probably a
fixed issue.
The only unusual thing in the table is perhaps that one of the
nullable integer fields has a unique constraint. The table contains
several records with null in that field, and every non null value is
unique.
I have dropped all the triggers and foreign key constraints pointing
to this table to simplify it.
Here is the error:
---
Statement failed, SQLCODE = -413
conversion error from string " "
---
The first unusual thing is that it is not a string field?
It does not make a difference whether I name the field and use NULL in
the insert statement, whether I omit the field name from the insert
statement, or I use a value, I always get the same error.
If I drop the unique constraint, the insert is successful. If I
redeclare it, it fails.
To attempt to create a test case, I extracted the table structure and
data to SQL, renamed the tables and then ran it. Unfortunately it
works fine there :(. The nullable field (and unique constraint) was
added to the database after the rest of the data, but before this
insert. Even attempting to replicate this process though works fine.
Can anyone think of a bug that was fixed in 2.0 or 2.1 regarding the
handling of nullible fields with unique constraints when inserting
records?
Thanks in advance
Adam
I am encountering a strange issue when running a particular insert
statement on Firebird 1.5. It is still early days and I can not yet
present a reproducible test case, but I am hoping someone here has
some memory about the preconditions so I can work around it.
The same insert statement works fine in the same database when using
Firebird 2.1 (ie, using the ODS 10 database), so it is probably a
fixed issue.
The only unusual thing in the table is perhaps that one of the
nullable integer fields has a unique constraint. The table contains
several records with null in that field, and every non null value is
unique.
I have dropped all the triggers and foreign key constraints pointing
to this table to simplify it.
Here is the error:
---
Statement failed, SQLCODE = -413
conversion error from string " "
---
The first unusual thing is that it is not a string field?
It does not make a difference whether I name the field and use NULL in
the insert statement, whether I omit the field name from the insert
statement, or I use a value, I always get the same error.
If I drop the unique constraint, the insert is successful. If I
redeclare it, it fails.
To attempt to create a test case, I extracted the table structure and
data to SQL, renamed the tables and then ran it. Unfortunately it
works fine there :(. The nullable field (and unique constraint) was
added to the database after the rest of the data, but before this
insert. Even attempting to replicate this process though works fine.
Can anyone think of a bug that was fixed in 2.0 or 2.1 regarding the
handling of nullible fields with unique constraints when inserting
records?
Thanks in advance
Adam