From a847bdad537ae437b8b6d430eda0a2128df39a69 Mon Sep 17 00:00:00 2001 From: Jingshi Date: Wed, 4 Dec 2024 20:05:56 +0800 Subject: [PATCH] fix poco to connect to doris --- engine/bazel/engine_deps.bzl | 4 +++- engine/bazel/patches/poco.patch | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 engine/bazel/patches/poco.patch diff --git a/engine/bazel/engine_deps.bzl b/engine/bazel/engine_deps.bzl index 671d340..08c3606 100644 --- a/engine/bazel/engine_deps.bzl +++ b/engine/bazel/engine_deps.bzl @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") def engine_deps(): _com_github_gperftools_gperftools() @@ -300,6 +300,8 @@ def _org_pocoproject_poco(): strip_prefix = "poco-poco-1.12.2-release", sha256 = "30442ccb097a0074133f699213a59d6f8c77db5b2c98a7c1ad9c5eeb3a2b06f3", build_file = "@scql//engine/bazel:poco.BUILD", + patch_args = ["-p1"], + patches = ["@scql//engine/bazel:patches/poco.patch"], ) def _ncurses(): diff --git a/engine/bazel/patches/poco.patch b/engine/bazel/patches/poco.patch new file mode 100644 index 0000000..9231b59 --- /dev/null +++ b/engine/bazel/patches/poco.patch @@ -0,0 +1,22 @@ +diff --git a/Data/MySQL/src/MySQLStatementImpl.cpp b/Data/MySQL/src/MySQLStatementImpl.cpp +index 7bc39e8ad..00c836c52 100644 +--- a/Data/MySQL/src/MySQLStatementImpl.cpp ++++ b/Data/MySQL/src/MySQLStatementImpl.cpp +@@ -153,6 +153,17 @@ void MySQLStatementImpl::bindImpl() + try + { + _stmt.execute(); ++ if (!extractions().size() && !isStoredProcedure()) ++ { ++ _metadata.reset(); ++ _metadata.init(_stmt); ++ if (_metadata.columnsReturned() > 0) ++ { ++ _stmt.bindResult(_metadata.row()); ++ makeExtractors(_metadata.columnsReturned()); ++ fixupExtraction(); ++ } ++ } + } + catch (MySQLException& exc) + {