[Libreoffice-bugs] [Bug 45947] EDITING: Autoincrement in external HSQLDB could not be created in GUI - wrong SQL-Code

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Oct 26 00:22:12 UTC 2017


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

--- Comment #12 from excorbac at neuf.fr ---
Hello everybody

The bug still persists in the following configuration:
-Using an external HSQLDB for the Base
-LibreOffice 5.2.7.2 (ie. Build ID: 1:5.2.7-0ubuntu1~xenial1)
-Linux 4.10.0-37-generic (ie. Linux Mint 18.2 "Sonya")

Here are the steps I did :
Create a table in design view
Add a "text" field with field type Text [ VARCHAR ]
Add a "ID" field with field type Interger [ INTEGER ]
Set AutoValue for "ID" to yes, with the auto-increment statement GENERATED BY
DEFAULT AS IDENTITY and Length = 10

On saving, a dialog box shows up to give a name to the created table. Clicking
OK shows an error dialog box that reads:

Error while saving the table design. Unexpected token: GENERATED in statement
[CREATE TABLE "Table1" ("text" VARCHAR(100),"ID" INTEGER NOT NULL GENERATED]

and that's it. The only way to have this table saved is to remove the
auto-increment statement. However, on re-opening the table in Edit mode, "ID"
has its AutoValue set to "No" and locked (disabled control).

To make this table work, I had to run the SQL string that follows:

ALTER TABLE "Table1" ALTER COLUMN "ID" INT GENERATED BY DEFAULT AS IDENTITY

Still, re-opening the table in Edit mode shows "ID" field's AutoValue set and
locked to "No". The Base file has to be saved and re-open for the changes to
take effect (ie. "ID" field's AutoValue set and locked to "Yes"). Now Table1
functions as it should.

So, this bug is still around, at least for my configuration and the LO version
I use (and the one before: 5.2.5).

-- 
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/20171026/cb2ba898/attachment.html>


More information about the Libreoffice-bugs mailing list