The sdbc file driver was fixed in: commit d87c2c59c9c1d5f5825f355c9eb941fdf95b42f6 Author: Lionel Elie Mamane <lionel@mamane.lu> Date: Fri Dec 13 13:10:49 2013 +0100 sdbc file driver (Prepared)Statement: created ResultSet owned by *caller* Need to do the same with *all* drivers. For implementers of getMoreResults, we should probably keep references to all resultsets, and free the reference (not dispose the object!) when getMoreResults is called.
The difficulty is (from XStatement documentation): All statement execute methods implicitly close a statement's current ResultSet if an open one exists. To do that, we need to keep (at least a *weak*) reference. Which is what many drivers actually do... Also (from service ResultSet documentation): A ResultSet is automatically closed (disposed) by the Statement that generated it when that Statement is closed, re-executed, or used to retrieve the next result from a sequence of multiple results. So actually, contrary to the assumption in commit d87c2c59c9c1d5f5825f355c9eb941fdf95b42f6, the resulset is not allowed to survive the statement that generated it. That commit needs to be partially reverted, but partially only: it still needs to "abandon" close ownership of the generated resultset and generate a *fresh* one each time it is asked for one by execute() (but not necessarily in the case of repeated calls to getResultSet()).
Just for information, trying to understand a crash concerning closing LO after having opened queries (Firebird DB) on MacOs with master sources + debug, I noticed that resultset didn't use WeakRef but just a ref (see http://opengrok.libreoffice.org/xref/core/connectivity/source/drivers/firebird/StatementCommonBase.hxx#58) I tried to use WeakRef but got errors I didn't know how to deal with, trying to change all the dependencies. Also it seems too that multiple resultsets isn't implemented on Firebird LO driver (see opengrok.libreoffice.org/xref/core/connectivity/source/drivers/firebird/PreparedStatement.cxx#295)
Lionel Elie Mamane committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=2504ffccd02f42211dcbc92a5aa6addb04a4b717 fdo#80084 file driver PreparedStatement: close previous ResultSet on reexec 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.
Lionel Elie Mamane committed a patch related to this issue. It has been pushed to "libreoffice-4-3": http://cgit.freedesktop.org/libreoffice/core/commit/?id=f6b9cc2c5b2133b5a44f54ed307bbe9e1e02e5fc&h=libreoffice-4-3 fdo#80084 file driver PreparedStatement: close previous ResultSet on reexec It will be available in LibreOffice 4.3. 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.
Adding self to CC if not already on
** Please read this message in its entirety before responding ** 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 on a currently supported version of LibreOffice (5.0.4 or later) https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System 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) http://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: http://webchat.freenode.net/?channels=libreoffice-qa Thank you for your help! -- The LibreOffice QA Team This NEW Message was generated on: 2016-01-17
To be more precise. When I create a statement before each executeQuery, it works. Otherwise it does not. Works: oDBSource = ThisComponent.DataSource oConn = oDBSource.getConnection( "" , "" ) oStatement = oConn.createStatement() sql = "CREATE TABLE " & DBQuoteName("testtable", oConn) & " (id int not null primary key, txt varchar(50))" oResult = oStatement.executeQuery(sql) oStatement = oConn.createStatement() sql = "INSERT INTO " & DBQuoteName("testtable", oConn) & " values (1, 'test')" oStatement.executeQuery(sql) ... Does not work: oDBSource = ThisComponent.DataSource oConn = oDBSource.getConnection( "" , "" ) oStatement = oConn.createStatement() sql = "CREATE TABLE " & DBQuoteName("testtable", oConn) & " (id int not null primary key, txt varchar(50))" oResult = oStatement.executeQuery(sql) 'oStatement = oConn.createStatement() sql = "INSERT INTO " & DBQuoteName("testtable", oConn) & " values (1, 'test')" oStatement.executeQuery(sql) ...
Please delete or at least ignore my previous comment. This was meant for #101399
Hello, Is this bug fixed? If so, could you please close it as RESOLVED FIXED?
** Please read this message in its entirety before responding ** 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 on a currently supported version of LibreOffice (5.4.1 or 5.3.6 https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System 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) http://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: http://webchat.freenode.net/?channels=libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug-20170929
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 http://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 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