| Bug #78737 | concat('测试',name_const('test',123456)) cannot execueted | ||
|---|---|---|---|
| Submitted: | 7 Oct 2015 15:03 | Modified: | 15 Oct 2015 6:44 |
| Reporter: | michael michael | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: Replication | Severity: | S3 (Non-critical) |
| Version: | above 5.5.4, 5.6.27 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
[15 Oct 2015 6:44]
MySQL Verification Team
Hello Michael, Thank you for the report and test case. Observed this with 5.6.27(master)->5.7.9(slave). Thanks, umesh
[15 Oct 2015 6:44]
MySQL Verification Team
test results
Attachment: 78737.results (application/octet-stream, text), 4.58 KiB.

Description: when you execute the command just include the sentences concat('测试',name_const('test',123456)) that cannot executed !but before the version 5.5.x,that can be executed correctly How to repeat: you can just execute like the follows select concat('测试',name_const('test',123456)) the error is 'Illegal mix of collations ...' that's not finished! first of all,you have these conditions log_bin = on binlog_forma = mixed the environment's character is uf8! and then do the follows: create table test(id int,name varchar(20)) when you create the follow procedure delimiter // create procedure chen() begin declare a int; set a = 1; insert into test values (a,concat('测试',a)); end // delimiter ; and then execute it call chen(); finally explain the binlog,you will find these sentences insert into test values ( NAME_CONST('a',1),concat('测试', NAME_CONST('a',1))); but that's cannot execute correctly! so when you have a slave,that can be broken! Suggested fix: sql/item.h the funcion void set_numeric() { collation= &my_charset_numeric; derivation= DERIVATION_NUMERIC; repertoire= MY_REPERTOIRE_NUMERIC; } the my_charset_numeric means '#define my_charset_numeric my_charset_latin1' in field.h so change the my_charset_numeric to my_charset_bin that will be executed correctly