Fix optional JSON support for MySQL (#3753)

* Fix optional JSON support for MySQL

* Fix optional JSON support for MySQLTest
This commit is contained in:
Hernan Martinez
2022-08-16 23:07:25 -05:00
committed by GitHub
parent 22d2865de2
commit a7ffdb91eb
2 changed files with 4 additions and 0 deletions

View File

@@ -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;
}

View File

@@ -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);