Bugzilla – Attachment 166937 Details for
Bug 137042
SQL Error -607, when changing Field type of a table (Firebird)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
step by step instructions for reproduction
BUG137042.sql (text/plain), 2.66 KB, created by
Richard Demattio
on 2020-11-02 13:59:12 UTC
(
hide
)
Description:
step by step instructions for reproduction
Filename:
MIME Type:
Creator:
Richard Demattio
Created:
2020-11-02 13:59:12 UTC
Size:
2.66 KB
patch
obsolete
>/* > > create in the following sequence: >*/ > >CREATE TABLE "tmv_Text" ( > "ID" INTEGER PRIMARY KEY, > "TextA" VARCHAR(20) NOT NULL UNIQUE >); > >CREATE TABLE "BUG137042" ( > "Text1" VARCHAR(20) NOT NULL, > "Number1" INTEGER NOT NULL, > "Number2" DECIMAL(6,2) DEFAULT 0, >-- "Unit" VARCHAR(5) DEFAULT '%' NOT NULL, -- <-- that is my plan > PRIMARY KEY ("Text1", "Number1") > USING INDEX "xmp_BUG137042", > FOREIGN KEY("Text1") > REFERENCES "tmv_Text"("TextA") > ON DELETE CASCADE > ON UPDATE CASCADE > /* , > -- that is the plan (clear: later you need the additional table "tlp_UnitValueType") > -- up to now I did not get the chance to define the foreign key > -- but this is another problem I am going to investigate > FOREIGN KEY ("Unit") > REFERENCES "tlp_UnitValueType"("ValueType") > ON DELETE CASCADE > ON UPDATE CASCADE >*/ >); >INSERT INTO "tmv_Text" VALUES (1,'TextA1'); >INSERT INTO "BUG137042" VALUES ('TextA1', 2012, 5); >/* >~~~~~~~~~~~~+ >then add the field "Unit" via "<right klick> / Edit" > - in the first step, you can not define "Entry Required" -> "YES" > because there is a NULL in the inserted record now > - so I let "Entry required be "NO" > - I saved the changed table > - I saved the database > - I added the value '%' manually into the record > - I saved the database > - now I entered design mode again by "<right klick> / Edit" > - and set "Entry required" to "YES" > - and klicked the save icon for the table >~~~~~~~~~~~~~~~~~~~~~~~ >I got the Warning: "The column "Unit" could not be changed. > Should the column be deleted and the new format appended? > >and on "More" I got the additional information: >Error code: 1 > >firebird_sdbc error: >*UPDATE operation is not allowed for system table RDB$RELATION_FIELDS >caused by >'UPDATE RDB$RELATION_FIELDS SET RDB$NULL_FLAG = 1 WHERE RDB$FIELD_NAME = 'Unit' AND RDB$RELATION_NAME = 'BUG137042'' > /tinderbox/buildslave/source/libo-70/connectivity/source/drivers/firebird/Util.cxx:68 >~~~~~~~~~~~~~ > I said "yes" to the warning message >~~~~~~~~~~~~~ >and now I got the error -607 >~~~~~~~~~~~~~~ >Error code: 1 > >firebird_sdbc error: >*unsuccessful metadata update >*ALTER TABLE BUG137042 failed >*SQL error code = -607 >*Invalid command >*Specified domain or source column SQL_VARYING does not exist >caused by >'ALTER TABLE "BUG137042" ADD "Unit" SQL_VARYING' > /tinderbox/buildslave/source/libo-70/connectivity/source/drivers/firebird/Util.cxx:68 > >~~~~~~~~~~~~~~~~~~~~~~~~~~ >now I can NOT save the changes and have to leave the window without saving >AND >the field "unit" does no longer exist > > >*/ > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 137042
: 166937 |
166953