summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--connectivity/source/drivers/firebird/Util.cxx12
-rw-r--r--connectivity/source/drivers/firebird/Util.hxx8
2 files changed, 19 insertions, 1 deletions
diff --git a/connectivity/source/drivers/firebird/Util.cxx b/connectivity/source/drivers/firebird/Util.cxx
index 318aa6d839b0..114c4c811bd9 100644
--- a/connectivity/source/drivers/firebird/Util.cxx
+++ b/connectivity/source/drivers/firebird/Util.cxx
@@ -100,7 +100,17 @@ sal_Int32 firebird::getColumnTypeFromFBType(short aType, short aSubType)
case SQL_TIMESTAMP:
return DataType::TIMESTAMP;
case SQL_BLOB:
- return DataType::BLOB;
+ switch (static_cast<BlobSubtype>(aSubType))
+ {
+ case BlobSubtype::Blob:
+ return DataType::BLOB;
+ case BlobSubtype::Clob:
+ return DataType::CLOB;
+ default:
+ SAL_WARN("connectivity.firebird", "Unknown subtype for Blob type: " << aSubType);
+ assert(!"Unknown subtype for Blob type"); // Should never happen
+ return 0;
+ }
case SQL_ARRAY:
return DataType::ARRAY;
case SQL_TYPE_TIME:
diff --git a/connectivity/source/drivers/firebird/Util.hxx b/connectivity/source/drivers/firebird/Util.hxx
index fa9af07c0b27..e8077e65596a 100644
--- a/connectivity/source/drivers/firebird/Util.hxx
+++ b/connectivity/source/drivers/firebird/Util.hxx
@@ -25,6 +25,14 @@ namespace connectivity
namespace firebird
{
typedef ::std::vector< OString > OStringVector;
+ // Type Blob has 2 subtypes values
+ // 0 for BLOB, 1 for CLOB
+ // see http://www.firebirdfaq.org/faq48/
+ enum class BlobSubtype {
+ Blob = 0,
+ Clob = 1
+ };
+
/**
* Make sure an identifier is safe to use within the databse. Currently
* firebird seems to return identifiers with 93 character (instead of