Commit 87075e7f authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-11704 InnoDB: Failing assertion: dfield_is_null(dfield2) || dfield2->data

relax innodb assertion, because Field_blob::store() clearly says
that a data pointer can be zero if the length is zero.
parent 239790d9
...@@ -258,3 +258,14 @@ insert into t1 (col_varchar,col_int,col_datetime,col_time,col_blob,col_bit,col_y ...@@ -258,3 +258,14 @@ insert into t1 (col_varchar,col_int,col_datetime,col_time,col_blob,col_bit,col_y
('bar',6,'1900-01-01 00:00:00','00:00:00','bar',b'10011000001101011000101',1985,'b',0.7,'','2028-04-06','1971-01-01 00:00:00'); ('bar',6,'1900-01-01 00:00:00','00:00:00','bar',b'10011000001101011000101',1985,'b',0.7,'','2028-04-06','1971-01-01 00:00:00');
alter table t1 add index(vcol_datetime); alter table t1 add index(vcol_datetime);
drop table t1; drop table t1;
create table t1 (
pk int,
col_blob mediumtext not null default '',
vcol_blob tinyblob as (col_blob) virtual,
col_char char(22) null,
primary key(pk),
index(col_char,vcol_blob(64))
) engine=innodb;
insert ignore into t1 (pk) values (1),(2);
update t1 set col_char = 'foo' where pk = 1;
drop table t1;
...@@ -101,3 +101,19 @@ insert into t1 (col_varchar,col_int,col_datetime,col_time,col_blob,col_bit,col_y ...@@ -101,3 +101,19 @@ insert into t1 (col_varchar,col_int,col_datetime,col_time,col_blob,col_bit,col_y
alter table t1 add index(vcol_datetime); alter table t1 add index(vcol_datetime);
drop table t1; drop table t1;
#
# MDEV-11704 InnoDB: Failing assertion: dfield_is_null(dfield2) || dfield2->data
#
create table t1 (
pk int,
col_blob mediumtext not null default '',
vcol_blob tinyblob as (col_blob) virtual,
col_char char(22) null,
primary key(pk),
index(col_char,vcol_blob(64))
) engine=innodb;
insert ignore into t1 (pk) values (1),(2);
update t1 set col_char = 'foo' where pk = 1;
drop table t1;
...@@ -6243,7 +6243,7 @@ void TABLE::mark_columns_needed_for_delete() ...@@ -6243,7 +6243,7 @@ void TABLE::mark_columns_needed_for_delete()
void TABLE::mark_columns_needed_for_update() void TABLE::mark_columns_needed_for_update()
{ {
DBUG_ENTER("mark_columns_needed_for_update"); DBUG_ENTER("TABLE::mark_columns_needed_for_update");
bool need_signal= false; bool need_signal= false;
mark_columns_per_binlog_row_image(); mark_columns_per_binlog_row_image();
......
...@@ -129,7 +129,8 @@ row_build_index_entry_low( ...@@ -129,7 +129,8 @@ row_build_index_entry_low(
ut_ad(v_col->v_pos < dtuple_get_n_v_fields(row)); ut_ad(v_col->v_pos < dtuple_get_n_v_fields(row));
dfield2 = dtuple_get_nth_v_field(row, v_col->v_pos); dfield2 = dtuple_get_nth_v_field(row, v_col->v_pos);
ut_ad(dfield_is_null(dfield2) || dfield2->data); ut_ad(dfield_is_null(dfield2) ||
dfield_get_len(dfield2) == 0 || dfield2->data);
} else { } else {
dfield2 = dtuple_get_nth_field(row, col_no); dfield2 = dtuple_get_nth_field(row, col_no);
ut_ad(dfield_get_type(dfield2)->mtype == DATA_MISSING ut_ad(dfield_get_type(dfield2)->mtype == DATA_MISSING
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment