Bug 45834 - PgSQL: if no SELECT privilege on table at startup, auto increment field zero in new data
Summary: PgSQL: if no SELECT privilege on table at startup, auto increment field zero ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Database-Tables
  Show dependency treegraph
 
Reported: 2012-02-09 05:31 UTC by Lionel Elie Mamane
Modified: 2022-12-14 13:54 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lionel Elie Mamane 2012-02-09 05:31:28 UTC
+++ This bug was initially created as a clone of Bug #45345 +++

Open a database connection to a PostgreSQL server through PostgreSQL-SDBC driver. (That is, open the .odb file and click on "Tables" to make the connection.) Answer password prompt if any.

Choose a table:

 - the user does not have "SELECT" privilege on
 - Primary key is a SERIAL column (autoincrement)

Then (with psql or another interface) grant the SELECT (and INSERT if not already there) privilege and then open the table in LibO. Insert data, not filling in the autoincrement column. That column appears as "0" until you refresh the data.

Close table. Take menu "view / refresh table", then the problem disappears.


So, for example ("=>" is the psql prompt):

1) psql -U user1
2) => CREATE TABLE foo (...)
3) start LibO
4) connect to database with libO as user2 (after opening corresponding odb
file, click on "Tables"; you see the list of tables)
5) => GRANT SELECT, INSERT ON foo TO user2
6) LibO: open table foo
7) LibO: insert data
8) Indeed, ID column shows 0
9) close table
10) view/refresh tables
11) open table foo
12) insert data
13) no problem


Also:

1) psql -U user1
2) => CREATE TABLE foo (...)
3) => GRANT SELECT, INSERT ON foo TO user2
4) start LibO
5) connect to database with libO as user2 (after opening corresponding odb
file, click on "Tables"; you see the list of tables)
6) LibO: open table foo
7) LibO: insert data
8) no problem



Because this bug happens only in *very* specific circumstances and is easily
worked around, I set it to low priority and minor severity.
Comment 1 Buovjaga 2014-11-06 12:05:19 UTC
This was set as NEW by the reporter. Because of the exotic reproduction environment requirement, I'm setting as NEEDINFO and taking the opportunity to ask, if the problem still exists in later versions?
Comment 2 Alex Thurgood 2015-01-03 17:38:16 UTC Comment hidden (no-value)
Comment 3 QA Administrators 2015-07-18 17:35:38 UTC Comment hidden (obsolete)
Comment 4 Alex Thurgood 2015-07-24 08:19:38 UTC
Confirming
Comment 5 QA Administrators 2016-09-20 10:18:11 UTC Comment hidden (obsolete)
Comment 6 QA Administrators 2020-10-14 04:30:26 UTC Comment hidden (obsolete)
Comment 7 QA Administrators 2022-10-15 03:40:12 UTC
Dear Lionel Elie Mamane,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug