Bug 126799 - MYSQL/MariaDB native connector: Unknown Column Type "Text" in GUI when opening a Table
Summary: MYSQL/MariaDB native connector: Unknown Column Type "Text" in GUI when openin...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.3.0.4 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 127044 (view as bug list)
Depends on:
Blocks: MariaDB
  Show dependency treegraph
 
Reported: 2019-08-09 18:23 UTC by Robert Großkopf
Modified: 2024-02-15 16:45 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2019-08-09 18:23:20 UTC
Connect to MariaDB with the native connector, which is included in LO 6.3.0.4.

Start this commands in Tools > SQL

CREATE TABLE strtest (d TEXT(10));
INSERT INTO strtest VALUES('Maria   ');

You could also write down 
SELECT * FROM strtest;
... and let you show the output - works.

Now try to open the table in the table-view of the GUI. Could be you have to refresh the tables by View > Refresh Tables.

An error appears:
"Unknown column type when fetching result"

The data-type TEXT isn't known by the GUI. So it isn't possible to see data or input data into such a column by the GUI, only by Tools > SQL.

All tested with LO 6.3.0.4, OpenSUSE 15 64bit rpm Linux, 10.2.22-MariaDB - openSUSE package
Comment 1 Julien Nabet 2019-08-10 15:36:42 UTC
On pc Debian x86-64 with master sources updated today, I don't reproduce this.
Field Type displays:
Text[VARCHAR]

With LO debian package 6.3.0.2, I could reproduce this.

Tamas: any idea which commit may have already fixed this on master sources so we could backport it in 6.3 branch?
Comment 2 Robert Großkopf 2019-08-10 18:15:09 UTC
(In reply to Julien Nabet from comment #1)
> On pc Debian x86-64 with master sources updated today, I don't reproduce
> this.
> Field Type displays:
> Text[VARCHAR]

This is the wrong Field Type. The Type is TEXT(10), not VARCHAR. The only possible type in the table-editor for this is Memo [TEXT]. You could choose this type (also all other TEXT-types with Memo) and the types won't be saved. The table editor switches Text(fix) [CHAR] instead. Here is something running totally wrong.
Comment 3 Xisco Faulí 2019-08-12 13:40:51 UTC
I believe this should be fixed in 6.3.1 now.
Comparing 6-3-0 < https://cgit.freedesktop.org/libreoffice/core/log/?h=libreoffice-6-3-0&qt=grep&q=mysql > and 6-3 towards 6-3-1 < https://cgit.freedesktop.org/libreoffice/core/log/?h=libreoffice-6-3&qt=grep&q=mysqlc > there are 4 comments not present in 6-3-0, which I believe fix this issue, no difference between 6-3 and master wrt mysqlc.
@Robert, could you please try with a recent build of libreOffice 6.3 ?
Comment 4 Robert Großkopf 2019-08-12 14:06:34 UTC
(In reply to Xisco Faulí from comment #3)

Seems it has been fixed for Version: 6.4.0.0.alpha0+
Build ID: 8387a6db641b29e6ff3c2f4cdc4688f538cbe35f
CPU threads: 6; OS: Linux 4.12; UI render: default; VCL: gtk3; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2019-08-09_06:28:42

The error doesn't appear, but the reported type will be Text [VARCHAR] instead of Memo [TEXT].

Should I close this bug as fixed and open a new one for this wrong behaviour?
Comment 5 Xisco Faulí 2019-08-12 14:08:02 UTC
(In reply to Robert Großkopf from comment #4)
> (In reply to Xisco Faulí from comment #3)
> 
> Seems it has been fixed for Version: 6.4.0.0.alpha0+
> Build ID: 8387a6db641b29e6ff3c2f4cdc4688f538cbe35f
> CPU threads: 6; OS: Linux 4.12; UI render: default; VCL: gtk3; 
> TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time:
> 2019-08-09_06:28:42
> 
> The error doesn't appear, but the reported type will be Text [VARCHAR]
> instead of Memo [TEXT].
> 
> Should I close this bug as fixed and open a new one for this wrong behaviour?

Yep, please report a new issue. Close this one as RESOLVED WORKSFORME
Comment 6 Robert Großkopf 2019-08-12 14:46:09 UTC
Works with version
Version: 6.4.0.0.alpha0+
Build ID: 8387a6db641b29e6ff3c2f4cdc4688f538cbe35f
CPU threads: 6; OS: Linux 4.12; UI render: default; VCL: gtk3; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2019-08-09_06:28:42
Comment 7 Alex Thurgood 2019-12-02 12:55:19 UTC
*** Bug 127044 has been marked as a duplicate of this bug. ***
Comment 8 Kyra Mcfadden 2020-09-16 06:36:49 UTC Comment hidden (spam)
Comment 9 David Fuller 2024-02-15 15:59:50 UTC
The date issue described in 127044 which is marked as a duplicate of this is not fixed in version 6.4.7.2 on Ubuntu Linux.
The field I am trying to access is year with NULL as default value.
From phpmyadmin:
# 	Name 	        Type 	Collation 	Attributes 	Null 	Default
20 	per_BirthYear 	year 			                Yes 	NULL

Adding this comment to the duplicate ticket also.
Comment 10 Robert Großkopf 2024-02-15 16:38:24 UTC
(In reply to David Fuller from comment #9)
> The date issue described in 127044 which is marked as a duplicate of this is
> not fixed in version 6.4.7.2 on Ubuntu Linux.
> The field I am trying to access is year with NULL as default value.
> From phpmyadmin:
> # 	Name 	        Type 	Collation 	Attributes 	Null 	Default
> 20 	per_BirthYear 	year 			                Yes 	NULL
> 
> Adding this comment to the duplicate ticket also.

Please have a look at the description of this bug. Has nothing to do with type "Year", only with type "Text".

Please have a look for other bugs with type "Year". Test this with a current version. At this moment only LO 7.6 and LO 24.2 will get updates. So LO 6.4.7.2 is too old for writing a bug and hoping there will be a fix.
Comment 11 Robert Großkopf 2024-02-15 16:45:48 UTC
*** Bug 127044 has been marked as a duplicate of this bug. ***