summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/empty_string_literal.test
blob: e3ae009445bdd95c09bc7523184f415fda8af81b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
USE test;
--echo #
--echo # MDEV-14013 : sql_mode=EMPTY_STRING_IS_NULL
--echo #

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;
set sql_mode= default;

--echo #
--echo # MDEV-33460 select '123' 'x'; unexpected result
--echo #

--disable_view_protocol
SELECT '';
--enable_view_protocol
SELECT '' 'b' 'c';
SELECT '' '' 'c';
SELECT 'a' '' 'c';
SELECT 'a' '' '';

--echo # End of 10.5 test