Description: When editing a MySQL table (accessed with the direct MySQL connector) in Base, the mediumblob fields are shown as Text[VARCHAR] instead of Image[MEDIUMBLOB]. Steps to Reproduce: 1. Use the direct MySQL connector to access MySQL. 2. Use Base SQL tool to : CREATE TABLE `test-blobs` ( `ID` int NOT NULL AUTO_INCREMENT, `Name` varchar(50) DEFAULT NULL, `Photo1` longblob, `Photo2` mediumblob, `Photo3` blob, PRIMARY KEY (`ID`) ) 3. click on Tables, select the table just created, right click to "edit" Actual Results: all fields are shown as expected, except the mediumblob field (Photo2) which is shown as Text[VARCHAR]. Expected Results: all fields are shown as expected, including the mediumblob field (Photo2) which is shown as Image[MEDIUMBLOB]. Reproducible: Always User Profile Reset: No Additional Info: Note : This problem only happens if the connector to the external MySQL is direct. It does if happen if the connector is MySQL-jdbc.
Created attachment 176281 [details] screenshot with direct MySQL connector
Created attachment 176282 [details] screenshot with MySQL jdbc connector
I did some more research on this problem. It seems that some MySQL data types are not supported by the mysql native connector driver. Here is a list of some of these fields : MYSQL field type Actual BASE field type Expected BASE field type bit() Date [DATE] Binary(fix) [BIT] mediumblob Text [VARCHAR] Image [MEDIUMBLOB] mediumtext Text [VARCHAR] Memo [MEDIUMTEXT] tinyblob Text [VARCHAR] Image [TINYBLOB] tinytext Text [VARCHAR] Memo [TINYTEXT] year Text [VARCHAR] Date [YEAR] The problem with the bit type is reported as bug 145205.
On pc Debian x86-64 with master sources updated today, I could reproduce this.
I gave a try with: https://gerrit.libreoffice.org/c/core/+/125472 Jean-Paul: as indicated in the patch waiting for review: " I let aside YEAR (see https://mariadb.com/kb/en/year-data-type/) because it seems there's no LO Datatype which could correspond in https://opengrok.libreoffice.org/xref/core/offapi/com/sun/star/sdbc/DataType.idl?r=2b383d19 "
Julien Nabet committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/2d445f90dbecf8d2240474dcb06084868ceb921a tdf#145714: teach "mediumblob" to Mysql/MariaDB part in LO It will be available in 7.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Let's put this one to FIXED.