1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-20763 Table corruption or Assertion `btr_validate_index(index, 0, false)' failed in row_upd_sec_index_entry with virtual column and EMPTY_STRING_IS_NULL SQL mode

unset empty_string_is_null mode when parsing generated columns in a table,
this mode affects pasring.
This commit is contained in:
Sergei Golubchik
2021-01-05 11:42:34 +01:00
parent 83bbe36831
commit f144ce2cfa
3 changed files with 49 additions and 1 deletions

View File

@ -6,3 +6,22 @@ USE test;
set @mode='EMPTY_STRING_IS_NULL';
--source include/empty_string_literal.inc
--echo #
--echo # MDEV-20763 Table corruption or Assertion `btr_validate_index(index, 0, false)' failed in row_upd_sec_index_entry with virtual column and EMPTY_STRING_IS_NULL SQL mode
--echo #
create table t1 (a int, b binary(1) generated always as (''), key(a,b));
insert into t1 (a) values (1);
set sql_mode= default;
flush tables;
update t1 set a = 2;
show create table t1;
drop table t1;
create table t1 (a int, b binary(1) generated always as (''), key(a,b));
insert into t1 (a) values (1);
set sql_mode= 'empty_string_is_null';
flush tables;
update t1 set a = 2;
show create table t1;
drop table t1;