[Libreoffice-bugs] [Bug 108068] Can't change Primary Key's name with Firebird Embedded db.

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu May 25 10:58:42 UTC 2017


https://bugs.documentfoundation.org/show_bug.cgi?id=108068

Lionel Elie Mamane <lionel at mamane.lu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |lionel at mamane.lu
         Resolution|---                         |NOTOURBUG

--- Comment #2 from Lionel Elie Mamane <lionel at mamane.lu> ---
>From the Firebird 2.5 documentation:

 * It will not be possible to change the name of a column
   that is included in any constraint: PRIMARY KEY , UNIQUE
   key, FOREIGN KEY , column constraint or the CHECK constraint
   of the table.

 * Renaming a column will also be disallowed if the column
   is used in any trigger, stored procedure or view.


I agree this is unfortunate, but this needs to be enhanced / fixed in Firebird,
so is best tracked in the firebird bugtracker.

On the LibreOffice side, we could, to better work around this firebird
limitation, instead of trying to drop and recreate the column, try to drop the
primary key, change the name and create the primary key again. This would solve
this particular scenario, but there will always be other scenarios left.

Note the user can remove the primary key, then rename, then recreate the
primary key. Will work, but not good from a user-friendliness point of view.

(In reply to Julien Nabet from comment #1)
> I noticed this on console:
> warn:connectivity.firebird:12867:1:connectivity/source/drivers/firebird/
> Statement.cxx:122: isc_dsql_execute failed
> warn:connectivity.firebird:12867:1:connectivity/source/drivers/firebird/Util.
> cxx:52: firebird_sdbc error:
> *unsuccessful metadata update
> *ALTER TABLE Table1 failed
> *action cancelled by trigger (1) to preserve data integrity
> *Cannot update index segment used by an Integrity Constraint
> caused by
> 'ALTER TABLE "Table1" ALTER COLUMN "ID"  TO "ID2"'

We should show this error message to the user. Would give hir a hint how to
deal with the situation rather than the misleading "propose to drop/recreate
the column".

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20170525/37150968/attachment-0001.html>


More information about the Libreoffice-bugs mailing list