Description: I have a LO Base app using a split HSQLDB 2.3.2. It includes a table "checks" that has a boolean column "issued". When issued is "true" I want to prevent deletion of that row. So I created the following trigger to detect this condition and prevent deletion: CREATE TRIGGER "delete_check" BEFORE DELETE ON "checks" REFERENCING OLD AS oldrow FOR EACH ROW WHEN (oldrow."issued" = true) BEGIN ATOMIC SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Issued check cannot be deleted'; END; When I use the built-in grid view and try to delete a row with the issued flag set, the message box DOES pop up as expected. But running in a Base form and trying to delete the row using the form navigation control, the message box does not pop up. (In either case the row is not deleted, which is good because it means the trigger is working.) Deleting from the 'Toolbar' navigation bar does not generate the message and once tried it also negates the display of the message from the form navigation control. This does start working once the form is closed & opened again. Steps to Reproduce: 1.create HSQLDB before delete trigger as shown above 2.attempt to delete record that matches the trigger condition using form navigation control 3.expected message box does not appear Actual Results: no message box is displayed Expected Results: message box with error message should be displayed Reproducible: Always User Profile Reset: No Additional Info: See https://ask.libreoffice.org/en/question/175909/how-to-get-sql-trigger-to-display-sqlstate-message-text-in-a-base-form/
@Russell : you reported this against LO 4352 (cf. version field). Does the problem also occur in current production releases of LibreOffice ?
Created attachment 147559 [details] example database Confirmed using Ubuntu 18.04.1, LO6.3Alpha1 and embedded firebird database. The example file consists of an table CHECKS: CREATE TABLE CHECKS( ID BIGINT NOT NULL PRIMARY KEY, ISSUED BOOLEAN, AMOUNT DECIMAL(10,2)); A custom exception: CREATE EXCEPTION EX_CHECK_ISSUED 'May not delete record for check already issued'; and the delete trigger; CREATE TRIGGER DELETE_CHECK ACTIVE BEFORE DELETE ON "CHECKS" AS BEGIN IF (OLD."ISSUED" = TRUE) THEN EXCEPTION EX_CHECK_ISSUED; END; To reproduce you can open the attached file and attempt to delete a record with ISSUED set to TRUE form the table view, and the trigger will display an error dialog with our custom message. Open the form, with a grid control, and as reported the delete is blocked but the error message is not displayed.
Confirmed by Drew
Pretty certain that this has come up before, but can't find the bug report in question where a discussion was had on the matter.
(In reply to Alex Thurgood from comment #4) > Pretty certain that this has come up before, but can't find the bug report > in question where a discussion was had on the matter. Oddly, if you use the form, select a record and click the delete key the error message is displayed. But if you use the context menu 'delete' or the toolbutton then no message.
(In reply to Drew Jensen from comment #5) > (In reply to Alex Thurgood from comment #4) > > Pretty certain that this has come up before, but can't find the bug report > > in question where a discussion was had on the matter. > > Oddly, if you use the form, select a record and click the delete key the > error message is displayed. > > But if you use the context menu 'delete' or the toolbutton then no message. I got an errormessage here when try deleting by delete key or by context menu of the row: ------------- firebird_sdbc error: *exception 1 *EX_CHECK_ISSUED *May not delete record for check already issued *At trigger 'DELETE_CHECK' line: 6, col: 49 caused by 'isc_dsql_execute' ------------ But if I click one time on delete of the navigation-bar the error won't appear any more for any row of the form. Seems navigation-bar suppresses the message. Tested with LO 6.1.4.2 OpenSUSE 15 64bit rpm Linux.
On pc Debian x86-64 with master sources updated yesterday, I could reproduce this with Firebird file. I noticed this on console when trying to delete a record which shouldn't be: warn:connectivity.firebird:3787:3787:connectivity/source/drivers/firebird/PreparedStatement.cxx:286: isc_dsql_execute failed warn:connectivity.firebird:3787:3787:connectivity/source/drivers/firebird/Util.cxx:55: firebird_sdbc error: *exception 1 *EX_CHECK_ISSUED *May not delete record for check already issued *At trigger 'DELETE_CHECK' line: 6, col: 49 caused by 'isc_dsql_execute' Trying another time doesn't show this message again on console.
Created attachment 148434 [details] bt with debug symbols BT from console trace
Created attachment 148435 [details] bt from table In comparison, here's the bt from same location when trying to delete a record from the table directly (so with the error message).
Dear Russell Salerno, 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://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
Dear Russell Salerno, 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
Buggy behavior still there in LO 7.4.4.2 on OpenSUSE 15.3 64bit rpm Linux.