Skip to content

Commit

Permalink
[hotfix] ams-mysql-init.sql fix error init (#3217)
Browse files Browse the repository at this point in the history
[Improvement] ams-mysql-init.sql fix
  • Loading branch information
mansonliwh authored Sep 24, 2024
1 parent b157261 commit efd6650
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions amoro-ams/src/main/resources/mysql/ams-mysql-init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ CREATE TABLE `table_runtime`
`last_major_optimizing_time` timestamp NULL DEFAULT NULL COMMENT 'Latest Major Optimize time for all partitions',
`last_minor_optimizing_time` timestamp NULL DEFAULT NULL COMMENT 'Latest Minor Optimize time for all partitions',
`last_full_optimizing_time` timestamp NULL DEFAULT NULL COMMENT 'Latest Full Optimize time for all partitions',
`optimizing_status_code` int DEFAULT 700 COMMENT 'Table optimize status code: 100(FULL_OPTIMIZING),' ||
' 200(MAJOR_OPTIMIZING), 300(MINOR_OPTIMIZING), 400(COMMITTING), 500(PLANING), 600(PENDING), 700(IDLE)',
`optimizing_status_code` int DEFAULT 700 COMMENT 'Table optimize status code: 100(FULL_OPTIMIZING), 200(MAJOR_OPTIMIZING), 300(MINOR_OPTIMIZING), 400(COMMITTING), 500(PLANING), 600(PENDING), 700(IDLE)',
`optimizing_status_start_time` timestamp default CURRENT_TIMESTAMP COMMENT 'Table optimize status start time',
`optimizing_process_id` bigint(20) NOT NULL COMMENT 'optimizing_procedure UUID',
`optimizer_group` varchar(64) NOT NULL,
Expand All @@ -132,8 +131,8 @@ CREATE TABLE `table_runtime`
`pending_input` mediumtext,
`table_summary` mediumtext,
PRIMARY KEY (`table_id`),
UNIQUE KEY `table_index` (`catalog_name`,`db_name`,`table_name`)
INDEX idx_optimizer_status_and_time (optimizing_status_code, optimizing_status_start_time DESC);
UNIQUE KEY `table_index` (`catalog_name`,`db_name`,`table_name`),
INDEX idx_optimizer_status_and_time (optimizing_status_code, optimizing_status_start_time DESC)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT 'Optimize running information of each table' ROW_FORMAT=DYNAMIC;

CREATE TABLE `table_optimizing_process`
Expand Down

0 comments on commit efd6650

Please sign in to comment.