[Libreoffice-bugs] [Bug 115828] SQL: SHUTDOWN COMPACT fails in internal HSQLDB

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Feb 21 10:29:21 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=115828

--- Comment #6 from Lionel Elie Mamane <lionel at mamane.lu> ---
(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 at mamane.lu>	2017-12-27 10:17:24 +0100
> committer	Julien Nabet <serval2412 at 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?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180221/37b5be78/attachment-0001.html>


More information about the Libreoffice-bugs mailing list