mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Bugs#9129: CHARSET(), COLLATION(), COERCIBILITY()
not always correct for NULL values. Now they always result a non NULL value even the argument is NULL. It is more usefull for debugging purposes. mysql-test/r/func_str.result: Bugs#9129: CHARSET(), COLLATION(), COERCIBILITY() not always correct for NULL values. Also, a mistake in EXPORT_SET was fixed. mysql-test/t/func_str.test: Bugs#9129: CHARSET(), COLLATION(), COERCIBILITY() not always correct for NULL values. sql/item_func.cc: Bugs#9129: CHARSET(), COLLATION(), COERCIBILITY() not always correct for NULL values. sql/item_strfunc.cc: Bugs#9129: CHARSET(), COLLATION(), COERCIBILITY() not always correct for NULL values. A minor mistake in EXPORT_SET() was fixed.
This commit is contained in:
@@ -512,7 +512,7 @@ collation(make_set(255,_latin2'a',_latin2'b',_latin2'c')) coercibility(make_set(
|
||||
latin2_general_ci 4
|
||||
select collation(export_set(255,_latin2'y',_latin2'n',_latin2' ')), coercibility(export_set(255,_latin2'y',_latin2'n',_latin2' '));
|
||||
collation(export_set(255,_latin2'y',_latin2'n',_latin2' ')) coercibility(export_set(255,_latin2'y',_latin2'n',_latin2' '))
|
||||
binary 4
|
||||
latin2_general_ci 4
|
||||
select collation(trim(_latin2' a ')), coercibility(trim(_latin2' a '));
|
||||
collation(trim(_latin2' a ')) coercibility(trim(_latin2' a '))
|
||||
latin2_general_ci 4
|
||||
@@ -627,6 +627,15 @@ t1 CREATE TABLE `t1` (
|
||||
`encode('abcd','ab')` binary(4) NOT NULL default ''
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
create table t1 (a char character set latin2);
|
||||
insert into t1 values (null);
|
||||
select charset(a), collation(a), coercibility(a) from t1;
|
||||
charset(a) collation(a) coercibility(a)
|
||||
latin2 latin2_general_ci 2
|
||||
drop table t1;
|
||||
select charset(null), collation(null), coercibility(null);
|
||||
charset(null) collation(null) coercibility(null)
|
||||
binary binary 5
|
||||
select SUBSTR('abcdefg',3,2);
|
||||
SUBSTR('abcdefg',3,2)
|
||||
cd
|
||||
|
||||
Reference in New Issue
Block a user