[Libreoffice-bugs] [Bug 103685] SQL... dialog Status: "Commands out of sync" when connecting to MySQL using direct (native) connector

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Sep 19 22:29:04 UTC 2017


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

--- Comment #5 from Julien Nabet <serval2412 at yahoo.fr> ---
Lionel:
I forced to update status by calling cppStatement->getResultSet()
patch:
diff --git a/mysqlc/source/mysqlc_statement.cxx
b/mysqlc/source/mysqlc_statement.cxx
index 3a082004831a..6e425c2a28cd 100644
--- a/mysqlc/source/mysqlc_statement.cxx
+++ b/mysqlc/source/mysqlc_statement.cxx
@@ -141,6 +141,7 @@ sal_Bool SAL_CALL OCommonStatement::execute(const
rtl::OUString& sql)
     bool success = false;
     try {
         success = cppStatement->execute(rtl::OUStringToOString(sSqlStatement,
m_pConnection->getConnectionSettings().encoding).getStr());
+        cppStatement->getResultSet();
     } catch (const sql::SQLException &e) {
         mysqlc_sdbc_driver::translateAndThrow(e, *this,
m_pConnection->getConnectionEncoding());
     }

I suppose it's a bit quick and dirty but at least, I don't reproduce the
problem with it.

I also tried tdf#112423 but no better.

Do you think I should push the patch?

-- 
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/20170919/d9ec48c8/attachment.html>


More information about the Libreoffice-bugs mailing list