Description: Using native mysql/mariadb connector within LO is not working on a 3rd linked field subform. Creating a new form with 2 tables (1 mainform + 1 subform) having linked fields is working but adding a third one (1 mainform + 2 subform) is not working. The third form (subform) is a compute field of a total paid rent. Steps to Reproduce: 1.create a new form with 1 subform and link 1 master field 2.create a new subform linked with a mainform master field doing a compute of payment 3. Actual Results: The compute field showing the total amount paid is showing nothing or showing the compute amount of the first record of the table and not changing based on the linked field. Expected Results: Showing computation of the total payments for a renter. Reproducible: Always User Profile Reset: Yes Additional Info: In LO 7.1.5.2 (Linux version) the problem is the same and to solve it I am using AOO 1.2.0 extension for MySQL/MariaDB connections.
Couldn't confirm the buggy behavior with OpenSUSE 15.2, LO 7.2.2.2 connected to a MariaDB. Created three tables. Second and third table are connected to the first table. Primary key of the first Table is part of both tbales. Created a form. Set table1 to mainform, table2 and table3 both to separate subforms. Could input data in mainform and both subforms. Data will be saved. One hint for your "solution" with AOO-connector. Tested this a while ago so could be the problem is solved, but times and timestamp will be interpreted differently in LO and AOO. If you are using timestamps and time fields be careful!
@Olivier : You shouldn't be using the AOO connector any more, as current 7.1 and 7.2 production releases have integrated the mariadb connector directly into the LO release. However, whether or not this requires a separate package install through your package manager is dependent on the Linux distribution. Please indicate which version of LO you are using (distrib provided default, PPA, Snap, Flatpak, or TDF download) and which Linux distribution/version. Unfortunately, some of the release channels that use PPA, Snap, etc, contain their own bugs, or bugs that have been fixed in the LO TDF release and not yet filtered down to the distrib provided or alternative channel releases of LO.
Ideally, we would also need a sample ODB file and a small mysql dump file against which to test, otherwise we are potentially just guessing which exact setup you have created.
@Alex : I can confirm that it works correctly if I create a new form and a new LO DB for test purpose with the Linux version 7.2.2.2 downloadedv from the LO website. I created a test1.odb file which I will send later which is working perfectly fine. I created a test2.odb file which is also a test but targetting my exisitng mariadb DB and it's not working. The SQL request is working fine but executed within the form it's not showing up the result in the currency field. So, I am trying to prepare a small mysql export as you requested and the forms to send you for testing it. I need time as I am actually very busy.
[Automated Action] NeedInfo-To-Unconfirmed
@Olivier : thanks for the feedback! Given Robert's comments using OpenSuse and LO7222 - no repro, and your own comment with regard to the version of LO7222 downloaded from the LO project website - also no repro, it sounds like the issue you are having might be with the distro provided version. Could you let us know: - which distro/version you are using? and - which package type/version of LO7152 is connecting to your mariadb instance?
Created attachment 175814 [details] Test 1.odb number 1 test working as it should
@Alex I am using OpenSuse Leap 15.3 and MariaDB 10.5.12 for Linux (x86_64). With LO 7.5.1.2 I am using the AOO extension 1.2 as it's the only way to have it working as it should. I added a Test 1.odb which is a test case showing that there is no bug and it's workin fine with a brand new DB and form. I added a Test 2.odb file which is also a brand new form but targetting the MySQL dump tables I attached too. You need to import the table in your own MySQL or MariaDB server and then use the form which show that the last filed showing the total amount is not showing up or moving when you are changing the record. Please don't hesitate if you need more inof it's just that I am very busy actually and then I will answer when I can.
Created attachment 175815 [details] Test 2.odb number 2 test not working
Created attachment 175816 [details] MySQL dump file with create schema
Hi, Any news about this problem ? Is it a bug or a specific problem to me ? Thanks. Olivier
Have taken the dump file and read it in MariaDB. Have also taken Test_2.odb and connected it with my local MariaDB. (Connection localhost, with username and password). Opened the form of Test_2.odb. Could see all content. Switched from one row to the next row. Also could see all content. Field from "SubFormTotal" will refresh when changed row of "MainForm". I couldn't see any buggy behavior here with OpenSUSE 15.2 and direct connection with MySQL-Connector of LO, which is part of LO 7.2.3.2
Hi Robert, Thanks for your answer and time. Then I must have a problem somewhere in my configuration in L.O or in MariaDB as for me test 1.odb is working fine but not test 2.odb. I tried on 3 different PC, all with OpenSuse 15.3 and none are working. The problem is the same on each PC/laptop. Then I will search on my side as it's in my config somewhere. Thanks all for your help anyway. Olivier.
Hi, For information I found my problem. In the past, using AOO SQL driver I was doing SQL queries like this: select * from table ... and it was working fine. Now using the LO native SQL driver I need to prefix the query with the schema select * from schema.table Even if I am connected to the right MySQL schema and accessing only tables from this schema in LO. So it's just a difference with the AOO Driver I was using before.
(In reply to olivier_musson from comment #15) > Hi, > > > Now using the LO native SQL driver I need to prefix the query with the schema > select * from schema.table It is not the schema, its the name of the database. Note: You could connect to different MariaDB-databases with the same *.odb-file, if you are permitted to used this databases. Queries could be created, which connect the databases. If i read it right we could close this one as "WORKSFORME". Feel free to reopen, if you don't think so.
Robert, Yes it's the database name, but it's also called schema in mysql-workbench this is why I mixed it. I am already connected to multiple databases but the one where I faced the problem wasn't a multi-db one. This is why I didn't prefixed some of the queries with the DB name it wasn't useful. Now it is, otherwise what happen to me will happen. Thank you for your help and you can close it.