Skip to content

Commit

Permalink
fix poco to connect to doris
Browse files Browse the repository at this point in the history
  • Loading branch information
jingshi-ant committed Dec 4, 2024
1 parent 00e8678 commit 4c61b91
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
4 changes: 3 additions & 1 deletion engine/bazel/engine_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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():
Expand Down
22 changes: 22 additions & 0 deletions engine/bazel/patches/poco.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/Data/MySQL/src/MySQLStatementImpl.cpp b/Data/MySQL/src/MySQLStatementImpl.cpp
index 7bc39e8ad..35b1c8235 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(cols);
+ fixupExtraction();
+ }
+ }
}
catch (MySQLException& exc)
{

0 comments on commit 4c61b91

Please sign in to comment.