// Conf file etc used in Bug #78758 // 5.6.27 master mysql> mysql> create table test(id int,name varchar(20)) -> ; Query OK, 0 rows affected (0.00 sec) mysql> delimiter // mysql> create procedure chen() -> begin -> declare a int; -> set a = 1; -> insert into test values (a,concat('测试',a)); -> end -> // Query OK, 0 rows affected (0.00 sec) mysql> delimiter ; mysql> call chen(); Query OK, 1 row affected (0.00 sec) mysql> select * from test; +------+---------+ | id | name | +------+---------+ | 1 | 测试1 | +------+---------+ 1 row in set (0.00 sec) mysql> // 5.7.9 slave mysql> show slave status\G *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: localhost Master_User: repl Master_Port: 15000 Connect_Retry: 60 Master_Log_File: binlog.000003 Read_Master_Log_Pos: 4431 Relay_Log_File: relaylog.000003 Relay_Log_Pos: 1977 Relay_Master_Log_File: binlog.000003 Slave_IO_Running: Yes Slave_SQL_Running: No Replicate_Do_DB: Replicate_Ignore_DB: Replicate_Do_Table: Replicate_Ignore_Table: Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: Last_Errno: 1267 Last_Error: Error 'Illegal mix of collations (utf8_general_ci,COERCIBLE) and (latin1_swedish_ci,IMPLICIT) for operation 'concat'' on query. Default database: 'test'. Query: 'insert into test values ( NAME_CONST('a',1),concat('测试', NAME_CONST('a',1)))' Skip_Counter: 0 Exec_Master_Log_Pos: 4167 Relay_Log_Space: 4292 Until_Condition: None Until_Log_File: Until_Log_Pos: 0 Master_SSL_Allowed: No Master_SSL_CA_File: Master_SSL_CA_Path: Master_SSL_Cert: Master_SSL_Cipher: Master_SSL_Key: Seconds_Behind_Master: NULL Master_SSL_Verify_Server_Cert: No Last_IO_Errno: 0 Last_IO_Error: Last_SQL_Errno: 1267 Last_SQL_Error: Error 'Illegal mix of collations (utf8_general_ci,COERCIBLE) and (latin1_swedish_ci,IMPLICIT) for operation 'concat'' on query. Default database: 'test'. Query: 'insert into test values ( NAME_CONST('a',1),concat('测试', NAME_CONST('a',1)))' Replicate_Ignore_Server_Ids: Master_Server_Id: 186068095 Master_UUID: ec98ec0e-7301-11e5-bb77-0010e05f3e06 Master_Info_File: mysql.slave_master_info SQL_Delay: 0 SQL_Remaining_Delay: NULL Slave_SQL_Running_State: Master_Retry_Count: 86400 Master_Bind: Last_IO_Error_Timestamp: Last_SQL_Error_Timestamp: 151015 08:38:03 Master_SSL_Crl: Master_SSL_Crlpath: Retrieved_Gtid_Set: Executed_Gtid_Set: Auto_Position: 0 Replicate_Rewrite_DB: Channel_Name: 1 row in set (0.01 sec) // extract from relay log # at 1634 #151015 8:37:48 server id 186068095 end_log_pos 3940 CRC32 0x57aaa2e8 Query thread_id=2 exec_time=0 error_code=0 SET TIMESTAMP=1444891068/*!*/; create table test(id int,name varchar(20)) /*!*/; # at 1750 #151015 8:37:54 server id 186068095 end_log_pos 4167 CRC32 0x6a05a258 Query thread_id=2 exec_time=0 error_code=0 SET TIMESTAMP=1444891074/*!*/; CREATE DEFINER=`root`@`localhost` PROCEDURE `chen`() begin declare a int; set a = 1; insert into test values (a,concat('测试',a)); end /*!*/; # at 1977 #151015 8:38:03 server id 186068095 end_log_pos 4246 CRC32 0x3d502e89 Query thread_id=2 exec_time=0 error_code=0 SET TIMESTAMP=1444891083/*!*/; BEGIN /*!*/; # at 2056 #151015 8:38:03 server id 186068095 end_log_pos 4400 CRC32 0xcf54e119 Query thread_id=2 exec_time=0 error_code=0 SET TIMESTAMP=1444891083/*!*/; insert into test values ( NAME_CONST('a',1),concat('测试', NAME_CONST('a',1))) /*!*/; # at 2210 #151015 8:38:03 server id 186068095 end_log_pos 4431 CRC32 0x05354eaf Xid = 46 COMMIT/*!*/; SET @@SESSION.GTID_NEXT= 'AUTOMATIC' /* added by mysqlbinlog */ /*!*/; DELIMITER ; # End of log file /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;