Bug 143317 - Base crashes viewing / browsing mysql database table using direct mysql connector
Summary: Base crashes viewing / browsing mysql database table using direct mysql conne...
Status: NEEDINFO
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.4.7.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Database-Connectivity Crash
  Show dependency treegraph
 
Reported: 2021-07-12 14:47 UTC by AJ
Modified: 2023-12-03 10:04 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Test table use to recreate bug (12.88 KB, application/sql)
2021-07-12 14:47 UTC, AJ
Details
soffice --backtrace gdbtrace.log (14.80 KB, text/plain)
2022-03-14 19:48 UTC, AJ
Details

Note You need to log in before you can comment on or make changes to this bug.
Description AJ 2021-07-12 14:47:42 UTC
Created attachment 173510 [details]
Test table use to recreate bug

When using Base (via direct connector) to scroll through a mysql table, or clicking last row, or add new row, Base crashes and starts recovery dialog.

Ubuntu: 5.8.0-59-generic #66~20.04.1-Ubuntu

Libreoffice: Version: 6.4.7.2 Build ID: 1:6.4.7-0ubuntu0.20.04.1

Connector: libreoffice-mysql-connector/focal-updates,now 1:6.4.7-0ubuntu0.20.04.1 amd64 [installed]

mysql: Ver 8.0.25-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))

Using a small test table, scrolling seems is OK up around 150 rows scrolling further crashes.

