KeeProMise opened a new issue, #7467:
URL: https://github.com/apache/gravitino/issues/7467
### Version
main branch
### Describe what's wrong
```shell
MySQL [gravitino]> CREATE TABLE IF NOT EXISTS `policy_version_info` (
-> `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'auto
increment id',
-> `metalake_id` BIGINT(20) UNSIGNED NOT NULL COMMENT 'metalake id',
-> `policy_id` BIGINT(20) UNSIGNED NOT NULL COMMENT 'policy id',
-> `version` INT UNSIGNED NOT NULL COMMENT 'policy info version',
-> `policy_comment` TEXT DEFAULT NULL COMMENT 'policy info comment',
-> `enabled` TINYINT(1) DEFAULT 1 COMMENT 'whether the policy is
enabled, 0 is disabled, 1 is enabled',
-> `content` MEDIUMTEXT DEFAULT NULL COMMENT 'policy content',
-> `deleted_at` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT
'policy deleted at',
-> PRIMARY KEY (`id`),
-> UNIQUE KEY `uk_pod_ver_del` (`policy_id`, `version`,
`deleted_at`),
-> KEY `idx_mid` (`metalake_id`),
-> ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT
'policy version info';
```
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to use near
') ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT 'policy
vers' at line 13
### Error message and/or stacktrace
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to use near
') ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT 'policy
vers' at line 13
### How to reproduce
Executing this SQL statement
### Additional context
From the error message, it appears that the issue lies at the end of the SQL
statement. The error prompt indicates that there is a syntax error near ')
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT 'policy
vers'. Specifically, the problem may be due to the comma after the last field
or index definition in the table structure definition.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]