已开启
[开源实习]: openGauss B库B协议适配连接池 dbcp #52
totaj创建于  7月20日
totaj
totaj成员
7月20日 创建

【任务分值】20分

背景描述

openGauss B库dolphin插件中实现了MySQL协议兼容,用户在设置相关参数后,可通过MySQL的JDBC driver或者MySQL命令行客户端,直接连接openGauss。为加强生态适配,本项目旨在测试验证并适配使用连接池 dbcp配合 MySQL JDBC 连接 openGauss B 兼容模式数据库。

需求描述

基于openGauss的MySQL协议兼容,测试验证并适配使用使用连接池 dbcp配合 MySQL JDBC 连接 openGauss B 兼容模式数据库,并输出示例指导文档。

CPU架构

x86_64/aarch64 均可

操作系统版本

openEuler 20.03 LTS

openGauss版本

openGauss 7.0.0-LTS

产出标准

1、代码
如有适配代码,提交到plugin仓
https://gitcode.com/opengauss/Plugin
2、测试代码
输出测试思维导图及测试代码,并输出自测报告,如发现bug,请修复,并补充在测试报告中,统一提交到examples仓库
https://gitcode.com/opengauss/examples
28、使用示例指导文档
参考基于Mybatis开发,输出基于dbcp开发指导文档,提交到docs仓
https://docs.opengauss.org/zh/docs/latest/mysql_compatibility_developer_guide/mybatis_development.html
https://gitcode.com/opengauss/docs

PR提交地址

https://gitcode.com/opengauss/docs

期望完成时间

2026.10.30

开发指导

https://docs.opengauss.org/zh/docs/7.0.0-RC3/extension_reference/dolphin_mysql_protocol_compatibility.html

导师及邮箱

@liyangx 18352857663@163.com 螠虫

【备注】领取本任务时,请参照官网文档提前安装好 openGauss,并将安装且运行成功的截图、您的简历与本任务的开发方案邮件发给导师。导师收到邮件后,会在本任务的issue评论内通过命令反馈评审结果。

likedislike
opengauss_bot
opengauss_bot成员
7月20日 评论:

This issue requires an assignee. Since you haven't specified one, we've assigned TestManager as the default assignee for this issue.

likedislike
opengauss_botopengauss_bot成员
7月20日 将 TestManager 设为负责人
opengauss_botopengauss_bot成员
7月20日 添加了label:sig/Community
opengauss_bot
opengauss_bot成员
7月20日 评论:

Welcome To openGauss Community

Hey @totaj , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands.

Contact Guide

If you have any questions, please contact the SIG: Community ,
and any of the maintainers: @CarrotGo, @chendong76, @chenxiaobin19, @congzhou2603, @dodders, @hwworkholic, @jemappellehc, @muyulinzhong, @quemingjian, @shenzheng4, @shirley_zhengx, @superlchf, @totaj, @wlff234, @wofanzheng, @ywzq1161327784 ,
and any of the committers: @ailoooong, @gzbang, @libiao2024, @zhangxubo .

likedislike
opengauss_bot
opengauss_bot成员
8月4日 评论:

@lhjghk , 您还未通过开源实习资格申请, 无法领取此任务, 请先完成实习申请.

likedislike
liuhongwei
liuhongwei
8月4日 评论:

/intern-assign

likedislike
opengauss_bot
opengauss_bot成员
8月4日 评论:

@liuhongwei-2026 , 您还未通过开源实习资格申请, 无法领取此任务, 请先完成实习申请.

likedislike
liuhongwei
liuhongwei
8月5日 评论:

/intern-assign

likedislike
opengauss_bot
opengauss_bot成员
8月5日 评论:

@liuhongwei-2026 , 感谢您认领此任务, 请及时跟导师沟通, 导师审核通过后才能承担此任务, 否则任务无效.

likedislike
liyangx成员
8月5日 评论:

/intern-approve

likedislike
opengauss_bot
opengauss_bot成员
8月5日 评论:

@liyangx , 已报名认证过的导师, 才能审核任务, 谢谢!

likedislike
totaj
totaj成员
8月6日 评论:

/intern-approve

likedislike
opengauss_bot
opengauss_bot成员
8月6日 评论:

@liuhongwei-2026 , 恭喜您已成功领取该任务, 请及时处理任务. 认领任务>导师审核认领资格>处理任务>提交任务>导师审核>pr合入>获得积分.

likedislike
liuhongwei
liuhongwei
8月7日 评论:

【进展同步】DBCP 连接池适配 openGauss B 兼容模式 —— 开发与自验完成,已提 PR

已完成 Apache Commons DBCP2 + MySQL JDBC 8.0.28 连接 openGauss B 兼容模式数据库
(MySQL 协议)的适配开发、测试与文档,3 个 PR 已提交,请导师评审。

自验环境

openGauss 7.0.0-RC2(源码编译)+ dolphin v7.0.0-RC2;commons-dbcp2 2.9.0 + mysql-connector-java 8.0.28

自验证据

  1. 服务器状态与 MySQL 协议监听(3308 正常监听,db_state=Normal)
    1.png
  2. dolphin 参数:enable_dolphin_proto=on,dolphin_server_port=3308
    2.png
  3. B 兼容库 proto_test_db / schema mysql_test_db / user 表数据正常
    3.png
  4. 全量 JUnit 测试:37/37 通过(BUILD SUCCESS)
    4.png
  5. 示例程序 DbcpConnectDemo 全流程运行正常(建池→CRUD→关池)
    5.png

(截图见上方附件)

PR 列表

说明

  • 自测报告含源码部署环境下 dolphin 适配发现的 6 个问题与解决(版本对齐、GUC 崩溃、
    gaussdb.state、Unix socket、ENABLE_HTAP ABI 错位等)。
likedislike
totajtotaj成员
8月27日 修改了issue 的描述