https://bugs.documentfoundation.org/show_bug.cgi?id=128950

--- Comment #22 from Julien Nabet <[email protected]> ---
(In reply to Alex Thurgood from comment #20)
> (In reply to Alex Thurgood from comment #18)
> > (In reply to Julien Nabet from comment #14)
> > > Lionel/Alex/Robert: just wondering, what's the purpose to have only 1 
> > > Mysql
> > > entry,  just to limit the number of entries?
> > 
> > I seem to recall that we did this originally, ie. a single long list of
> > connection possibilities. 
> > 
> 
> Indeed, the complete list of possibilities was present in LO4162 in the
> datasource dropdown menu (except for the various postgresql possibilities,
> as only one was given for that db, i.e. the native connector.)
> 
> Seems that this whole thing is a bit of a UI mess that was never unified in
> any meaningful way.

If we consider the 3 options of MySQL:
1) "MySQL ODBC": it goes to the same screen as choosing "ODBC" and there's no
specific ODBC driver for MySQL in connectivity/source/drivers
so could be removed
2) "Connect Directly" the only one which should remain and be renamed with the
name suggested by Robert, "MariaDB (MySQL)"
3) MySQL JDBC" which has indeed a specific driver in
connectivity/source/drivers/mysql_jdbc
Reading https://en.wikipedia.org/wiki/Java_Database_Connectivity, there are 4
types of JDBC drivers:
"
Type 1 that calls native code of the locally available ODBC driver. (Note: In
JDBC 4.2, JDBC-ODBC bridge has been removed[9])
Type 2 that calls database vendor native library on a client side. This code
then talks to database over the network.
Type 3, the pure-java driver that talks with the server-side middleware that
then talks to the database.
Type 4, the pure-java driver that uses database native protocol.
"
so I suppose MySQL JDBC corresponds to the second or the third driver.

Now, let's pause here.
Looking at git history of connectivity/source/drivers/mysql_jdbc/YUsers.cxx I
saw this:
Revert removal of mysql jdbc connector
And also make some minor fixes so it cooperates with the new mysqlc
library.
...
-rw-r--r--     
connectivity/registry/mysql_jdbc/org/openoffice/Office/DataAccess/Drivers.xcu  
249     
-rw-r--r--      connectivity/source/drivers/mysql_jdbc/YCatalog.cxx     133     
-rw-r--r--      connectivity/source/drivers/mysql_jdbc/YColumns.cxx     74      
-rw-r--r--      connectivity/source/drivers/mysql_jdbc/YDriver.cxx      435     
-rw-r--r--      connectivity/source/drivers/mysql_jdbc/YTable.cxx       336     
-rw-r--r--      connectivity/source/drivers/mysql_jdbc/YTables.cxx      216     
-rw-r--r--      connectivity/source/drivers/mysql_jdbc/YUser.cxx        324     
-rw-r--r--      connectivity/source/drivers/mysql_jdbc/YUsers.cxx       101     
-rw-r--r--      connectivity/source/drivers/mysql_jdbc/YViews.cxx       146     
-rw-r--r--      connectivity/source/drivers/mysql_jdbc/Yservices.cxx    66      
-rw-r--r--      connectivity/source/drivers/mysql_jdbc/mysql_jdbc.component    
26      
...

First I thought there were indeed mysql_jdbc and they have been removed by
error but I noticed this:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=26b40fcfc67480e75bd9959b0c5cb9db10fdf6a1
Moving mysqlc into connectivity as a library
Additionally I erased the remains of the old mysql C++ connector.

Also update the code where the clang plugins were unhappy after moving
the mysqlc module.

Remove mysql-cpp-connector external.
...
-rw-r--r--      connectivity/source/drivers/mysql/YCatalog.cxx  138     
-rw-r--r--      connectivity/source/drivers/mysql/YColumns.cxx  78      
-rw-r--r--      connectivity/source/drivers/mysql/YDriver.cxx   492     
-rw-r--r--      connectivity/source/drivers/mysql/YTable.cxx    356     
-rw-r--r--      connectivity/source/drivers/mysql/YTables.cxx   216     
-rw-r--r--      connectivity/source/drivers/mysql/YUser.cxx     320     
-rw-r--r--      connectivity/source/drivers/mysql/YUsers.cxx    105     
-rw-r--r--      connectivity/source/drivers/mysql/YViews.cxx    151     
-rw-r--r--      connectivity/source/drivers/mysql/Yservices.cxx 69      
-rw-r--r--      connectivity/source/drivers/mysql/mysql.component       26      
...
So the same files but instead of connectivity/source/drivers/mysql, there were
then in connectivity/source/drivers/mysql_jdbc

I thought it was the remnant of an ancient MySQL native connector then I
noticed
getJavaDriverClass in mysql_jdbc/YDriver.cxx

In brief, first I wanted to simplify all this by displaying the 3 MySQL entries
but it seems better to have a list not too long, then I thought we could remove
these 2 extra MySQL entries and JDBC one isn't possible. Is it really useful to
have this last one, I suppose it provides a bit more of features than the pure
JDBC driver. Also, I've just realized that removing this part would break all
the existing odb files which use this driver.
So back to the mess with the intermediary MySQL page, roadmachine, etc. :-(

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to