RESET MASTER;
SET NAMES gb18030;
CREATE TABLE t1 (
f1 BLOB
) DEFAULT CHARSET=gb18030;
CREATE PROCEDURE p1(IN val BLOB)
BEGIN
SET @tval = val;
SET @sql_cmd = CONCAT_WS(' ', 'INSERT INTO t1(f1) VALUES(?)');
PREPARE stmt FROM @sql_cmd;
EXECUTE stmt USING @tval;
DEALLOCATE PREPARE stmt;
END|
SET @`tcontent`:='测试binlog复制，测试四字节编码:㐂㐃㐄,焊䏷菡釬';
CALL p1(@`tcontent`);
FLUSH LOGS;
DROP PROCEDURE p1;
RENAME TABLE t1 to t2;
RESET MASTER;
SELECT hex(f1), f1 FROM t2;
hex(f1)	f1
B2E2CAD462696E6C6F67B8B4D6C6A3ACB2E2CAD4CBC4D7D6BDDAB1E0C2EB3A8139EF318139EF328139EF332CBAB882338D36DDD5E246	测试binlog复制，测试四字节编码:㐂㐃㐄,焊䏷菡釬
SELECT hex(f1), f1 FROM t1;
hex(f1)	f1
B2E2CAD462696E6C6F67B8B4D6C6A3ACB2E2CAD4CBC4D7D6BDDAB1E0C2EB3A8139EF318139EF328139EF332CBAB882338D36DDD5E246	测试binlog复制，测试四字节编码:㐂㐃㐄,焊䏷菡釬
DROP PROCEDURE p1;
DROP TABLE t1;
DROP TABLE t2;
