[Libreoffice-bugs] [Bug 120091] Some LO Base views with conversions or casting on datetime fields causing error message "the data content could not be loaded" with MySQL Connector/J 8 (not with with MySQL Connector/J 5)
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Sat Nov 10 15:04:01 UTC 2018
https://bugs.documentfoundation.org/show_bug.cgi?id=120091
jnplg at outlook.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Some fields causing error |Some LO Base views with
|message "the data content |conversions or casting on
|could not be loaded" with |datetime fields causing
|MySQL Connector/J 8.0.11 or |error message "the data
|8.0.12 in tables and views |content could not be
| |loaded" with MySQL
| |Connector/J 8 (not with
| |with MySQL Connector/J 5)
--- Comment #11 from jnplg at outlook.com ---
I did some additional research on this problem : it appears when trying to
access a view which contains a CAST as DATE (or TIME) function on a DATETIME
(or TIMESTAMP) column.
Here is a short sample :
1. create a table with a datetime column :
CREATE TABLE `dt` (`datetime1` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`datetime1`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_0900_ai_ci;
2. insert a value :
INSERT INTO `testcj8`.`dt` (`datetime1`) VALUES ('2018-11-11 11:11:11');
3. create a view on this table, with a "cast as date" function on the datetime
column :
CREATE VIEW `view-dt` AS select `dt`.`datetime1` AS `datetime1`,
cast(`dt`.`datetime1` as date) AS `date1`, cast(`dt`.`datetime1` as time) AS
`time1` from `dt`;
4. access this view : SELECT * FROM `view-dt`;
- If LO base is connected to MySQL with MySQL Connector/J 5, there is no
problem.
- If LO base is connected to MySQL with MySQL Connector/J 8, there is a
problem : msg "the data could not be loaded".
Please note that the select statement used to create the view can be
successfully executed with both connectors !!!
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20181110/3a749196/attachment-0001.html>
More information about the Libreoffice-bugs
mailing list