Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nacos 2.4.0 的建表语句在 OceanBase 数据库执行后 不一样,修改配置时会出现报错 #769

Open
Linyuehao2018 opened this issue Aug 21, 2024 · 1 comment

Comments

@Linyuehao2018
Copy link

Linyuehao2018 commented Aug 21, 2024

nacos版本2.4.0
OceanBase 版本:5.7.25-OceanBase_ActionDB_CE-v4.2.1.5
数据库工具是 DBeave 24.1.4

1.建表sql

CREATE TABLE `his_config_info` (
  `id` bigint(64) unsigned NOT NULL,
  `nid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `data_id` varchar(255) COLLATE utf8_bin NOT NULL,
  `group_id` varchar(128) COLLATE utf8_bin NOT NULL,
  `app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL COMMENT 'app_name',
  `content` longtext COLLATE utf8_bin NOT NULL,
  `md5` varchar(32) COLLATE utf8_bin DEFAULT NULL,
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `src_user` text COLLATE utf8_bin,
  `src_ip` varchar(50) COLLATE utf8_bin DEFAULT NULL,
  `op_type` char(10) COLLATE utf8_bin DEFAULT NULL,
  `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '租户字段',
  `encrypted_data_key` varchar(1024) COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '秘钥',
  PRIMARY KEY (`nid`),
  KEY `idx_gmt_create` (`gmt_create`),
  KEY `idx_gmt_modified` (`gmt_modified`),
  KEY `idx_did` (`data_id`)
) ENGINE=InnoDB AUTO_INCREMENT=684 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='多租户改造';

2.执行后 ---会在 KEY idx_gmt_create (gmt_create), KEY idx_gmt_modified (gmt_modified), KEY idx_did (data_id) 后面出现 BLOCK_SIZE 16384 LOCAL,

CREATE TABLE `his_config_info_20240821` (
  `id` bigint(64) unsigned NOT NULL,
  `nid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `data_id` varchar(255) COLLATE utf8mb4_bin NOT NULL,
  `group_id` varchar(128) COLLATE utf8mb4_bin NOT NULL,
  `app_name` varchar(128) COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'app_name',
  `content` longtext COLLATE utf8mb4_bin NOT NULL,
  `md5` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL,
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `src_user` text COLLATE utf8mb4_bin DEFAULT NULL,
  `src_ip` varchar(50) COLLATE utf8mb4_bin DEFAULT NULL,
  `op_type` char(10) COLLATE utf8mb4_bin DEFAULT NULL,
  `tenant_id` varchar(128) COLLATE utf8mb4_bin DEFAULT '' COMMENT '租户字段',
  `encrypted_data_key` varchar(1024) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '秘钥',
  PRIMARY KEY (`nid`),
  KEY `idx_gmt_create` (`gmt_create`) BLOCK_SIZE 16384 LOCAL,
  KEY `idx_gmt_modified` (`gmt_modified`) BLOCK_SIZE 16384 LOCAL,
  KEY `idx_did` (`data_id`) BLOCK_SIZE 16384 LOCAL
) AUTO_INCREMENT = 684 AUTO_INCREMENT_MODE = 'ORDER' DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM = 3 BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0 COMMENT = '多租户改造';

修改配置会出现报错

caused: PreparedStatementCallback;SQL[
INSERT INTO his_config_info(id,
data_id,
group_id,
tenant_id,
app_name,
content,
md5,
src_ip,
src_user,
gmt_modified,
op_type,
encrypted_data_key)VALUES(?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?,
?)
];0;nested exception is java.sql.SQLException: 0;caused: 0;caused: 0;

image

@Linyuehao2018 Linyuehao2018 changed the title nacos 2.4.0 的建表语句在 OceanBase 数据库执行后 不一样,修改配置时会出现报凑 nacos 2.4.0 的建表语句在 OceanBase 数据库执行后 不一样,修改配置时会出现报错 Aug 21, 2024
@Linyuehao2018
Copy link
Author

问下老师们 谁解决了这种问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant