Download it now!
Bug 83656 - Mysql Connector Extension - fails to connect to database server with unsupported options error message
Summary: Mysql Connector Extension - fails to connect to database server with unsuppor...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Extensions (show other bugs)
Version:
(earliest affected)
4.4.0.0.alpha0+ Master
Hardware: x86-64 (AMD64) Mac OS X (All)
: high major
Assignee: Not Assigned
URL:
Whiteboard: target:4.4.0
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-09 09:30 UTC by Alex Thurgood
Modified: 2016-10-12 09:06 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
mysql connector extension for mac 64bit (1.53 MB, application/vnd.openofficeorg.extension)
2014-09-15 11:23 UTC, Alex Thurgood
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Thurgood 2014-09-09 09:30:16 UTC
Using my own recent master build of LO, enabled building of the mysql connector extension :

--enable-ext-mariadb-connector

I see the extension in the list of registered/bundled extensions : version 1.0.2

1) Open a previously functioning ODB that connects to a LAN mysql instance running on another machine within the LAN.

2) Click on Tables
3) Enter ID and password, click on 'OK'

An error message is displayed :
"Impossible to establish a connection with the data source "directremotemysqlosx64" (this is the name of the ODB file)

"Unsupported option provided to mysql_options()


4) I right mouse button click on the space where the tables tree listing should appear and choose :

Database > Properties

The new dialog UI appears
- the database name is correctly displayed
- the server IP is correctly identified

- the port field, however, displays 3 306, in other words, a space separated formatted representation of 3306 - surely this can't be right ?

- the user name is correctly identified
- the password checkbox is correctly ticked
- the character set is configured for "System"

5) Looking in the Advanced Properties shows that the following options are ticked :

- use keyword AS in front of aliased table names
- ignore driver privileges
- ignore currency formatting
Comment 1 Alex Thurgood 2014-09-09 09:32:57 UTC
Note that even if I correct the formatting of the port field by removing the space between 3 and 306, it is automatically re-inserted as soon as I switch to another field in the configuration dialog.
Comment 2 Julien Nabet 2014-09-09 09:57:01 UTC
About the port, I wonder if it could be a pb during UI conversion, see http://cgit.freedesktop.org/libreoffice/core/commit/?id=0059f083e511bb6c7113ad62a72abf3d7618f9e1
Comment 3 Alex Thurgood 2014-09-09 12:58:10 UTC
The only thing I can see in those changes is this :

diff --git a/dbaccess/source/ui/dlg/admincontrols.src b/dbaccess/source/ui/dlg/admincontrols.src
deleted file mode 100644
index b933d72..0000000

- NumericField NF_COMMON_PORT
- {
- Pos = MAP_APPFONT ( COLUMN_WIDTH_1, OPTION_GROUP_START + LINE_HEIGHT );
- Size = MAP_APPFONT ( 25, EDIT_HEIGHT );
- Border = TRUE;
- NoThousandSep = TRUE;
- Value = 3306;
- };


NF_COMMON_PORT was defined as not having a thousands separator. As this was removed, perhaps that caused the change in port number display behaviour, but surely that is only cosmetic, i.e. in the way the port number is displayed, and one would hope that it doesn't now get parsed with a thousand separator ? I'm not skilled enough in reading the code to know how that is supposed to work.
Comment 4 Alex Thurgood 2014-09-09 13:10:05 UTC
adding Caolan to CC : any input you could provide us here ?
Comment 5 Lionel Elie Mamane 2014-09-09 15:12:40 UTC
Not related to the port number issue, which is probably cosmetic, but a bug nonetheless.

It is an incompatibility with "new" MySQL Connector/C++ and MariaDB Client Library for C. I filed this as a bug with MariaDB Client Library for C. In the meantime, LibreOffice MySQL connector users need to use the MySQL client library, that is --with-system-mariadb .

On MacOS X, you'll most probably want to use
 --with-system-mariadb --enable-bundle-mariadb
*and* set MARIADBCONFIG (so that ./autoconf.sh finds the mysql_config executable), or put the path to mysql_config in the PATH.
Comment 6 Commit Notification 2014-09-09 15:34:29 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2e01b87378e78945791b09318135b36b16edf0aa

fdo#83656 mariadb C client library incompatible with newer MySQL Connector/C++



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 7 Alex Thurgood 2014-09-15 11:21:44 UTC
(In reply to comment #5)


> 
> On MacOS X, you'll most probably want to use
>  --with-system-mariadb --enable-bundle-mariadb
> *and* set MARIADBCONFIG (so that ./autoconf.sh finds the mysql_config
> executable), or put the path to mysql_config in the PATH.

Did that, and the extension doesn't get included in the app.

--enable-ext-mariadb-connector
--with-system-mariadb
--enable-bundle-mariadb

leads to an app where the extension is not pre-registered.

Instead, it can be found in /Volumes/HD1/Shared/Repos/LO/core/workdir/Extension

I enclose a copy here as attachment, but it is very small compared to older extensions, so I fear that something is missing.
Comment 8 Alex Thurgood 2014-09-15 11:23:02 UTC
Created attachment 106312 [details]
mysql connector extension for mac 64bit
Comment 9 Alex Thurgood 2014-09-15 11:26:26 UTC
Indeed, attempting to install via dragndrop of a running LOdev instance leads to error message :

Impossible d'ouvrir l'application LibreOfficeDev.app with a -600 error code
Comment 10 Alex Thurgood 2014-09-15 11:30:43 UTC
The extension will however install via the GUI extensions manager, but upon loading an appropriate ODB and entering password, the following is displayed :

SQL Status: 08001

Unable to load the libmysqlcppconn.dylib library.
Comment 11 Alex Thurgood 2014-09-15 11:31:33 UTC
So, the alternative still doesn't work.
Comment 12 Alex Thurgood 2014-09-15 11:34:05 UTC
For completeness sake, I use this before building LO :

export MARIADBCONFIG="/usr/local/mysql-5.6.20-osx10.8-x86_64/bin/mysql_config"