分布式-DBLE-Release-Notes-详细解读-219070

5次阅读

共计 6276 个字符,预计需要花费 16 分钟才能阅读完成。

2.19.07.0 版本 DBLE Release Notes

一、DBLE 项目介绍

DBLE 是企业级开源分布式中间件,江湖人送外号“MyCat Plus”;以其简单稳定,持续维护,良好的社区环境和广大的群众基础得到了社区的大力支持;

DBLE 官方项目:https://github.com/actiontech/dble    
如对源码有兴趣或者需要定制的功能的可以通过源码编译安装

DBLE 官方文档(已更新):https://actiontech.github.io/dble-docs-cn    
可以详细了解 DBLE 的背景和应用场景,本文未涉及到的细节都可在官方文档获得

DBLE 下载地址:https://github.com/actiontech/dble/releases

点击学习 DBLE 公开课,Mycat 用户更快上手哦!

Tips:建议下载最新的 Releases 版本,下载 tar 压缩包即可,如有源码编译需求的,可以下载源码包。

二、新版本概况

上一次 发版 (2.19.05.0)(7 月 2 日)仿佛就在昨天,DBLE 社区就又双叒叕迎来了新版本的更新;最新的 Release Notes 请参考:

https://github.com/actiontech…

新增或重构功能 10 个,修复缺陷 22 个,向后兼容性调整 4 处;

  • 首先,感谢以下人员对社区做出的贡献:

    @kaikai2000, @Lordess, @ssxlulu, @canying8020, @newskyddm, @wbshen

  • 再次,感谢 Github 用户提供的优质 issue
  • 最后,感谢在 QQ 群(669663113)提供的有效反馈的朋友

三、版本主要更新解读

