0001-Fix-optional-JSON-support-for-MySQL-3753.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. From 3884c734c261231c34f59e56cde7ae02945b4dae Mon Sep 17 00:00:00 2001
  2. From: Hernan Martinez <hernan.c.martinez@gmail.com>
  3. Date: Tue, 16 Aug 2022 23:07:25 -0500
  4. Subject: [PATCH] Fix optional JSON support for MySQL (#3753)
  5. * Fix optional JSON support for MySQL
  6. * Fix optional JSON support for MySQLTest
  7. ---
  8. Data/MySQL/src/ResultMetadata.cpp | 2 ++
  9. Data/MySQL/testsuite/src/MySQLTest.cpp | 2 ++
  10. 2 files changed, 4 insertions(+)
  11. diff --git a/Data/MySQL/src/ResultMetadata.cpp b/Data/MySQL/src/ResultMetadata.cpp
  12. index 61b49dd54..adb5dae84 100644
  13. --- a/Data/MySQL/src/ResultMetadata.cpp
  14. +++ b/Data/MySQL/src/ResultMetadata.cpp
  15. @@ -133,8 +133,10 @@ namespace
  16. case MYSQL_TYPE_LONG_BLOB:
  17. case MYSQL_TYPE_BLOB:
  18. return Poco::Data::MetaColumn::FDT_BLOB;
  19. +#ifdef POCO_MYSQL_JSON
  20. case MYSQL_TYPE_JSON:
  21. return Poco::Data::MetaColumn::FDT_JSON;
  22. +#endif
  23. default:
  24. return Poco::Data::MetaColumn::FDT_UNKNOWN;
  25. }
  26. diff --git a/Data/MySQL/testsuite/src/MySQLTest.cpp b/Data/MySQL/testsuite/src/MySQLTest.cpp
  27. index 80a3683b1..2a286d35e 100644
  28. --- a/Data/MySQL/testsuite/src/MySQLTest.cpp
  29. +++ b/Data/MySQL/testsuite/src/MySQLTest.cpp
  30. @@ -976,7 +976,9 @@ CppUnit::Test* MySQLTest::suite()
  31. CppUnit_addTest(pSuite, MySQLTest, testBLOBStmt);
  32. CppUnit_addTest(pSuite, MySQLTest, testLongBLOB);
  33. CppUnit_addTest(pSuite, MySQLTest, testLongTEXT);
  34. +#ifdef POCO_MYSQL_JSON
  35. CppUnit_addTest(pSuite, MySQLTest, testJSON);
  36. +#endif
  37. CppUnit_addTest(pSuite, MySQLTest, testUnsignedInts);
  38. CppUnit_addTest(pSuite, MySQLTest, testFloat);
  39. CppUnit_addTest(pSuite, MySQLTest, testDouble);
  40. --
  41. 2.37.2