Description: If in Drivers.xcu file the MetaData/AutoIncrementIsPrimaryKey node is set to true, then when you create a new table in Base if you set a column as autoincrement value, that column automatically becomes the primary key of the created table . Steps to Reproduce: 1. Install jdbcDriverOOo extension (https://prrvchr.github.io/jdbcDriverOOo/) 2. Install SQLiteOOo extension (https://prrvchr.github.io/SQLiteOOo/) 3. Create a new SQLite embedded database and open the database for editing (https://prrvchr.github.io/SQLiteOOo/#how-to-create-a-new-database) 4. Create new table with an INTEGER autoincrement Column and an TEXT column. 5. Save this new table. Actual Results: If you use a version 7.5 or higher of LibreOffice, when saving the new table you will be required to create a primary key Expected Results: With version 7.3.7.2 declaring the column as auto increment makes it a primary key automatically. Reproducible: Always User Profile Reset: No Additional Info: I could not test the 7.4.x version.
On pc Debian x86-64, I retrieved 7.3 branch so I could build 7.3.8 Then on a HSQLDB database, I created a table and put "AutoValue" to Yes, it asked about a primary key. Is there something else to do to make it auto increment and so it doesn't ask about primary key?
I may be wrong but I suppose the bug can be reproduced without installing any extension. I mean, it's a better to have a minimal step by step process to reproduce a bug.
I only tested with my JDBC extension (ie: jdbcDriverOOo, HsqlDriverOOo and SQLiteOOo) What is certain is that the driver must declare to Base that the autoincrements are the primary keys (with the AutoIncrementIsPrimaryKey parameter set to true in Drivers.xcu). Otherwise, you will have to create the primary key manually. I'm not sure that the drivers embedded in LibreOffice use the parameter: AutoIncrementIsPrimaryKey?
I checked that if I set the AutoIncrementIsPrimaryKey parameter to false then there is no more automatic creation of primary keys.
Weird, with LO 7.3.8, I opened an existing odb file containing a JDBC connection to Mariadb and gave a try but LO asked about a primary key whereas I put AutoValue to Yes. I thought the parameter might be in the odb file so I unzipped the odb file and did: fgrep -nR AutoIncrementIsPrimaryKey * it found nothing. Any way to reproduce this without installing the extensions?
Couldn't confirm any buggy behavior with internal Firebird and LO 7.5.5.1 on OpenSUSE 15.4 64bit rpm Linux. Then tested with SQlite connected through JDBC (sqlite-jdebc-3.40.0.0.jar) and it will also work well. When choosing "AutoValue" the field will be set to primary key. Note: In SQLite through JDBC there won't refreshed the value, so there will be shown '0' when inserting new record, but you could insert many new records well, all shown with primary key '0' if not refreshed. This will work the same (buggy) way in older LO-Versions like LO 7.3.6.2…
I can confirm on: Version: 7.5.5.2 (X86_64) / LibreOffice Community Build ID: 50(Build:2) CPU threads: 2; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: fr-FR (fr_FR.UTF-8); UI: en-US Ubuntu package version: 4:7.5.5~rc2-0ubuntu0.22.04.1~lo1 Calc: threaded and Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: ff8ec4cfe5df1e15c3e9f6adc843dfe31358e097 CPU threads: 2; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: fr-FR (fr_FR.UTF-8); UI: en-US Calc: threaded I have no problem with: Version: 7.3.7.2 / LibreOffice Community Build ID: 30(Build:2) CPU threads: 2; OS: Linux 5.15; UI render: default; VCL: qt5 (cairo+xcb) Locale: en-US (fr_FR.UTF-8); UI: en-US Ubuntu package version: 1:7.3.7-0ubuntu0.22.04.3 Calc: threaded
> Note: In SQLite through JDBC there won't refreshed the value, so there will be > shown '0' when inserting new record, but you could insert many new records > well, all shown with primary key '0' if not refreshed. This will work the same > (buggy) way in older LO-Versions like LO 7.3.6.2… I don't have this problem with SQLiteOOo (it doesn't support updatable ResultSet), but only with HsqlDriverOOo.
> I thought the parameter might be in the odb file so I unzipped the odb file No apparently there is nothing recorded in the odb file concerning this parameter: AutoIncrementIsPrimaryKey I only use it in the drivers.xcu file, I don't know more...
It's hard for me to test with my laptop because I don't want to break everything, so I can test the versions natively: Version: 7.3.7.2 / LibreOffice Community Build ID: 30(Build:2) CPU threads: 2; OS: Linux 5.15; UI render: default; VCL: qt5 (cairo+xcb) Locale: en-US (fr_FR.UTF-8); UI: en-US Ubuntu package version: 1:7.3.7-0ubuntu0.22.04.3 Calc: threaded and Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: ff8ec4cfe5df1e15c3e9f6adc843dfe31358e097 CPU threads: 2; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: fr-FR (fr_FR.UTF-8); UI: en-US Calc: threaded For all the other version, I go through VirtualBox 6.1.38 in order to preserve my configuration
If I install libreoffice-sdbc-hsqldb package (the native embedded HsqlDB 1.8) I can confirm on: Version: 7.5.5.2 (X86_64) / LibreOffice Community Build ID: 50(Build:2) CPU threads: 2; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: fr-FR (fr_FR.UTF-8); UI: en-US Ubuntu package version: 4:7.5.5~rc2-0ubuntu0.22.04.1~lo1 Calc: threaded I have no problem with: Version: 7.3.7.2 / LibreOffice Community Build ID: 30(Build:2) CPU threads: 2; OS: Linux 5.15; UI render: default; VCL: qt5 (cairo+xcb) Locale: en-US (fr_FR.UTF-8); UI: en-US Ubuntu package version: 1:7.3.7-0ubuntu0.22.04.3 Calc: threaded
No problem here with internal HSQLDB, too. LO 7.5.5.1 on OpenSUSE 15.4 64bit rpm Linux. Version: 7.5.5.1 (X86_64) / LibreOffice Community Build ID: 2c5e46c1980ec5241359fd65d751dc518205e7af CPU threads: 6; OS: Linux 5.14; UI render: default; VCL: kf5 (cairo+xcb) Locale: de-DE (de_DE.UTF-8); UI: de-DE Calc: threaded If you are testing different versions please install version packed by LO directly, not by your distribution.
Created attachment 188650 [details] bt On pc Debian x86-64 with master sources updated today, it works but only with gen rendering, it doesn't work with gtk3 or kf5 rendering. I thought the primary key was set when saving the table but in fact, when putting autovalue to "Yes" and click another field, it adds the primary key. I added a bt from isAutoIncrementPrimaryKey is called.
> If you are testing different versions please install version packed by LO > directly, not by your distribution. No Robert I wouldn't install anything more... Did you install my extension? I would like things to be very clear. We are not competitors, but we all work for the same free software called LibreOffice. Years ago I opened issue I alerted you to malfunctions with HsqlDB (see https://bugs.documentfoundation.org/show_bug.cgi?id=132195) You never followed up on this malfunction and you explained that you were turning to FireBird and that you wanted to abandon Java. Faced with this decision, which I respect, I had no choice but to develop a JDBC driver. Realizing that I couldn't do anything good in Python, I took the trouble to learn Java and wrote a new pure Java JDBC to UNO SDBC driver. It took me more than 2 years of development to manage to release version 1.0 with fully integrated Hsqldb and SQLite... So certainly there must be some bugs in my driver, then it's my first Java program (and even without that...), but I managed to fix everything that didn't work in the UNO JDBC driver of LibreOffice and I even took a few years ahead of him... So instead of explaining to me nicely that you are afraid to install this driver under the pretext of wasting time debugging it, you better install it, because there is no better tool to confirm bugs between different version of LibreOffice Base... If you continue on this path, what is the strategy for fixing the bug 156512 (https://bugs.documentfoundation.org/show_bug.cgi?id=156512) and bug 156511 (https://bugs.documentfoundation.org/show_bug.cgi?id=156511) I think it's high time we all work together and not against each other...
Caolán: I tried to debug and saw that with gen rendering, this part is called: SalInstanceComboBoxWithoutEdit::get_active_text() but if export SAL_NO_MOUSEGRABS=1 allows to not block UI with gen rendering, it doesn't work with gtk3 so I don't know what is called with gtk3 (I didn't try with kf5) Here are the steps to reproduce the bug: - create a brand new odb file (hsqlDB embedded) - click "Tables" pane at left - "Create Table in Design View..." - in Field Name, type "id", in "Field Type", choose "Integer" - In "Autovalue" (at bottom), select "Yes" - click on a blank row => a key must appear at left indicating that the field is a primary key. With gen rendering, it works, it doesn't work with kf5 or gtk3. (I attached bt from "isAutoIncrementPrimaryKey" with gen rendering).
I confirm that if I install the libreoffice-qt5 package then it changes my VCL version and it works... Work on: Version: 7.5.5.2 (X86_64) / LibreOffice Community Build ID: 50(Build:2) CPU threads: 2; OS: Linux 5.15; UI render: default; VCL: qt5 (cairo+xcb) Locale: fr-FR (fr_FR.UTF-8); UI: en-US Ubuntu package version: 4:7.5.5~rc2-0ubuntu0.22.04.1~lo1 Calc: threaded How to get the same result: VCL: qt5 (cairo+xcb) by compiling the gerrit version?
(In reply to Robert Großkopf from comment #6) > Then tested with SQlite connected through JDBC (sqlite-jdebc-3.40.0.0.jar) > and it will also work well. I don't know if it's the same jdbc sqlite driver, but if so, it's thanks to Gotson's goodwill that we are able to manage autoincrement columns in Base. See https://github.com/xerial/sqlite-jdbc/issues/786
This appears to be working for me in Version: 25.2.3.2 (AARCH64) / LibreOffice Community Build ID: bbb074479178df812d175f709636b368952c2ce3 CPU threads: 8; OS: macOS 15.4.1; UI render: Skia/Metal; VCL: osx Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR Calc: threaded when I create a new table in a SQLite database, and set the autoincrement dropdown menu to Yes, an autoincrement PK attribute is assigned to the INT datatype. I'm using the extension jdbcDriverOOo 1.4.6
I gave a try to my comment 15 and don't reproduce this anymore on pc Debian x86-64 with master sources updated today.. prrvchr: could you give it a new try with recent LO version (24.8.6 or brand new 25.2.3)?
Dear prrvchr, This bug has been in NEEDINFO status with no change for at least 6 months. Please provide the requested information as soon as possible and mark the bug as UNCONFIRMED. Due to regular bug tracker maintenance, if the bug is still in NEEDINFO status with no change in 30 days the QA team will close the bug as INSUFFICIENTDATA due to lack of needed information. For more information about our NEEDINFO policy please read the wiki located here: https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Status/NEEDINFO If you have already provided the requested information, please mark the bug as UNCONFIRMED so that the QA team knows that the bug is ready to be confirmed. Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-NeedInfo-Ping
Dear prrvchr, Please read this message in its entirety before proceeding. Your bug report is being closed as INSUFFICIENTDATA due to inactivity and a lack of information which is needed in order to accurately reproduce and confirm the problem. We encourage you to retest your bug against the latest release. If the issue is still present in the latest stable release, we need the following information (please ignore any that you've already provided): a) Provide details of your system including your operating system and the latest version of LibreOffice that you have confirmed the bug to be present b) Provide easy to reproduce steps – the simpler the better c) Provide any test case(s) which will help us confirm the problem d) Provide screenshots of the problem if you think it might help e) Read all comments and provide any requested information Once all of this is done, please set the bug back to UNCONFIRMED and we will attempt to reproduce the issue. Please do not: a) respond via email b) update the version field in the bug or any of the other details on the top section of our bug tracker Warm Regards, QA Team MassPing-NeedInfo-FollowUp