From 3884c734c261231c34f59e56cde7ae02945b4dae Mon Sep 17 00:00:00 2001 From: Hernan Martinez Date: Tue, 16 Aug 2022 23:07:25 -0500 Subject: [PATCH] Fix optional JSON support for MySQL (#3753) * Fix optional JSON support for MySQL * Fix optional JSON support for MySQLTest --- Data/MySQL/src/ResultMetadata.cpp | 2 ++ Data/MySQL/testsuite/src/MySQLTest.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Data/MySQL/src/ResultMetadata.cpp b/Data/MySQL/src/ResultMetadata.cpp index 61b49dd54..adb5dae84 100644 --- a/Data/MySQL/src/ResultMetadata.cpp +++ b/Data/MySQL/src/ResultMetadata.cpp @@ -133,8 +133,10 @@ namespace case MYSQL_TYPE_LONG_BLOB: case MYSQL_TYPE_BLOB: return Poco::Data::MetaColumn::FDT_BLOB; +#ifdef POCO_MYSQL_JSON case MYSQL_TYPE_JSON: return Poco::Data::MetaColumn::FDT_JSON; +#endif default: return Poco::Data::MetaColumn::FDT_UNKNOWN; } diff --git a/Data/MySQL/testsuite/src/MySQLTest.cpp b/Data/MySQL/testsuite/src/MySQLTest.cpp index 80a3683b1..2a286d35e 100644 --- a/Data/MySQL/testsuite/src/MySQLTest.cpp +++ b/Data/MySQL/testsuite/src/MySQLTest.cpp @@ -976,7 +976,9 @@ CppUnit::Test* MySQLTest::suite() CppUnit_addTest(pSuite, MySQLTest, testBLOBStmt); CppUnit_addTest(pSuite, MySQLTest, testLongBLOB); CppUnit_addTest(pSuite, MySQLTest, testLongTEXT); +#ifdef POCO_MYSQL_JSON CppUnit_addTest(pSuite, MySQLTest, testJSON); +#endif CppUnit_addTest(pSuite, MySQLTest, testUnsignedInts); CppUnit_addTest(pSuite, MySQLTest, testFloat); CppUnit_addTest(pSuite, MySQLTest, testDouble); -- 2.37.2