MySQL Native Driver: Known Problems
This page lists the currently known problems with the MySQL Native Driver, aka MySQL Connector/OOo. A list of fixed problems is also available.
- 1 required for 1.0 release
- 2 Unclassified/TODO
- 3 Post-1.0
- 3.1 Renaming a view "makes" it a table
- 3.2 Removing records from views fails
- 3.3 No way to set MySQL specific table attributes
- 3.4 Base does not recognize schema changes
- 3.5 Table column comments not synced between MySQL and Base
- 3.6 Default values not properly processed
- 3.7 BIGINT values crippled
- 3.8 getProcedureColumns is a stub
- 3.9 getWarnings() (C/OOo)
- 4 Potential Issues
required for 1.0 release
On windows, the extension crashs on some systems
reported by FS on 2009-04-09
On some Windows systems, if you install and use the extension, it will crash OOo.
Reason: The extension ships an own version of
libmysql.dll. When Windows loads the driver library (
mysqlc.uno.dll), it also implicitly loads the
mysqlc.uno.dll is linked against. Unfortunately, Windows first searches in the folders specified by your
PATH environment variable. If it finds a
libmysql.dll in one of those folders, this one is used - no matter whether it is really compatible.
libmysql.dll, and link against this renamed version. Argh, not really.
- load libmysql.dll explicitly (using
LoadLibrary). In this case, we would have control over where the lib is taken from
- make libmysql a managed assembly, having a identifer, and a version, which changes with every incompatible API/ABI change (and differs between the debug and the release version). In this case, Windows would ignore all libmysql.dll versions found in the
PATHwhich do not proper version.
TODO (Andrey): fix
Currency Value DECIMAL columns
reported by Mechtilde
This note relate to 4.2. I can't input currency values. I get there 0.00.
(Chris): i can confirm similar behavior:
1. create a table with a decimal field with two decimal places (& pk)
2. open the table and insert some values (f.e. currency)
-> after leaving the row the input is changed to '0'
(the same with every text or decimal field) => no senseful inserting is possible
(Ulf): this is about DECIMAL not Currency. Works with DOUBLE.
Template for new entries
reported by NAME on 2009-mm-dd - needs review
Description goes here.
Copying tables may not work properly
reported by NAME on xx/01/2009 - needs review
Needs further and systematic testing!
CREATE TABLE `source` ( `id` int(11) NOT NULL, `col1` int(11) NOT NULL, `col2` char(1) default NULL, `col3` varchar(50) default NULL, PRIMARY KEY (`id`), KEY `idx_col1` (`col1`), KEY `idx_col2` (`col2`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1
CREATE TABLE `source2` ( `id` int(10) NOT NULL, `col1` int(10) default NULL, `col2` char(3) default NULL, `col3` varchar(150) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1
- Wrong column definitions (known issue)
- NOT NULL not properly handled
- Index information not copyied (same with JDBC, might be a Base issue)
TODO (Ulf): check what problems we actually have here, and how severe they are (compared with a connection vis ODBC/JDBC).
fieldtype is changed after saving BOOLEAN -> TINYINT conversion
reported by CLU on 12/01/2009
in table edit view: create a field from f.e. type bool & save → tinyint
Reason: maybe the same problem like 1.10 & 1.11
(Ulf) Duplicate and not an error in C/C++. There is no boolean type in MySQL. However, its handled in the JDBC driver case, the best we can do is emulate it in the same way.
(FS): Really, if there is no BOOL type, I tend to think the driver should not offer it. This way, users are not tempted to use it. Finally, this is a dedicated MySQL driver, it must not necessarily emulate features it does not really have.
(CLU): agree with FS .. every proposed type has to work, any unsupported type must not be shown
(Ulf): Not an error in C/C++. There is no boolean type in MySQL, see http://dev.mysql.com/doc/refman/5.1/en/numeric-type-overview.html . MySQL accepts the keywords BOOLEAN, TRUE and FALSE. That is all. MySQL converts BOOLEAN into TINYINT(1). TRUE and FALSE are aliases for 1 and 0, respectively:
mysql> create table bool_test(col boolean default true); Query OK, 0 rows affected (1.41 sec) mysql> show warnings; Empty set (0.03 sec) mysql> show errors; Empty set (0.00 sec) mysql> show create table bool_test; +-----------+--------------------------------------------------------------------------------------------------+ | Table | Create Table | +-----------+--------------------------------------------------------------------------------------------------+ | bool_test | CREATE TABLE `bool_test` ( `col` tinyint(1) DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=latin1 | +-----------+--------------------------------------------------------------------------------------------------+ 1 row in set (0.05 sec)
(Ulf): Connector/C++ returns what you get when you create a BOOLEAN column. You get a TINYINT(1) in your database. Connector/C++ returns what you see when you check the schema definition of a table with a TINYINT(1) column: type tinyint. Connector/J seems to define TINYINT(1) == BOOLEAN. That means, Connector/J cannot distinguish between a numeric column TINYINT(1) and a TINYINT(1) column that is intended to be a BOOLEAN. If a user creates a TINYINT(1) column with Connector/J, Connector/J will report BOOLEAN. There is no solution for handling the MySQL Server data type alias BOOLEAN (= converted implicitly into TINYINT(1)). The only thing you can do it is either to disallow the usage of BOOLEAN or TINYINT(1) in Base (= in Connector/OO.org) to solve the lack of clarity.
reported by Ulf on 2009-01-27 - needs review
Most likely Connector/C++ does not distinguish between "" and NULL parameter values for catalog and schema as requested by the JDBC specs. Do we need the differentiation?
TODO (Ulf): do we still/really have a problem here? Severity? (Ulf): I cannot answer this. I do not know where Base would use them.
Renaming a view "makes" it a table
reported by Ulf on 09/01/2009
Tested with the JDBC driver. Create a view and rename it in Base. Base changes the icon in the table list and shows the renamed object as a table :-)
clu: works also wrong with native mysql driver -> works fine with odbc driver
Removing records from views fails
reported by Ulf on 08/01/2009
Removing records from SQL views neither works with the JDBC driver nor with the native driver. Base sends a misformed query like: "DELETE FROM `test`.`v` W"
Reason: Removing records from views is in general not possible in Base. The fact that "Edit/Delete record" is enabled for a view (as in any table which the user does not have the DELETE privilege for) is a bug, which I fixed in the CWS.
No way to set MySQL specific table attributes
The Base table editor does not give access to table attributes. Not even basic ones such as the Engine (MyISAM: non-transactional, InnoDB: transactional).
Base does not recognize schema changes
After connecting to a database and opening a table once, Base will not recognize changes applied to the DB schema meanwhile when opening the table in the table editor again.
that's not nice, but consistent with other DB/Drivers. For this purpose, there's View/Refresh Tables ...
Table column comments not synced between MySQL and Base
Base table column comments are not synchronized with the MySQL DB and its schema. Existing comments are not displayed in Base, and entering comments in the table editor is not propagated to MySQL.
That's a known issue with all database types. The column description as displayed in Base is purely client-side, and stored within the .odb file only. There's also an issue for this, but I'm too lazy too search for it right now ...
Default values not properly processed
The Base table editor neither properly sets default values nor does it re-engineer default values properly.
Again, this is a known issue. The default value displayed in the UI is a so-called "control default", which is applied to controls used to enter data into the given field. The DB-side default for a column is a different property, API-wise, and currently not evaluated at all. Probably not even properly fetched by most existing drivers.
Changing this is possible, but probably requires UI changes. First, we would need to define how the control default and the DB default should interact in the UI. A possible scenario would be to drop the UI support for the control default, and always use the DB default (even in controls), as long as the driver supports providing/accepting DB defaults.
BIGINT values crippled
Large BIGINT values are displayed in Base using scientific notation: 1e+15. If one changes the display format to number #.### the first 14 values of a large number (9223372036854775807) are displayed properly but then some rounding takes place, for example: 9223372036854800000. Connector/C++ can handle long long (L64) values properly and Base does use getLong() nevertheless the displayed value seems wrong.
I bet that's because of the number formatter ... processing numbers for display is done using a office-wide number formatter component. Unfortunately, it works with double-precision values only, which imposes a precision loss for certain values. This applies to "too-large" values, as well as fractional values with "too many" digits. This is a general problem in Base, and not limited to the MySQL Native Driver.
A possible solution would be to 'not employ the number formatter for certain column types. (Effectively, this means not using a
FormattedField for the respective table column in the data view, but a NumericField, which internally works with long integer values of arbitrary (?) length.) This would solve the BIGINT issue, though not the too-many-digits issue for fractional values.
getProcedureColumns is a stub
reported by Ulf on 2009-01-27
reported by FS on 2009-01-29
C/OOo's getWarnings is implemented as dummy only. It should at least retrieve the warnings from the underlying C/C++ connection, and concert them to css.sdbc.SQLWarnings as appropriate.
This section serves as collection of issues which might become a problem to end users, though we did not yet (bother to) create scenarios where users are hit by those (potential) problems.
TIME value range
TIME data type may have a significantly larger value range than the Base counterpart.
TINYINT / BOOLEAN
Educate Base users on MySQL Server type mappings, for example BOOL[EAN] -> TINYINT.
Do we need any of those?
ERROR: SQL Exception ODatabaseMetaData::getCrossReference: feature not implemented. ERROR: SQL Exception ODatabaseMetaData::getProcedures: feature not implemented. ERROR: SQL Exception ODatabaseMetaData::getUDTs: feature not implemented. ERROR: SQL exception ODatabaseMetaData::supportsIntegrityEnhancementFacility: feature not implemented. ERROR: SQL Exception ODatabaseMetaData::supportsResultSetConcurrency: feature not implemented. ERROR: SQL Exception: OResultSet::getObject: feature not implemented. ERROR: SQL Exception ODatabaseMetaData::getExportedKeys: feature not implemented.
FS: supportsIntegrityEnhancementFacility is used to determine relationship support, but there's meanwhile an exception in the code which enables relationships for MySQL, regardless. (using this method is incorrect, speaking strictly, anyway.)
supportsResultSetConcurrency is not used by default, but its usage can be enabled by the user on a per-database basis. So, it might be better to implement it.
getObject is not used.
getExportedKeys seems to be used in the form wizard, to properly set up sub forms. Given that this currently doesn't work for MySQL/JDBC, either, this does qualify as severity 1.x.
The other ones are not used.