tidb升级到7.5.0, tidb servers升级报错了怎么处理

// CreateRunawayWatchTable stores the condition which is used to check whether query should be quarantined.
CreateRunawayWatchTable = CREATE TABLE IF NOT EXISTS mysql.tidb_runaway_watch ( id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY, resource_group_name varchar(32) not null, start_time datetime(6) NOT NULL, end_time datetime(6), watch bigint(10) NOT NULL, watch_text TEXT NOT NULL, source varchar(512) NOT NULL, action bigint(10), INDEX sql_index(resource_group_name,watch_text(700)) COMMENT "accelerate the speed when select quarantined query", INDEX time_index(end_time) COMMENT "accelerate the speed when querying with active watch" ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

// CreateDoneRunawayWatchTable stores the condition which is used to check whether query should be quarantined.
CreateDoneRunawayWatchTable = CREATE TABLE IF NOT EXISTS mysql.tidb_runaway_watch_done ( id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY, record_id BIGINT(20) not null, resource_group_name varchar(32) not null, start_time datetime(6) NOT NULL, end_time datetime(6), watch bigint(10) NOT NULL, watch_text TEXT NOT NULL, source varchar(512) NOT NULL, action bigint(10), done_time TIMESTAMP(6) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

可能升级的时候执行建表的sql失败了。用root手工建立一下看看。

3 个赞