mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
a5de478d51
Problem: when embedding a character string with introducer with charset X into a SQL query which is generally in character set Y, the string constants were escaped according to their own character set (i.e.X), then after reading such a "mixed" query from binlog, the string constants were unescaped using character set of the query (i.e. Y), instead of X, which gave wrong results or even syntax errors with tricky charsets (e.g. sjis) Fix: when embedding a string constant of charset X into a query of charset Y, the string constant is now escaped according to character Y, instead of its own character set X.
26 lines
608 B
Text
26 lines
608 B
Text
stop slave;
|
||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||
reset master;
|
||
reset slave;
|
||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||
start slave;
|
||
drop table if exists t1;
|
||
drop procedure if exists p1;
|
||
create table t1 (a varchar(255) character set sjis);
|
||
create procedure p1 (in a varchar(255) character set sjis) insert into t1 values (a);
|
||
SET NAMES binary;
|
||
CALL p1 ('–\\');
|
||
select "--- on master ---";
|
||
--- on master ---
|
||
--- on master ---
|
||
select hex(a) from t1 ;
|
||
hex(a)
|
||
965C
|
||
select "--- on slave ---";
|
||
--- on slave ---
|
||
--- on slave ---
|
||
select hex(a) from t1;
|
||
hex(a)
|
||
965C
|
||
drop table t1;
|
||
drop procedure p1;
|