diff options
author | Tamas Bunth <tamas.bunth@collabora.co.uk> | 2018-10-31 15:03:14 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-11-05 11:19:52 +0100 |
commit | 19eee0b4a229213efef5a62fb77dfccc29ad3756 (patch) | |
tree | ccd02575336d4369e3327baf87d7e9fd4589469d /connectivity | |
parent | mysqlc: filter schema in getColumns (diff) | |
download | core-19eee0b4a229213efef5a62fb77dfccc29ad3756.tar.gz core-19eee0b4a229213efef5a62fb77dfccc29ad3756.zip |
mysqlc: Add support for mediumnint and char types
When reading column types from information schema, it can be mediumint
and char types as well. Mediumint should be 3 bytes long. We can use
sal_Int32 for that.
Change-Id: Id3507b1f38cabfb96800fc7743c911e36609a346
Reviewed-on: https://gerrit.libreoffice.org/62697
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/62878
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/mysqlc/mysqlc_general.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_general.cxx b/connectivity/source/drivers/mysqlc/mysqlc_general.cxx index 1e5a6026a5d0..18315ed69fc4 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_general.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_general.cxx @@ -204,7 +204,7 @@ sal_Int32 mysqlStrToOOOType(const rtl::OUString& sType) // TODO other types. if (sType.equalsIgnoreAsciiCase("tiny") || sType.equalsIgnoreAsciiCase("tinyint")) return css::sdbc::DataType::TINYINT; - if (sType.equalsIgnoreAsciiCase("smallint")) + if (sType.equalsIgnoreAsciiCase("smallint") || sType.equalsIgnoreAsciiCase("mediumint")) return css::sdbc::DataType::SMALLINT; if (sType.equalsIgnoreAsciiCase("longtext")) return css::sdbc::DataType::LONGVARCHAR; @@ -219,7 +219,7 @@ sal_Int32 mysqlStrToOOOType(const rtl::OUString& sType) return css::sdbc::DataType::BLOB; if (sType.equalsIgnoreAsciiCase("varbinary")) return css::sdbc::DataType::VARBINARY; - if (sType.equalsIgnoreAsciiCase("text")) + if (sType.equalsIgnoreAsciiCase("text") || sType.equalsIgnoreAsciiCase("char")) return css::sdbc::DataType::CHAR; if (sType.equalsIgnoreAsciiCase("binary")) return css::sdbc::DataType::BINARY; |