[Libreoffice-bugs] [Bug 126852] MYSQL/MariaDB native connector: Column Type "TEXT" is reported as "VARCHAR"

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Nov 29 22:25:21 UTC 2019


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

Julien Nabet <serval2412 at yahoo.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |serval2412 at yahoo.fr

--- Comment #5 from Julien Nabet <serval2412 at yahoo.fr> ---
Robert: I took a look at
https://chartio.com/resources/tutorials/understanding-strorage-sizes-for-mysql-text-data-types/,
are you sure it should be "MEMO TEXT" and not "MEMO TINYTEXT" ?

Indeed, with this patch:
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_general.cxx
b/connectivity/source/drivers/mysqlc/mysqlc_general.cxx
index 4c7c8465c798..5345bb418908 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_general.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_general.cxx
@@ -189,7 +189,10 @@ sal_Int32 mysqlStrToOOOType(const OUString& sType)
         return css::sdbc::DataType::TINYINT;
     if (sType.equalsIgnoreAsciiCase("smallint") ||
sType.equalsIgnoreAsciiCase("mediumint"))
         return css::sdbc::DataType::SMALLINT;
-    if (sType.equalsIgnoreAsciiCase("longtext"))
+    if (sType.equalsIgnoreAsciiCase("longtext")
+         || sType.equalsIgnoreAsciiCase("tinytext")
+         || sType.equalsIgnoreAsciiCase("mediumtext")
+       )
         return css::sdbc::DataType::LONGVARCHAR;
     if (sType.equalsIgnoreAsciiCase("int"))
         return css::sdbc::DataType::INTEGER;


I retrieved "MEMO TINYTEXT" but I must recognize I'm not "fluent" about Mysql
types.

-- 
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/20191129/27eb5378/attachment-0001.html>


More information about the Libreoffice-bugs mailing list