[Libreoffice-bugs] [Bug 116982] FIREBIRD : Migration : import of table with autoincrement leads to integrity violation when attempting to add new record

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Apr 14 09:30:26 UTC 2018


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

--- Comment #4 from robert at familiegrosskopf.de ---
Have tested the following:
Opened a migrated Firebird database.
Tried to input a new row in a table with autoincrement.
Next value has to be 10.
When I want to go to next row it shows
*Problematic key value is ("id" = 0)
Click "OK"
then again
*Problematic key value is ("id" = 1)
Click "OK"
... and so on.
The generated key-value will switch every time I try to input the row again up
to the value which works.

Don't know if there is another way to set the start-value of autoincrement.
There isn't a function like 

ALTER TABLE "tablename" ALTER COLUMN "fieldname" RESTART WITH <new value>;

available, because the autoincement value is set by a generator. I don't know
where to get the name of the generator. The name isn't shown in the error-code.
Could be with the name this will work:

SET GENERATOR gen_t1_id TO <new value>;

-- 
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/20180414/e9dd4dc2/attachment.html>


More information about the Libreoffice-bugs mailing list