Description: creating tables and inserting records are leading to errors "token unknown" and the operations are failing Steps to Reproduce: see the attached file Actual Results: creating a new table via Tools SQL works fine, when I klick "Execute" inserting ONE record into this table afterwards works also fine ~~~~~~~~~~~~~~ create table AND insert record in one transaction brings: *SQL error code = -104 *Token unknown - line 10, column 1 *INSERT "Error after "execute" also "COMMIT" is unknown in such a sequence ~~~~~~~~~~~~~~~~ inserting two records in one transaction also brings: *SQL error code = -104 *Token unknown - line 2, column 1 *INSERT ~~~~~~~~~~~~~~ inserting two or more records via an EXECUTE BLOCK ... works fine. See the attached testcases Expected Results: should work as one sequence! This way it would be possible and easy to create tables, load records and update by definitions in a textfile. Reproducible: Always User Profile Reset: No Additional Info: BUILD: https://gerrit.libreoffice.org/gitweb?p=core.git;a=log;h=17cbc559be6936777904e5cf8a517cac89045264
Created attachment 166471 [details] Testcases
the database was created by LO Version 7.0.1.2 with FIREBIRD embedded
nice to have: ============= the popup of "Tools/SQL" should be resizeable.
Could confirm this buggy behavior for the internal Firebird database on OpenSuse 15.1 64bit rpm Linux an LO 7.0.2.2. The code will work well with internal Hsqldb. So a special internal Firebird bug.
Here's a code pointer for those interested: #0 dbaui::DirectSQLDialog::implExecuteStatement(rtl::OUString const&) (this=0x9ed00d0, _rStatement="CREATE TABLE \"tla_Kontaktarten\" (\n\t \"Maske\" INTEGER PRIMARY KEY,\n\t \"Typ\"\t VARCHAR(30) NOT NULL UNIQUE\n);\nINSERT INTO \"tla_Kontaktarten\" VALUES (1,'Testadresse');") at dbaccess/source/ui/dlg/directsql.cxx:202 #1 0x00007f3d2faf844d in dbaui::DirectSQLDialog::executeCurrent() (this=0x9ed00d0) at dbaccess/source/ui/dlg/directsql.cxx:366 #2 0x00007f3d2faf8929 in dbaui::DirectSQLDialog::OnExecute(weld::Button&) (this=0x9ed00d0) at dbaccess/source/ui/dlg/directsql.cxx:418 first I thought about spliting the string on each ";" and call implExecuteStatement for each request but since a ";" may also appear in a string, I suppose we need a full SQL parser. Even if there's one in LO (I guess https://opengrok.libreoffice.org/search?project=core&full=OSQLParser&defs=&refs=&path=&hist=&type=&xrd=&nn=1&si=full&si=full&n=25 ?), I don't know at all how to use it.
Dear Richard Demattio, 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
about the Error on "create table AND insert record in one transaction" I guess, the table must exist first (committed) and inserting a record makes sense only afterwards. ~~~~~~~~~~~~~~~~~~~~~ inserting two or more records via "execute block" is an acceptable workaround to avoid error when "inserting two records". ~~~~~~~~~~~~~~~~~~~~~ so:it works for me
Version: 7.6.4.1 (X86_64) / LibreOffice Community Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1 CPU threads: 4; OS: Linux 6.5; UI render: default; VCL: gtk3 Locale: de-AT (en_US.UTF-8); UI: en-US Calc: threaded