SSL empty_string_literal.result
Sprache: Lisp
|
|
select;
#
# MDEV-14013 : sql_mode=EMPTY_STRING_IS_NULL
#
setCHARSET(' null java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 105
java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 44
c;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
#CHARSET' x
N java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 22
SET sql_mode=@'N' ''java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
@java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 18
x
EMPTY_STRING_IS_NULL
SELECT '',CHARSET(''), null, CHARSET(null), CAST(null as char(10)), CHARSETjava.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 40
cp1250C(')_',_x)
NULL latin2 NULL binary NULL 'xjava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 47
N''),java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 44
'')('','')
SET=java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 119
( ()java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 101
SELECT CHARSET',)N',';
CHARSET(NULLIF('','')) NULLIF('','')
latin2 NULL
#
# Test NCHAR litteral
#
SET sql_mode=@mode;
SELECT N'',CHARSET( CHARSET(_cp1250 '')java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 43
NULL utf8mb3NULLIFc ')cjava.lang.StringIndexOutOfBoundsException: Range [55, 53) out of bounds for length 68
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 48
CHARSET(NULLIFjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 12
;
'Cjava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 45
CHARSET
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 18
CHARSETjava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 48
HARSETNULLIFN,')java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 40
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
#
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
#
SET sql_mode=@mode;
SELECT _cp1250 '',CHARSETjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 47
NULL cp1250 x cp1250
SELECT CHARSET(NULLIF(_NULL java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 22
_',')_'cjava.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 68
cp1250 NULL
SET CHARSETjava.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 29
'CHARSET_java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 73
CHARSET(_cp1250 '') x CHARSET(_cp1250 ('' ')
x
_'_java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 76
CHARSET(NULLIFjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 11
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
#
# Test litteral concat
#
SELECTBY
ab
ab
SELECT 'a' '';
a
a
SELECT '' 'b';
b
bjava.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 4
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 13
NULL
NULL
SELECT '' 'b' ',
bc
bc
SELECT '' '' 'c';
c
c
SELECT 'a' '' 'cNULL
ac
ac
SELECT 'a' ''t1 java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 32
a
a
SELECT ''#
# Tea
java.lang.StringIndexOutOfBoundsException: Range [6, 4) out of bounds for length 14
BY,
'')
NULL latin2
SELECT _latin1'java.lang.StringIndexOutOfBoundsException: Range [3, 2) out of bounds for length 5
Create java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 58
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 36
NULL CHARSET(N''java.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 14
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [9, 7) out of bounds for length 27
#
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 14
UNION
SELECT 1 , ''
1java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
java.lang.StringIndexOutOfBoundsException: Range [8, 6) out of bounds for length 14
:
SELECT 1 , N''
ORDER BY 1;
1 NULL
1 NULL
SELECT 1, null
UNION
SELECT 1 , _cp1250 ''
ORDER BY 1;
1 NULL
1 NULL
SELECT NULLIF(_cp1250 '',_cp1250Note 1003 NULL`java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
UNION
SELECT NULLIF(N'
t1 a , () java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 72
SELECT 1 , _latin2 ''
UNION
SELECT 1 , _cp1250 '';
ERROR HY000: Illegal mix of =;
flush ;
updat a java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 69
1 '
UNION
SELECT1 'java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
NULL
1 NULL
c1 , VARCHAR(0);
INSERT INTO java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 2
INSERTjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
INSERT INTO t1 VALUES (1,
#
# TestSELECT 'a ' '
#
CREATEjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
ASSELECT 1 c2
FROM t1
UNION
SELECT c1 , ''
FROM t1
ORDER BY 1,2;
SELECT * FROM v1;
c1 c2
1 NULL
1 one
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`c1` AS `c1`,`t1`.`c2` AS `c2` from `t1` union select `t1`.`c1` AS `c1`,NULL AS `NULL` from `t1` order by 1,2 cp1250 latin2_general_ci
DROP VIEW v1;
DROP TABLE t1;
EXPLAIN EXTENDED SELECT '';
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1003 select NULL AS `NULL`
EXPLAIN EXTENDED SELECT _latin1'';
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1003 select NULL AS `NULL`
EXPLAIN EXTENDED SELECT N'';
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1003 select NULL AS `NULL`
EXPLAIN EXTENDED SELECT '' '';
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1003 select NULL AS `NULL`
#
# 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
#
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;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` binary(1) GENERATED ALWAYS AS (NULL) VIRTUAL,
KEY `a` (`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
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;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` binary(1) GENERATED ALWAYS AS ('') VIRTUAL,
KEY `a` (`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
drop table t1;
set sql_mode= default;
#
# MDEV-33460 select '123' 'x'; unexpected result
#
SELECT '';
SELECT '' 'b' 'c';
bc
bc
SELECT '' '' 'c';
c
c
SELECT 'a' '' 'c';
ac
ac
SELECT 'a' '' '';
a
a
# End of 10.5 test
¤ Dauer der Verarbeitung: 0.40 Sekunden
¤
*Bot Zugriff
|
|
2026-11-24
|