[fix](mysqldb) Fix mysqldb upgrade (#25111)

If user has database with same name mysql, will introduce problem when doing checkpoint.

Solution:

Add check for this situation, if duplicate, exit and print log info to prevent damage of metadata;
Add fe config field: mysqldb_replace_name to make things correct if user already has mysql db.
Related pr: #23087 #22868
This commit is contained in:
zhiqqqq
2023-10-08 20:40:56 -05:00
committed by GitHub
parent 9e31cb26bb
commit 7af4be1ee3
6 changed files with 42 additions and 6 deletions

View File

@ -2210,4 +2210,11 @@ public class Config extends ConfigBase {
+ "the default value is 4320, which is 3 days"})
public static int arrow_flight_token_alive_time = 4320;
@ConfField(mutable = true, description = {
"Doris 为了兼用 mysql 周边工具生态,会内置一个名为 mysql 的数据库,如果该数据库与用户自建数据库冲突,"
+ "请修改这个字段,为 doris 内置的 mysql database 更换一个名字",
"To ensure compatibility with the MySQL ecosystem, Doris includes a built-in database called mysql. "
+ "If this database conflicts with a user's own database, please modify this field to replace "
+ "the name of the Doris built-in MySQL database with a different name."})
public static String mysqldb_replace_name = "mysql";
}