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
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)
支持工具
- workbench
- dbeaver
- mysqldump
- navicat
- 導入數據也可以使用 MySQL 中的 source 和 load data 命令
注意點
- 若使用 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 - 導入時,腳本中若存在非註釋性的視圖相關語句,需要註釋掉或刪除。
- 導出時,因爲 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_metadata
和show @@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 byrpda_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
andshow @@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 byrpda_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