1. Open an internal HSQL-DB-database-file. Could try it with every database, which is attached to a bug-description, for example this one: https://bugs.documentfoundation.org/attachment.cgi?id=56592 2. Go to Tools > SQL 3. Write the command SHUTDOWN COMPACT 4. Press "Enter" This Status is shown: 1: error in script file line: 3 File input/output errorerror java.io.IOException: S1000 invalid storage class: java.lang.NullPointerException opening file - file /home/user/Database/DateAdd.odb.data in statement [CREATE CACHED TABLE "Tabelle"] in statement [SHUTDOWN COMPACT] If execute the command again this Status is shown: 2: Access is denied: Session is closed So it seems the command has been executed, but a java-error appears, because LO tries to create a cached table. Has never done this before. Works till LO 5.4.4.2, fails first with LO 5.4.5.1 on OpenSUSE 42.3 64bit rpm Linux. Also reported in German forum for Windows ...
On pc Debian x86-64 with master sources updated today, I could reproduce this.
Regression introduced by: author Lionel Elie Mamane <lionel@mamane.lu> 2017-12-28 06:16:30 +0100 committer Julien Nabet <serval2412@yahoo.fr> 2017-12-28 09:36:46 +0100 commit 66d7540bcf3f82de906a588f01d1fbedc3d2928c (patch) tree 88041254578e03a3905e4196e5e9f89c9e574a7b parent aa1bfa6d18e73265f486ed1f9673ac8f0a4e6de5 (diff) dbaccess OStatementBase: correctly check database metadata the previous test didn't make any sense: * if xMeta.is(), then the test evaluated to false * if !xMeta.is(), then it called supportsMultipleResultSets (or supportsBatchUpdates, respectively) on a NULL pointer, which guaranteed a segfault / assert. Bisected with: bibisect-linux64-6.1 Adding Cc: to Lionel Elie Mamane
Thank you Xisco! I'll try to investigate from this.
I reverted the patch locally and gave a new try, I could still reproduce this.
Hi Julien, Ok, it seems at 66d7540bcf3f82de906a588f01d1fbedc3d2928c, there is no java error, but '1: Function sequence error.'. The java error started after author Lionel Elie Mamane <lionel@mamane.lu> 2017-12-27 10:17:24 +0100 committer Julien Nabet <serval2412@yahoo.fr> 2017-12-28 09:40:51 +0100 commit 3c567e55e6aed9e0da892d8b9fc09f8a0c784fcc (patch) tree 6dc0c6004665ded8c1f23f01df0a9231fc5512d3 parent 8375ab7b5024bad1bcf8bbb0c734ba1e5416445f (diff) tdf#114702 don't use XMultipleResultset unless DatabaseMetaData says we can @Julien, I hope it helps now
(In reply to Xisco Faulí from comment #5) > Ok, it seems at 66d7540bcf3f82de906a588f01d1fbedc3d2928c, there is no java > error, but '1: Function sequence error.'. The change in 66d7540bcf3f82de906a588f01d1fbedc3d2928c is to throw "function sequence error" when one of the following methods is called when it is not supported (by the underlying SDBC driver): - getResultSet - getUpdateCount - getMoreResults (also addBatch, clearBatch and executeBatch, but I guess the problematic one is one of the above) So it seems there is code somewhere that calls one of these functions unconditionally, without checking they are supported, and this patch just exposes that. > The java error started after > > author Lionel Elie Mamane <lionel@mamane.lu> 2017-12-27 10:17:24 +0100 > committer Julien Nabet <serval2412@yahoo.fr> 2017-12-28 09:40:51 +0100 > commit 3c567e55e6aed9e0da892d8b9fc09f8a0c784fcc (patch) > tree 6dc0c6004665ded8c1f23f01df0a9231fc5512d3 > parent 8375ab7b5024bad1bcf8bbb0c734ba1e5416445f (diff) > tdf#114702 don't use XMultipleResultset unless DatabaseMetaData says we can That patch fixes one of the places where getResultSet/getUpdateCount was called without proper checking beforehand. From reading the code, I cannot find a clear idea of the link with the HSQLDB error this bug report is about... It seems to suggest that HSQLDB reacts badly to: executeUpdate("SHUTDOWN COMPACT") but OK to execute("SHUTDOWN COMPACT") Anyway, HSQLDB claims not to support - getResultSet - getUpdateCount - getMoreResults but seems to implement them (cf class jdbcStatement in workdir/UnpackedTarball/hsqldb/src/org/hsqldb/jdbc/jdbcStatement.java I would try to just change in workdir/UnpackedTarball/hsqldb/src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java public boolean supportsMultipleResultSets() throws SQLException { return false; } to public boolean supportsMultipleResultSets() throws SQLException { return true; } Julien, you want to try that and report back?
Thank you for your new feedback Xisco, I'll take a look after my day time job.
(In reply to Lionel Elie Mamane from comment #6) > ... > Julien, you want to try that and report back? Ok, I'll just have to retrieve the LO wiki page explaining how to patch external module and be able to test this.
(In reply to Lionel Elie Mamane from comment #6) > ... > Julien, you want to try that and report back? I gave it a try and it indeed worked.
I still fail to understand how to generate a patch even with https://wiki.documentfoundation.org/Development/Patching_External_Libraries. Indeed, I don't have same paths, everything is different and the patch can't be applied.
I submitted a patch on gerrit to review here: https://gerrit.libreoffice.org/#/c/50202/
Julien Nabet committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=856159b3913976c68c8a04b7e939a6cc64477f6a tdf#115828: hsqldb supports multiple resultSets It will be available in 6.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
backport for 6.0 waiting for review here: https://gerrit.libreoffice.org/#/c/50267/
Julien Nabet committed a patch related to this issue. It has been pushed to "libreoffice-6-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=46980ee24a04f6bcc9ace4217f6b6c929adb0625&h=libreoffice-6-0 tdf#115828: hsqldb supports multiple resultSets It will be available in 6.0.2. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.