Connection to MariaDB via Connector C not working

I use MariaDB 11.03 and Libre Office Base 7.5.7.1 on Windows server 2012 essential. When I configure the ODBC connector, everything works as it should, only the data transfer is quite slow and it waits a long time to load the data from the database to the form.
I am therefore trying Connector C. I found that even after setting the character sets correctly and verifying all possible settings Base cannot process data from MariaDB via Connector C. Interestingly, when I enter data from the Base form into MariaDB through the ConnectorC connection, all data loads fine. However, it is not possible to download the data back from the database correctly for display in the form or tables. The tables will load, but with the wrong data. So the communication works fast, but only one way from Base to MariaDB the other way around does not. The UTF-8 character set, collation utf8mb3_general_ci, but I have tried others. Each time the same result. MariaDB communication with phpMyAdmin works both ways without any problem. The problem would be in the Base - Connector C communication only in the Connector C - Base direction.

Please open your database file. Go to Edit → Database → Properties. Make a screenshot of the dialog and show it in your original post.

No problem to connect to MariaDB with direct connection here. But it is a Linux system (OpenSUSE 15.4 64bit rpm Linux, with MariaDB 10.6.15 and LO 7.6.2.1)

Without any detailed description (or another screenshot) I don’t know, what is the different between the “right” and the “wrong” data.

Thanks you for ansvering.

It looks like the database can’t interpret the end and beginning of each column correctly, but only when reading from MariaDB. I saved all the data in the test table to MariaDB via Base form. In MariaDB they are as I entered them see image, but they do not load back correctly, despite being saved correctly in MariaDB.

Here are some screenshots:

Your screenshot reminds me of tdf#120129. It was indeed on a different engine, but it might well happen that there’s some bug needing a fix - e.g., specific to Windows, with not that many users trying your scenario.

Will have nothing to do with character set, because also INTEGER and DATE won’t be shown right there.

@PetrEU : What do you get if you run query SELECT * FROM "Test"."Klienti" by Tools → SQL, choosing Run SQL-command directly and Show output of select statement. Please set your database name for “Test” in the example file.

Exactly my opinion. I tried a lot of possibilities. Writing to database with all czech diacritic without problem. Fragments of text which is read back from MariaDB is also OK. At least partially. It looks like it would be completely all right if the Base could recognise where one collumn starts and where ends. The problem seems to be in the backward communication between Connector C and Libre office base at the level of recognizing the start and end of columns.

@PetrEU : You didn’t choose "Show output of “select” statements. So nothing could be seen in field “Output” …

Sorry,


I did not expected there will be something. Its there…

But table “Klienti” looks like this:
Table

Could you also try it with “Run SQL command directly” isn’t chosen? Content with chosen option seems to be right. So Base will get the right content, but GUI won’t show it.
Might be also interesting if a query, executed in directly, will show the right result.

No screenshots needed for this tests. But one for Edit → Database → Advanced Settings. Here are option checked in my database:
grafik

Advanced setting was the same from start as yours, I looked there few times before and try probably all combinations. No difference.

I tried if I could read data to the form from database through query. Strange enough query shows everything not like table, but in form its nearly the same error. Litte different…
See below.

@PetrEU : Could you write a bug for this? Post a link to this thread in the bug description. Screenshots will show the whole problem: Data could be read by Base through Tools → SQL, but not by the GUI (table, form …). It seems to be a special Windows Bug. Hope there will be somebody, who could reproduce this an also someone, who has a Windows system and could reproduce and fix this.

I woudl like. I dont know where. On what forum or how the bugs are reported for Libre Office?

Thank you for your help!

Here the link to bug reports for LibreOffice: Bugreports for LibreOffice (Document foundation). Choose LibreOffice and then Base. Write the number for the bug here. So everybody could see.

You could try to connect to MariaDB by JDBC. If you don’t know how: Write a private mail in ask.libreoffice to me.

Bug reported as Bug tdf#157826.
Thanks.

I already have functioning ODBC connection through another Base form. Its just slow so I tried to connect directly through Connector C.
What’s interesting I tried to read from this ODBC functioning connection SELECT * FROM “Test”.“Klienti” and it crashed every time. Tables and Forms are functioning. Like if there would be a switch. Only one part of communication is working with ODBC GUI and with Connector C SQL query. Strange sw :slight_smile: