lealone / Lealone

比 MySQL 和 MongoDB 快10倍的 OLTP 关系数据库和文档数据库
Other
2.48k stars 519 forks source link

clob字段更新为null时报错 #218

Closed ContyChen closed 10 months ago

ContyChen commented 11 months ago

更新clob类型字段为null时会报错,sql如下:

CREATE TABLE xxl_job_group (
  id bigint NOT NULL AUTO_INCREMENT,
  app_name varchar(64) NOT NULL COMMENT '执行器AppName',
  title varchar(12) NOT NULL COMMENT '执行器名称',
  address_type tinyint NOT NULL DEFAULT 0 COMMENT '执行器地址类型:0=自动注册、1=手动录入',
  address_list clob COMMENT '执行器地址列表,多地址逗号分隔',
  update_time datetime DEFAULT NULL,
  CONSTRAINT pk_xxl_job_group PRIMARY KEY (id)
);

INSERT INTO xxl_job_group(id, app_name, title, address_type, address_list, update_time) VALUES (1, 'xxl-job-executor', '示例执行器', 0, NULL, '2018-11-03 22:21:31' );

UPDATE xxl_job_group SET app_name = 'xxl-job-executor', title = '示例执行器', address_type = '0', address_list ='http://172.22.128.1:9999/', update_time = '2023-12-21 14:36:39' WHERE id = 1;

UPDATE xxl_job_group SET app_name = 'xxl-job-executor', title = '示例执行器',  address_type = 0,  address_list = null,           update_time = '2023-12-29 20:20:57'  WHERE id = 1 ;

 SQL 错误 [50000] [HY000]: General error: "java.lang.NullPointerException: Cannot invoke ""org.lealone.db.value.ValueLob.link(org.lealone.db.DataHandler, int)"" because ""v"" is null";
codefollower commented 11 months ago

已修复,感谢报告 bug。