mirror of
https://github.com/MariaDB/server.git
synced 2025-10-12 12:25:37 +03:00
MDEV-18722 Assertion `templ->mysql_null_bit_mask' failed in row_sel_store_mysql_rec upon modifying indexed column into blob
don't assert that virtual columns are always nullable
This commit is contained in:
@@ -26,3 +26,10 @@ replace into t1 (pk) values (1);
|
||||
alter table t1 force;
|
||||
replace into t1 (pk) values (1);
|
||||
drop table t1;
|
||||
create table t1 (t time, unique(t)) engine=innodb;
|
||||
insert into t1 values (null),(null);
|
||||
alter ignore table t1 modify t text not null default '';
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 't' at row 1
|
||||
Warning 1265 Data truncated for column 't' at row 2
|
||||
drop table t1;
|
||||
|
@@ -36,3 +36,11 @@ replace into t1 (pk) values (1);
|
||||
alter table t1 force;
|
||||
replace into t1 (pk) values (1);
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# MDEV-18722 Assertion `templ->mysql_null_bit_mask' failed in row_sel_store_mysql_rec upon modifying indexed column into blob
|
||||
#
|
||||
create table t1 (t time, unique(t)) engine=innodb;
|
||||
insert into t1 values (null),(null);
|
||||
alter ignore table t1 modify t text not null default '';
|
||||
drop table t1;
|
||||
|
@@ -3057,9 +3057,6 @@ static bool row_sel_store_mysql_rec(
|
||||
const mysql_row_templ_t*templ = &prebuilt->mysql_template[i];
|
||||
|
||||
if (templ->is_virtual && dict_index_is_clust(index)) {
|
||||
/* Virtual columns are never declared NOT NULL. */
|
||||
ut_ad(templ->mysql_null_bit_mask);
|
||||
|
||||
/* Skip virtual columns if it is not a covered
|
||||
search or virtual key read is not requested. */
|
||||
if (!rec_clust
|
||||
@@ -3067,8 +3064,10 @@ static bool row_sel_store_mysql_rec(
|
||||
|| (!prebuilt->read_just_key
|
||||
&& !prebuilt->m_read_virtual_key)) {
|
||||
/* Initialize the NULL bit. */
|
||||
mysql_rec[templ->mysql_null_byte_offset]
|
||||
|= (byte) templ->mysql_null_bit_mask;
|
||||
if (templ->mysql_null_bit_mask) {
|
||||
mysql_rec[templ->mysql_null_byte_offset]
|
||||
|= (byte) templ->mysql_null_bit_mask;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user