Bug 146584 - Firebird: Setting default with ALTER TABLE gives useless message but sets default
Summary: Firebird: Setting default with ALTER TABLE gives useless message but sets def...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.3.0.1 rc
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:24.2.0
Keywords:
Depends on:
Blocks: Database-Firebird-Default
  Show dependency treegraph
 
Reported: 2022-01-05 08:41 UTC by Robert Großkopf
Modified: 2023-09-19 13:41 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Two tables for testing - one has been changed column "Stamp"to default TIMESTAMP (4.12 KB, application/vnd.oasis.opendocument.database)
2022-01-05 08:41 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2022-01-05 08:41:35 UTC
Created attachment 177322 [details]
Two tables for testing - one has been changed column "Stamp"to default TIMESTAMP

Open the attached database.
There are two tables.
Table1 has been changed through Tolls → SQL with

ALTER TABLE "Table1" ALTER COLUMN "Stamp" SET DEFAULT CURRENT_TIMESTAMP;

This give the useless message:
1: /home/buildslave/source/libo-core/connectivity/source/drivers/firebird/StatementCommonBase.cxx:420

but it works.

Table2 is for testing this with a fresh table, but the message will be always the same. Nothing which says "Table has been changed" or "Default has been set" …

This Bug appears in LO 7.3.0.1 on OpenSUSE 15.3 64bit rpm Linux
Comment 1 Alex Thurgood 2022-01-20 19:25:11 UTC
Hi Robert,

All I see is "1:" displayed in the output window of the Tools > SQL window - is that what you mean ?

I can confirm that the statement is executed and new entries into the table get the current timestamp.
Comment 2 Alex Thurgood 2022-01-20 19:25:56 UTC
Tested with

Version: 7.3.0.1 / LibreOffice Community
Build ID: 840fe2f57ae5ad80d62bfa6e25550cb10ddabd1d
CPU threads: 8; OS: Mac OS X 12.1; UI render: Skia/Metal; VCL: osx
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Calc: threaded
Comment 3 Robert Großkopf 2022-01-20 20:19:46 UTC
(In reply to Alex Thurgood from comment #1)
> Hi Robert,
> 
> All I see is "1:" displayed in the output window of the Tools > SQL window -
> is that what you mean ?

No, not only 1:
Here is again the message it gives here in Tools → SQL

1: /home/buildslave/source/libo-core/connectivity/source/drivers/firebird/StatementCommonBase.cxx:420

… and this information is useless for a normal user, good for a developer to find the part of the code.
Comment 4 QA Administrators 2022-01-21 03:38:29 UTC Comment hidden (obsolete)
Comment 5 Alex Thurgood 2022-01-21 07:22:42 UTC
(In reply to Robert Großkopf from comment #3)

> 
> No, not only 1:
> Here is again the message it gives here in Tools → SQL
> 
> 1:
> /home/buildslave/source/libo-core/connectivity/source/drivers/firebird/
> StatementCommonBase.cxx:420

Ah, sorry, then not reproducible on macOS for me - specific to Suse ?
Comment 6 Buovjaga 2022-12-05 16:19:35 UTC
I ran

ALTER TABLE "Table1" ALTER COLUMN "Stamp" SET DEFAULT CURRENT_TIMESTAMP;

via Tools - SQL and I saw the same message and nothing was done to the table (or at least I have no idea how to check it).

Arch Linux 64-bit
Version: 7.4.3.2 / LibreOffice Community
Build ID: 40(Build:2)
CPU threads: 8; OS: Linux 6.0; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
7.4.3-1
Calc: threaded
Comment 7 Robert Großkopf 2022-12-05 20:41:17 UTC
(In reply to Buovjaga from comment #6)
> I ran
> 
> ALTER TABLE "Table1" ALTER COLUMN "Stamp" SET DEFAULT CURRENT_TIMESTAMP;
> 
> via Tools - SQL and I saw the same message and nothing was done to the table
> (or at least I have no idea how to check it).

Input a new row, don't fill "Stamp" with data. Save the row. Current timestamp will be written.

The SQL-code works, but the message is useless.
Comment 8 Julien Nabet 2023-07-22 10:46:17 UTC
I gave a try with https://gerrit.libreoffice.org/c/core/+/154755
Comment 9 Commit Notification 2023-07-22 13:55:23 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9b887f63147914793f881c0cf4a730a46d6f688c

tdf#146584: FB Setting default with ALTER TABLE works but gives useless message

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Julien Nabet 2023-09-19 13:41:35 UTC
Let's put this one to fixed.
Don't hesitate to reopen this tracker if I missed something.