1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

user_var.result, func_str.result, item_strfunc.cc:

bug#7839 ncorrect collation for char(ascii('a'))
This commit is contained in:
bar@mysql.com
2005-01-17 10:38:35 +04:00
parent 308aec1526
commit e7e5e8b1e7
3 changed files with 4 additions and 3 deletions

View File

@ -463,7 +463,7 @@ collation(hex(130)) coercibility(hex(130))
latin1_swedish_ci 3
select collation(char(130)), coercibility(hex(130));
collation(char(130)) coercibility(hex(130))
binary 3
latin1_swedish_ci 3
select collation(format(130,10)), coercibility(format(130,10));
collation(format(130,10)) coercibility(format(130,10))
latin1_swedish_ci 3

View File

@ -175,7 +175,7 @@ Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000001 79 User var 1 79 @`a b`=_latin1 0x68656C6C6F COLLATE latin1_swedish_ci
master-bin.000001 120 Query 1 120 use `test`; INSERT INTO t1 VALUES(@`a b`)
master-bin.000001 184 User var 1 184 @`var1`=_latin1 0x273B616161 COLLATE latin1_swedish_ci
master-bin.000001 226 User var 1 226 @`var2`=_binary 0x61 COLLATE binary
master-bin.000001 226 User var 1 226 @`var2`=_latin1 0x61 COLLATE latin1_swedish_ci
master-bin.000001 264 Query 1 264 use `test`; insert into t1 values (@var1),(@var2)
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
SET @`a b`:=_latin1 0x68656C6C6F COLLATE `latin1_swedish_ci`;
@ -183,7 +183,7 @@ use test;
SET TIMESTAMP=10000;
INSERT INTO t1 VALUES(@`a b`);
SET @`var1`:=_latin1 0x273B616161 COLLATE `latin1_swedish_ci`;
SET @`var2`:=_binary 0x61 COLLATE `binary`;
SET @`var2`:=_latin1 0x61 COLLATE `latin1_swedish_ci`;
SET TIMESTAMP=10000;
insert into t1 values (@var1),(@var2);
drop table t1;

View File

@ -1888,6 +1888,7 @@ b1: str->append((char)(num>>8));
#endif
str->append((char)num);
}
str->set_charset(collation.collation);
str->realloc(str->length()); // Add end 0 (for Purify)
return str;
}