summaryrefslogtreecommitdiff
path: root/mysql-test/main/empty_string_literal.test
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2021-01-05 11:42:34 +0100
committerSergei Golubchik <serg@mariadb.org>2021-01-12 10:25:04 +0100
commitf144ce2cfa086182fbd2b44408c70bd3456408f2 (patch)
tree43152867e98c66a3fdb73799401037da3ac84722 /mysql-test/main/empty_string_literal.test
parent83bbe36831e11adb8253132b5715b4b843e9bf09 (diff)
downloadmariadb-git-f144ce2cfa086182fbd2b44408c70bd3456408f2.tar.gz
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.
Diffstat (limited to 'mysql-test/main/empty_string_literal.test')
-rw-r--r--mysql-test/main/empty_string_literal.test19
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/main/empty_string_literal.test b/mysql-test/main/empty_string_literal.test
index 71e98d872bb..9174a7714a2 100644
--- a/mysql-test/main/empty_string_literal.test
+++ b/mysql-test/main/empty_string_literal.test
@@ -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;