My work around at the moment is to use jdbc conector
Comment 1 Julien Nabet 2021-07-12 18:36:38 UTC
Could you give a try to LO 7.1.4 from LO ppa (see https://launchpad.net/~libreoffice/+archive/ubuntu/ppa)?

Indeed 6.X branch is EOL and there won't be any new LO version on 7.0 branch after the released 7.0.6 version.
Comment 2 AJ 2021-07-13 10:21:44 UTC
I have upgraded using the PPA

LO is now
Version: 7.1.4.2 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 12; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-GB
Ubuntu package version: 1:7.1.4~rc2-0ubuntu0.20.04.1~lo1
Calc: threaded

libreoffice-mysql-connector/focal,now 1:7.1.4~rc2-0ubuntu0.20.04.1~lo1 amd64 [installed]

Problem still occurs. Second page forward browsing the test table results in Base crashing and recovery dialog starts.

It has also introduced authentication issues for my jdbc connection so I will will have to revert to previous version as this is not a testing system.
Comment 3 Alex Thurgood 2021-07-13 16:13:48 UTC
The test SQL dump has a collation "utf8mb4_0900_ai_ci" which unfortunately fails to get imported into my version 5 server.
Comment 4 Alex Thurgood 2021-07-13 16:26:38 UTC
Copied and pasted the SQL manually and removed the collation statement via the mysql CLI.

No crash for me when scrolling through result set in Table browse mode with

Version: 7.1.4.2 / LibreOffice Community
Build ID: a529a4fab45b75fefc5b6226684193eb000654f6
CPU threads: 8; OS: Mac OS X 10.16; UI render: default; VCL: osx
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Calc: threaded

I scrolled from the first record to the last record with no crash.

This sounds like a bug that is specific to the Ubuntu version, whether it is GTK3 or some other handling error causing a crash.
Comment 5 Robert Großkopf 2021-07-14 14:57:34 UTC
Couldn't confirm the buggy behavior.

Tested with the attached table, also with a table with 8000 rows and 12 columns and a table with 30000 rows and 15 columns. Scrolled though the table to the end and back to the start. Couldn't reproduce a crash with direct connection - here to MariaDB - and LO 7.2.0.1 VCL:kf5 on OpenSUSE 15.2 64bit rpm Linux.

Think it is a special bug of Ubuntu version of LO and direct connection. Please try the packages from LO directly. You could install these packages parallel as a user-defined installation. If you need help for this: Send me a private mail.
Comment 6 AJ 2021-07-14 17:34:08 UTC
The problem is occurring on a system I have just migrated from Ubuntu 18.04 with mysql 5 which connected fine, to Ubuntu 20.04 with mysql 8. Mysql 8 seems less supported in 20.04. odbc and jdbc drivers are no longer in Ubuntu repositories and needed to be obtained from mysql community. Have any of these attempts to reproduce issue been against a mysql 8 server?
Comment 7 Julien Nabet 2021-12-19 20:11:39 UTC
On pc Debian x86-64 with master sources updated today, I don't reproduce this.
However since I use MariaDB server, I couldn't create the table with utf8mb4_0900_ai_ci since I had an unknown collation error.
I used utf8mb4_general_ci instead.

Also have in mind that the native connector used by LO is in fact MariaDB not Mysql one. (mariadb-connector-c-3.1.8-src.tar.gz)
Comment 8 AJ 2022-03-14 19:48:46 UTC
Created attachment 178884 [details]
soffice --backtrace gdbtrace.log
Comment 9 AJ 2022-03-14 20:23:37 UTC
I have revisited this problem after upgrading LO to 7.1 from backports

Base still crashes when I scroll through the t_table1 table (second pgdn)

Current software releases:

Ubuntu 5.13.0-35-generic #40~20.04.1-Ubuntu 

LibreOffice 7.1.7.2 10(Build:2)
libreoffice/focal-backports,now 1:7.1.7-0ubuntu0.21.04.1~bpo20.04.1 amd64 [installed]
libreoffice-mysql-connector/focal-backports,now 1:7.1.7-0ubuntu0.21.04.1~bpo20.04.1 amd64 [installed]

mysql  Ver 8.0.28-0ubuntu0.20.04.3 for Linux on x86_64 ((Ubuntu))
mysql-client/focal-updates,focal-updates,focal-security,focal-security 8.0.28-0ubuntu0.20.04.3 all

Have reproduced the problem while running with --backtrace option see attached gdbtrace.log
Comment 10 Robert Großkopf 2022-03-15 07:13:41 UTC
If you are using the special Ubuntu packages for LO and the special connection to a MySQL 8.0-connection please report this bug to Ubuntu.

See https://wiki.documentfoundation.org/ReleaseNotes/6.2#Base
MySQL C++ connector has been removed and MariaDB C connector is used since LO 6.2 (LGPL).

You database is working without problems with LO directly installed from the packages of LO and MariaDB.

If the direct connector for MariaDB doesn't work well with your MySQL database please use JDBC or ODBC for the connection. 
You could get the JDBC connector from here:
https://dev.mysql.com/downloads/connector/j/
You will only need mysql-connector-java-8.0.27.jar for the connection.
The driver should be added in the class path for java (directly in LO).
Connection to the driver will be set by com.mysql.cj.jdbc.Driver
Comment 11 AJ 2022-03-16 12:03:11 UTC
I am not using any special packages or extensions.

I am not using MariaDB, this is a mysql installation.

My understanding is that direct connection just requires installation of libreoffice-mysql-connector package.

I had problems with dependencies trying to install the ODBC Connector deb package from MySQL communities. I did not pursue.

The JDBC connector from communities is a functioning workaround, but not that easy to configure.
mysql-connector-java/now 8.0.28-1ubuntu20.04 all [installed,local]
Comment 12 Robert Großkopf 2022-03-16 14:02:12 UTC
(In reply to AJ from comment #11)
> 
> My understanding is that direct connection just requires installation of
> libreoffice-mysql-connector package.

I have looked through all packages, which are part of LO. There is no package like "libreoffice-mysql-connector" part of the *.deb or *.rpm packages. The connection is included in the package for base.

Could it be you installed an old connector, which worked in versions before LO 6.2? Since LO 6.2 the connector is included and couldn't be separately installed with packages from LO. 

When reading about your installation you are using special packages from Ubuntu, not from LO. Please download the packages from 
https://www.libreoffice.org/download/download/
and test this packages. You will get an installation like this:
Version: 7.3.1.3 / LibreOffice Community
Build ID: a69ca51ded25f3eefd52d7bf9a5fad8c90b87951
CPU threads: 6; OS: Linux 5.3; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded

Have a look at the Build ID. This is an ID from LO. The Ubuntu packages are packed and combined by Ubuntu, not by LO.
Comment 13 AJ 2022-03-16 15:15:06 UTC
Sorry didn't mean to mislead about special.
All my installs have been from Ubuntu repositories.

I tried removing the libreoffice-mysql-connector package.

Base seems to connect directly successfully without it.

Still get the crash though.

This problem does not seem to be affecting any one else, I think I will park it here for he moment as I have a workaround. 

I will probably be upgrading ubuntu when 22.04 releases with LO 7.2 I think and will test again.
Comment 14 Robert Großkopf 2023-05-09 14:21:01 UTC
(In reply to AJ from comment #13)

You couldn't get it working, because the direct connection from LO is a connection to MariaDB. So newer versions of MySQL might be not supported with direct connection.

Again: JDBC connection will work. Have a look at Base Guide
https://books.libreoffice.org/en/BG73/BG7302-CreatingADatabase.html#toc9
Comment 15 Julien Nabet 2023-12-03 10:04:44 UTC
Could you try this:
- please uninstall any LO version you got
- upgrade to Ubuntu 23.10 (or 22.04 if you want to stick to LTS)
- install LO version from https://launchpad.net/~libreoffice/+archive/ubuntu/ppa to have recent LO version
- rename your LO directory profile (see https://wiki.documentfoundation.org/QA/FirstSteps#Corrupted_user_profile)