PKGBUILDs/community/mysql-workbench/0002-mysql-connector-c++-json.patch
2016-01-20 14:39:07 +00:00

41 lines
1 KiB
Diff

diff --git a/cppconn/datatype.h b/cppconn/datatype.h
index 7ada3bc..50c71cf 100644
--- a/cppconn/datatype.h
+++ b/cppconn/datatype.h
@@ -59,7 +59,8 @@ public:
GEOMETRY,
ENUM,
SET,
- SQLNULL
+ SQLNULL,
+ JSON
};
};
diff --git a/driver/mysql_metadata.cpp b/driver/mysql_metadata.cpp
index 8d3ef8b..2faf454 100644
--- a/driver/mysql_metadata.cpp
+++ b/driver/mysql_metadata.cpp
@@ -4736,6 +4736,9 @@ MySQL_ConnectionMetaData::supportsConvert(int fromType, int toType)
}
}
+ case sql::DataType::JSON:
+ return false;
+
// MySQL doesn't support a NULL type
case sql::DataType::SQLNULL:
return false;
diff --git a/driver/mysql_util.cpp b/driver/mysql_util.cpp
index af5a7f4..3283eca 100644
--- a/driver/mysql_util.cpp
+++ b/driver/mysql_util.cpp
@@ -431,6 +431,8 @@ mysql_type_to_datatype(const MYSQL_FIELD * const field)
return sql::DataType::SET;
case MYSQL_TYPE_GEOMETRY:
return sql::DataType::GEOMETRY;
+ case MYSQL_TYPE_JSON:
+ return sql::DataType::JSON;
default:
return sql::DataType::UNKNOWN;
}