1、支持更丰富的数据导入导出方式(issue #1264)

支持工具

  1. workbench
  2. dbeaver
  3. mysqldump
  4. navicat
  5. 导入数据也可以使用 MySQL 中的 source 和 load data 命令

注意点

  1. 若使用 mysqldump 导出时,请按照以下格式进行导出,否则可能出现错误,因为有些 mysqldump 参数 DBLE 不支持。

    ./mysqldump -h127.0.0.1 -utest -P3306 -p111111 –default-character-set=utf8mb4 –master-data=2 \
    –single-transaction –set-gtid-purged=off –hex-blob –databases schema1 > export.sql

  2. 导入时,脚本中若存在非注释性的视图相关语句,需要注释掉或删除。
  3. 导出时,因为 DBLE 对视图相关的一些语句不支持,因此尽量确保导出的 DBLE 中不存在视图。

2、更加完善的 show 命令(issue #759)

  • 添加管理器命令:

    • show @@user,show @@user.privilege
  • 修改管理器命令:

    • show @@datasource
    • show @@datasource.synstatus
    • show @@datasource.syndetail where name=?
    • show @@datasource.cluster

3、文本协议支持新增(issue #1356 & #1326)

  • COM_CHANGE_USER:重置连接并使用给定的凭证重新进行身份验证
  • COM_RESET_CONNECTION:无需重新身份认证即可重连

    • 关闭后端连接 (rollback & unlock)
    • 事务状态情况
    • 用户变量清空
    • 系统变量恢复成系统默认值
    • prepare 清空
    • 上下文(字符集 / 隔离级别)恢复成为默认值
    • LAST_INSERT_ID 置零
  • COM_SET_OPTION:用来启用或禁用服务的选项

四、完整 Release Notes 及翻译

更新列表:

  • [#1263] 添加命令 release @@reload_metadatashow @@reload_status 实现重载功能
  • [#1264] 支持更丰富的数据导入导出方式
  • [#1332] 支持创建 FUNCTION,类似创建 PROCEDURE
  • [#1356] 文本协议支持 COM_CHANGE_USER 和 COM_RESET_CONNECTION
  • [#1326] 文本协议支持 COM_SET_OPTION
  • [#1340] 重构心跳检测逻辑
  • [#759] 更加完善的 show 命令
  • [#1342] 修改在管理器命令和日志中包含 connetciton ID 列的名称
  • [#1266] gc 日志不会在重启 DBLE 时候被覆盖
  • [#877] 支持创建 SAVEPOINT,谢谢 @wbshen 报告这个问题

缺陷修复:

  • [#1383] reload @@config_all 可能导致在 slig 泄漏中连接新添加的数据主机
  • [#1184] 由分布式时间戳生成的全局序列可能具有重复的值
  • [#1212] 在 zk 集群中重新启动 DBLE 可能失败
  • [#1286] 参数 sqlExecuteTimeout 无效
  • [#1229] 当在不同的表中出现大小写字母时,连接返回空,缺少结果集,谢谢 @kaikai2000 报告错误
  • [#1368] 无论加密失败与否,结果总是返回真,感谢 @Lordess 报告并修复错误
  • [#1327] 复杂的选择列可能导致在连接查询中“找不到错误“
  • [#1351] 不共享表的与联合的子查询应视为简单查询
  • [#1241] 在库命名中有“-”时报错
  • [#1261] 多 SQL 任务不是安全线程并且计数间隔不匹配,可能导致服务重载挂起
  • [#1322] 用相同的数据主机和相同的数据库检查不同的数据节点
  • [#1300] 类物理数据库的 insource 方法中的错误注释,谢谢 @ssxlulu 报告并修复错误
  • [#1306] 当执行 SQL “select a.* from sharding_4_t1 a ,schema2.sharding_4_t2 b where a.id = b.id and b.name = ‘1’;” 时将获取错误信息
  • [#1301] 当执行 SQL “select t1.id from DbTest.Test_Table T1 left join Test t2 on t1.id=t2.Id;” 时 DBLE 会获取 NPE 的错误信息
  • [#1280] 在当前数据库中创建的视图不能与其他数据库中的表关联,也不能添加数据库前缀,谢谢 @canying8020 报告错误
  • [#1250] 表的空间存在于文件中时,载入数据的默认字段会失败
  • [#1288] 全局表,在执行 “select a.id,b.* from schema2.test2 a inner join test1 b on a.id+1 =b.id+2;” 时出现错误
  • [#1251] 分析 er 表中的子表,语句实际上已执行
  • [#1255] 当执行 SQL “select a.id,b.* from test2 a inner join test1 b on a.id =b.id+1;” 时发生错误,谢谢 @newskyddm 错误报告
  • [#1256] 当执行 SQL “select test1.id,test1.id+1 as rpda_0 from test1 order by rpda_0 ASC” 时发生错误,谢谢 @newskyddm 报告错误
  • [#960] 非共享表,在执行 SQL “SELECT CURRENT_USER() union select id from test1” 时得到结果是错误的
  • [#1268] 全局表,在执行 “select count(*) from (select O_CUSTKEY,count(O_CUSTKEY) as counts from test1 group by O_CUSTKEY) as a where counts<10 group by counts;” 时出现错误

兼容性:

  • [#759] show @@datasource,show @@datasource.synstatus,show @@datasource.syndetail where name=?,show @@datasource.cluster 添加 DATAHOST 列
  • [#1272] 删除 server.xml 中的属性 useOldMetaInit
  • [#1291] 将默认字符集从 UTF8 更改为 Utf8mb4
  • [#1260] 重构 XML 配置文件中的属性 version

Release Notes:

Features:

  • [#1263] Add command release @@reload_metadata and show @@reload_status to make reload observable
  • [#1264] Support more ways for exporting and importing data
  • [#1332] Support create FUNCTION just like create PROCEDURE.
  • [#1356] Support COM_CHANGE_USER and COM_RESET_CONNECTION
  • [#1326] Support COM_SET_OPTION
  • [#1340] Refactor heartbeat logic
  • [#759] Add manager command:show @@user,show @@user.privilege,modify manager command:show @@datasource,show @@datasource.synstatus,show @@datasource.syndetail where name=?,show @@datasource.cluster
  • [#1340] Refactor heartbeat logic
  • [#1342] Modify column name that contains connetciton id in manager command and log
  • [#1266] Provious gc log can’t be overried when user restarts dble.
  • [#877] Support statement SAVEPOINT, thanks @wbshen report this issue

Bug-fixes:

  • [#1383] reload @@config_all failed may lead to connections for new added datahost in config leaking.
  • [#1184] Global sequences generated by distributed timestamps may have duplicate values.
  • [#1212] Restart dble may fail in zk cluster.
  • [#1286] Parameter sqlExecuteTimeout is invalid.
  • [#1229] When there are lowercase and uppercase in the field in differernt table, Join returns null, missing result set, thanks @kaikai2000 report the bug.
  • [#1368] encrypt.sh always return true whether the encryption failed or not, thanks @Lordess report and fix the bug.
  • [#1327] Complex select columns may lead “can not find error” in join query.
  • [#1351] No-sharding table’s sub-query with union should be treated as simple query.
  • [#1241] Report error when ‘-‘ in the name of schema.
  • [#1261] MultiSQLJob is not thread safe & countDownShardTable not correct, may cause reload hang.
  • [#1322] Check different dataNodes with same dataHost and same database.
  • [#1300] Incorrect comment in initSource method of class PhysicalDBPool, thanks @ssxlulu report and fix the bug.
  • [#1306] Got error while executing sql”select a.* from sharding_4_t1 a ,schema2.sharding_4_t2 b where a.id = b.id and b.name = ‘1’;”
  • [#1301] dble will got NPE error while executing the sql “select t1.id from DbTest.Test_Table T1 left join Test t2 on t1.id=t2.Id;”
  • [#1280] Views created in the current database cannot be associated with tables in another database, and database prefixes cannot be added, thanks @canying8020 report the bug.
  • [#1250] Load data incorrect with default fields terminate when tab’s space exists in file
  • [#1288] For global table, got error while execute “select a.id,b.* from schema2.test2 a inner join test1 b on a.id+1 =b.id+2;”
  • [#1251] Explain the child table in the er table, the statement is actually executed
  • [#1255] Error when execute “select a.id,b.* from test2 a inner join test1 b on a.id =b.id+1;”, thanks @newskyddm report the bug.
  • [#1256] Error when execute “select test1.id,test1.id+1 as rpda_0 from test1 order by rpda_0 ASC”, thanks @newskyddm report the bug.
  • [#960] For no-sharding table, got wrong result while executing sql “SELECT CURRENT_USER() union select id from test1”
  • [#1268] For global table, got error while executing “select count(*) from (select O_CUSTKEY,count(O_CUSTKEY) as counts from test1 group by O_CUSTKEY) as a where counts<10 group by counts;”

Breaking backward compatibility:

  • [#759] show @@datasource,show @@datasource.synstatus,show @@datasource.syndetail where name=?,show @@datasource.cluster add DATAHOST column
  • [#1272] Remove the property useOldMetaInit in server.xml.
  • [#1291] Change the default charset from utf8 to utf8mb4.
  • [#1260] Refactoring attribute ‘version’ in xml config

正文完
 0