rm -rf 87624 bin/mysqld --initialize-insecure --basedir=$PWD --datadir=$PWD/87624 -v bin/mysqld --basedir=$PWD --datadir=$PWD/87624 --core-file --socket=/tmp/mysql_ushastry.sock --port=3306 --log-error=$PWD/87624/log.err --log-bin --binlog-format=statement --server-id=1 2>&1 & [umshastr@hod03]/export/umesh/server/binaries/GABuilds/mysql-5.7.19: bin/mysql -uroot -S /tmp/mysql_ushastry.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.7.19-log MySQL Community Server (GPL) Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. root@localhost [(none)]> create database test; Query OK, 1 row affected (0.01 sec) root@localhost [(none)]> show master logs; +------------------+-----------+ | Log_name | File_size | +------------------+-----------+ | hod03-bin.000001 | 313 | +------------------+-----------+ 1 row in set (0.00 sec) root@localhost [(none)]> flush logs; Query OK, 0 rows affected (0.01 sec) root@localhost [(none)]> use test Database changed root@localhost [test]> set session binlog_format=STATEMENT; CREATE TABLE t1 ( id int(11) DEFAULT NULL, nm varchar(10) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE t11 ( id int(11) DEFAULT NULL, nm varchar(10) DEFAULT NULL, cmt varchar(300) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; delimiter // CREATE DEFINER=root@localhost PROCEDURE sp_test_t11_ins() BEGIN DECLARE v_id INT; SET v_id=2017; Query OK, 0 rows affected (0.00 sec) root@localhost [test]> CREATE TABLE t1 ( -> id int(11) DEFAULT NULL, -> nm varchar(10) DEFAULT NULL -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; Query OK, 0 rows affected (0.00 sec) root@localhost [test]> root@localhost [test]> CREATE TABLE t11 ( -> id int(11) DEFAULT NULL, -> nm varchar(10) DEFAULT NULL, -> cmt varchar(300) DEFAULT NULL -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; Query OK, 0 rows affected (0.00 sec) root@localhost [test]> root@localhost [test]> delimiter // root@localhost [test]> CREATE DEFINER=root@localhost PROCEDURE sp_test_t11_ins() -> BEGIN -> DECLARE v_id INT; -> SET v_id=2017; -> INSERT INTO test.t11 (id,nm, cmt) -> SELECT -> id -> ,nm -> ,CONCAT( v_id, ' ???????') AS cmt -> FROM test.t1; -> END; -> // Query OK, 0 rows affected (0.00 sec) root@localhost [test]> delimiter ; root@localhost [test]> root@localhost [test]> insert into t1 values(1,'aaa'); Query OK, 1 row affected (0.01 sec) root@localhost [test]> CALL test.sp_test_t11_ins(); Query OK, 1 row affected (0.00 sec) root@localhost [test]> select * from t11; +------+------+----------------------------+ | id | nm | cmt | +------+------+----------------------------+ | 1 | aaa | 2017 ??????? | +------+------+----------------------------+ 1 row in set (0.00 sec) root@localhost [test]> show master status; +------------------+----------+--------------+------------------+-------------------+ | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set | +------------------+----------+--------------+------------------+-------------------+ | hod03-bin.000002 | 1732 | | | | +------------------+----------+--------------+------------------+-------------------+ 1 row in set (0.00 sec) root@localhost [test]> \q Bye [umshastr@hod03]/export/umesh/server/binaries/GABuilds/mysql-5.7.19: bin/mysqlbinlog -vv -uroot 87624/hod03-bin.000002 /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; # at 4 #170901 9:43:46 server id 1 end_log_pos 123 CRC32 0xd223b8ff Start: binlog v 4, server v 5.7.19-log created 170901 9:43:46 # Warning: this binlog is either in use or was not closed properly. BINLOG ' sg+pWQ8BAAAAdwAAAHsAAAABAAQANS43LjE5LWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAXwAEGggAAAAICAgCAAAACgoKKioAEjQA Af+4I9I= '/*!*/; # at 123 #170901 9:43:46 server id 1 end_log_pos 154 CRC32 0xc23f96f9 Previous-GTIDs # [empty] # at 154 #170901 9:44:02 server id 1 end_log_pos 219 CRC32 0xb88f319f Anonymous_GTID last_committed=0 sequence_number=1 rbr_only=no SET @@SESSION.GTID_NEXT= 'ANONYMOUS'/*!*/; # at 219 #170901 9:44:02 server id 1 end_log_pos 406 CRC32 0x713d5ecd Query thread_id=3 exec_time=0 error_code=0 use `test`/*!*/; SET TIMESTAMP=1504251842/*!*/; SET @@session.pseudo_thread_id=3/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; SET @@session.sql_mode=1436549152/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C utf8 *//*!*/; SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=8/*!*/; SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; CREATE TABLE t1 ( id int(11) DEFAULT NULL, nm varchar(10) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 /*!*/; # at 406 #170901 9:44:02 server id 1 end_log_pos 471 CRC32 0x31287f59 Anonymous_GTID last_committed=1 sequence_number=2 rbr_only=no SET @@SESSION.GTID_NEXT= 'ANONYMOUS'/*!*/; # at 471 #170901 9:44:02 server id 1 end_log_pos 691 CRC32 0xee2df6fd Query thread_id=3 exec_time=0 error_code=0 SET TIMESTAMP=1504251842/*!*/; CREATE TABLE t11 ( id int(11) DEFAULT NULL, nm varchar(10) DEFAULT NULL, cmt varchar(300) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 /*!*/; # at 691 #170901 9:44:02 server id 1 end_log_pos 756 CRC32 0xf2ea617a Anonymous_GTID last_committed=2 sequence_number=3 rbr_only=no SET @@SESSION.GTID_NEXT= 'ANONYMOUS'/*!*/; # at 756 #170901 9:44:02 server id 1 end_log_pos 1071 CRC32 0x054b609a Query thread_id=3 exec_time=0 error_code=0 SET TIMESTAMP=1504251842/*!*/; CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_test_t11_ins`() BEGIN DECLARE v_id INT; SET v_id=2017; INSERT INTO test.t11 (id,nm, cmt) SELECT id ,nm ,CONCAT( v_id, ' ???????') AS cmt FROM test.t1; END /*!*/; # at 1071 #170901 9:44:02 server id 1 end_log_pos 1136 CRC32 0xd5e3710f Anonymous_GTID last_committed=3 sequence_number=4 rbr_only=no SET @@SESSION.GTID_NEXT= 'ANONYMOUS'/*!*/; # at 1136 #170901 9:44:02 server id 1 end_log_pos 1215 CRC32 0xb60c790f Query thread_id=3 exec_time=0 error_code=0 SET TIMESTAMP=1504251842/*!*/; BEGIN /*!*/; # at 1215 #170901 9:44:02 server id 1 end_log_pos 1319 CRC32 0xdbf468ea Query thread_id=3 exec_time=0 error_code=0 SET TIMESTAMP=1504251842/*!*/; insert into t1 values(1,'aaa') /*!*/; # at 1319 #170901 9:44:02 server id 1 end_log_pos 1350 CRC32 0x975e6e88 Xid = 14 COMMIT/*!*/; # at 1350 #170901 9:44:02 server id 1 end_log_pos 1415 CRC32 0x3e5f4288 Anonymous_GTID last_committed=4 sequence_number=5 rbr_only=no SET @@SESSION.GTID_NEXT= 'ANONYMOUS'/*!*/; # at 1415 #170901 9:44:02 server id 1 end_log_pos 1494 CRC32 0xe6f61e27 Query thread_id=3 exec_time=0 error_code=0 SET TIMESTAMP=1504251842/*!*/; BEGIN /*!*/; # at 1494 #170901 9:44:02 server id 1 end_log_pos 1701 CRC32 0x3a24c5b3 Query thread_id=3 exec_time=0 error_code=0 SET TIMESTAMP=1504251842/*!*/; INSERT INTO test.t11 (id,nm, cmt) SELECT id ,nm ,CONCAT( NAME_CONST('v_id',2017), ' ???????') AS cmt FROM test.t1 /*!*/; # at 1701 #170901 9:44:02 server id 1 end_log_pos 1732 CRC32 0x639d0d6d Xid = 18 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*/; [umshastr@hod03]/export/umesh/server/binaries/GABuilds/mysql-5.7.19: bin/mysql -uroot -S /tmp/mysql_ushastry.sock test -e 'drop table t1, t11' [umshastr@hod03]/export/umesh/server/binaries/GABuilds/mysql-5.7.19: bin/mysql -uroot -S /tmp/mysql_ushastry.sock test -e 'drop procedure sp_test_t11_ins' [umshastr@hod03]/export/umesh/server/binaries/GABuilds/mysql-5.7.19: [umshastr@hod03]/export/umesh/server/binaries/GABuilds/mysql-5.7.19: bin/mysqlbinlog -vv -uroot --stop-position=1793 87624/hod03-bin.000002 |bin/mysql -uroot -S /tmp/mysql_ushastry.sock test ERROR 1267 (HY000) at line 92: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation 'concat' [umshastr@hod03]/export/umesh/server/binaries/GABuilds/mysql-5.7.19: [umshastr@hod03]/export/umesh/server/binaries/GABuilds/mysql-5.7.19: