When using executeQuery macro instead of executeUpdate when the SQL string manipulates data, the error message is not explicit (limited to a dot). This error message should be "cannot issue data manipulation statements with executequery" as it is when using JDBC connector for example. The exact version of libreoffice is the LibreOffice 3.5.4.2 Version ID : 350m1(Build:2) on UBUNTU 12.04 generic.
1. Could you add a database with the macro-code you use? 2. Who has confirmed this bug. Status is "New" and nobody else but the reporter has written any comment. Nothing could be seen in the histry. I will change it to "Needinfo"
Created attachment 74623 [details] Macro fot testing executeQuery on a trivial database See comment #2
It is easy to reproduce the bug from scratch with a single mysql test database which has a test table with a test column. The attached macro can be executed with the native mySQL connector, the error message is : Erreur d’exécution BASIC. Une exception s'est produite : Type: com.sun.star.sdbc.SQLException Message:. With the same database connected with the JDBC connector, I have the following error message Erreur d’exécution BASIC. Une exception s'est produite : Type: com.sun.star.sdbc.SQLException Message:can not issue data manipulation statement with executeQuery() Yon can also note that the executeQuery statement works even if you manipulate data if you are using a native hsql libreoffice database.
In comment #2, read "see comment #3" instead "see comment #2"
Have tried it with the macro. Same problem with the dot. Seems to be no error-message available in the connector. Now we have to look, which connector we are using. Could you please write down the exact connector? I have tested with aoo-my-sdbc 1.1.0 - other connectors doesn't work with OpenSuSE and LO 3.5 or 3.6. Remember, that there is no connector at this moment working with LO 4.0. The oracle-mysql-connector shows all databases. But when I try to run the macro in LO 3.3.4 base crashed immediately. One hint to the macro: oStatement.executeQuery(strSQL) is used for queries, where you should get feedback from the database (See some content of the tables ...) oStatement.executeUpdate(strSQL) is used for actions, which doesn't give back any content. With executeUpdate the macro works.
I use the folowing ubuntu version of the connector : 1.0.1+LibO3.5.4-0ubuntu1.1 This connector is proposed in the Ubuntu distribution 12.04
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
Bug still exists with LO 5.1.0.2, OpenSUSE 42.1 Leap, 64bit rpm Linux.
** 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.2.5 or 5.3.0 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-20170306
On pc Debian x86-64 with master sources updated 2 days ago, I tried to reproduce this but got stuck at line: oDB = oDBContext.getbyName("db.table") ( I had the error message: BASIC runtime error. An exception occurred Type: com.sun.star.container.NoSuchElementException Message: db.table. what to put in arg for getbyName?
Forget my last message, I could reproduce this. I registered a Mysql database with "test" then it was ok.
I reproduced exactly what Robert indicated: executeQuery with delete sql -> error message with just . executeUpdate with delete sql -> no message and the table is empty
Here's part of the bt of the root cause: #0 0x00007fffc0031145 in sql::SQLString::SQLString(char const*) (this=0x7fffffff0aa0, other=0x55555892c0a7 "") at /home/julien/lo/libreoffice/workdir/UnpackedTarball/mysql-connector-cpp/cppconn/sqlstring.h:57 #1 0x00007fffc009b1ae in sql::mysql::NativeAPI::MySQL_NativeConnectionWrapper::error() (this=0x55555892bfc0) at /home/julien/lo/libreoffice/workdir/UnpackedTarball/mysql-connector-cpp/driver/nativeapi/mysql_native_connection_wrapper.cpp:149 #2 0x00007fffc0096986 in sql::mysql::util::throwSQLException(sql::mysql::NativeAPI::NativeConnectionWrapper&) (proxy=...) at /home/julien/lo/libreoffice/workdir/UnpackedTarball/mysql-connector-cpp/driver/mysql_util.cpp:51 #3 0x00007fffc0093e0f in sql::mysql::MySQL_Statement::get_resultset() (this=0x555558a189c0) at /home/julien/lo/libreoffice/workdir/UnpackedTarball/mysql-connector-cpp/driver/mysql_statement.cpp:113 #4 0x00007fffc009423a in sql::mysql::MySQL_Statement::executeQuery(sql::SQLString const&) (this=0x555558a189c0, sql=...) at /home/julien/lo/libreoffice/workdir/UnpackedTarball/mysql-connector-cpp/driver/mysql_statement.cpp:166 #5 0x00007fffc059afd5 in connectivity::mysqlc::OCommonStatement::executeQuery(rtl::OUString const&) (this=0x5555581b6810, sql="DELETE FROM test") at /home/julien/lo/libreoffice/mysqlc/source/mysqlc_statement.cxx:151 #6 0x00007fffca9d5572 in OStatement::executeQuery(rtl::OUString const&) (this=0x555558a21de0, _rSQL="DELETE FROM test") at /home/julien/lo/libreoffice/dbaccess/source/core/api/statement.cxx:453 Since Mysql connector doesn't indicate an error, I wonder if we shouldn't test the query in mysqlc_statement.cxx to check if it contains a "select type" only (or perhaps it'd be simpler to check it doesn't contain update or delete). I suppose since these keywords may be included in some table names, we should use a parser.(I don't know how to do it but hope there may be something simpler). May https://gerrit.libreoffice.org/#/c/55960/ change things here?
Dear t.bazin, 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 t.bazin, 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
Have tested it with LO 7.1.5.2 and MariaDB/direct connection integrated in LO. Gives now: BASIC runtime error. An exception occurred Type: com.sun.star.sdbc.SQLException Message: executeQuery called on SQL command that does not return a ResultSet /home/buildslave/source/libo-core/connectivity/source/drivers/mysqlc/mysqlc_general.cxx:119. So I will close this one as worksforme. Feel free to reopen if the buggy behavior still exists in a newer version.