Kaydet (Commit) e33424dd authored tarafından Tamas Bunth's avatar Tamas Bunth Kaydeden (comit) Tamás Bunth

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: 's avatarTamás Bunth <btomi96@gmail.com>
üst ef15830d
...@@ -187,7 +187,7 @@ sal_Int32 mysqlStrToOOOType(const OUString& sType) ...@@ -187,7 +187,7 @@ sal_Int32 mysqlStrToOOOType(const OUString& sType)
// TODO other types. // TODO other types.
if (sType.equalsIgnoreAsciiCase("tiny") || sType.equalsIgnoreAsciiCase("tinyint")) if (sType.equalsIgnoreAsciiCase("tiny") || sType.equalsIgnoreAsciiCase("tinyint"))
return css::sdbc::DataType::TINYINT; return css::sdbc::DataType::TINYINT;
if (sType.equalsIgnoreAsciiCase("smallint")) if (sType.equalsIgnoreAsciiCase("smallint") || sType.equalsIgnoreAsciiCase("mediumint"))
return css::sdbc::DataType::SMALLINT; return css::sdbc::DataType::SMALLINT;
if (sType.equalsIgnoreAsciiCase("longtext")) if (sType.equalsIgnoreAsciiCase("longtext"))
return css::sdbc::DataType::LONGVARCHAR; return css::sdbc::DataType::LONGVARCHAR;
...@@ -202,7 +202,7 @@ sal_Int32 mysqlStrToOOOType(const OUString& sType) ...@@ -202,7 +202,7 @@ sal_Int32 mysqlStrToOOOType(const OUString& sType)
return css::sdbc::DataType::BLOB; return css::sdbc::DataType::BLOB;
if (sType.equalsIgnoreAsciiCase("varbinary")) if (sType.equalsIgnoreAsciiCase("varbinary"))
return css::sdbc::DataType::VARBINARY; return css::sdbc::DataType::VARBINARY;
if (sType.equalsIgnoreAsciiCase("text")) if (sType.equalsIgnoreAsciiCase("text") || sType.equalsIgnoreAsciiCase("char"))
return css::sdbc::DataType::CHAR; return css::sdbc::DataType::CHAR;
if (sType.equalsIgnoreAsciiCase("binary")) if (sType.equalsIgnoreAsciiCase("binary"))
return css::sdbc::DataType::BINARY; return css::sdbc::DataType::BINARY;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment