Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
8c369a47
Commit
8c369a47
authored
Nov 16, 2006
by
bar@bar.intranet.mysql.r18.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/usr/home/bar/mysql-5.0.b23619
into mysql.com:/usr/home/bar/mysql-5.1.b23619
parents
a265af42
d3603eb1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
6 deletions
+58
-6
mysql-test/r/rpl_charset_sjis.result
mysql-test/r/rpl_charset_sjis.result
+26
-0
mysql-test/t/rpl_charset_sjis.test
mysql-test/t/rpl_charset_sjis.test
+25
-0
sql/log_event.cc
sql/log_event.cc
+1
-1
sql/sp_head.cc
sql/sp_head.cc
+6
-5
No files found.
mysql-test/r/rpl_charset_sjis.result
0 → 100644
View file @
8c369a47
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;
mysql-test/t/rpl_charset_sjis.test
0 → 100644
View file @
8c369a47
source
include
/
have_sjis
.
inc
;
source
include
/
master
-
slave
.
inc
;
--
disable_warnings
drop
table
if
exists
t1
;
drop
procedure
if
exists
p1
;
--
enable_warnings
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 ---"
;
select
hex
(
a
)
from
t1
;
sync_slave_with_master
;
connection
slave
;
select
"--- on slave ---"
;
select
hex
(
a
)
from
t1
;
connection
master
;
drop
table
t1
;
drop
procedure
p1
;
sync_slave_with_master
;
connection
master
;
# End of 5.0 tests
sql/log_event.cc
View file @
8c369a47
...
...
@@ -358,7 +358,7 @@ append_query_string(CHARSET_INFO *csinfo,
else
{
*
ptr
++=
'\''
;
ptr
+=
escape_string_for_mysql
(
from
->
charset
()
,
ptr
,
0
,
ptr
+=
escape_string_for_mysql
(
csinfo
,
ptr
,
0
,
from
->
ptr
(),
from
->
length
());
*
ptr
++=
'\''
;
}
...
...
sql/sp_head.cc
View file @
8c369a47
...
...
@@ -93,7 +93,7 @@ sp_map_item_type(enum enum_field_types type)
*/
static
String
*
sp_get_item_value
(
Item
*
item
,
String
*
str
)
sp_get_item_value
(
THD
*
thd
,
Item
*
item
,
String
*
str
)
{
Item_result
result_type
=
item
->
result_type
();
...
...
@@ -113,15 +113,16 @@ sp_get_item_value(Item *item, String *str)
{
char
buf_holder
[
STRING_BUFFER_USUAL_SIZE
];
String
buf
(
buf_holder
,
sizeof
(
buf_holder
),
result
->
charset
());
CHARSET_INFO
*
cs
=
thd
->
variables
.
character_set_client
;
/* We must reset length of the buffer, because of String specificity. */
buf
.
length
(
0
);
buf
.
append
(
'_'
);
buf
.
append
(
result
->
charset
()
->
csname
);
if
(
result
->
charset
()
->
escape_with_backslash_is_dangerous
)
if
(
cs
->
escape_with_backslash_is_dangerous
)
buf
.
append
(
' '
);
append_query_string
(
result
->
charset
()
,
result
,
&
buf
);
append_query_string
(
cs
,
result
,
&
buf
);
str
->
copy
(
buf
);
return
str
;
...
...
@@ -900,7 +901,7 @@ subst_spvars(THD *thd, sp_instr *instr, LEX_STRING *query_str)
val
=
(
*
splocal
)
->
this_item
();
DBUG_PRINT
(
"info"
,
(
"print %p"
,
val
));
str_value
=
sp_get_item_value
(
val
,
&
str_value_holder
);
str_value
=
sp_get_item_value
(
thd
,
val
,
&
str_value_holder
);
if
(
str_value
)
res
|=
qbuf
.
append
(
*
str_value
);
else
...
...
@@ -1477,7 +1478,7 @@ sp_head::execute_function(THD *thd, Item **argp, uint argcount,
if
(
arg_no
)
binlog_buf
.
append
(
','
);
str_value
=
sp_get_item_value
(
nctx
->
get_item
(
arg_no
),
str_value
=
sp_get_item_value
(
thd
,
nctx
->
get_item
(
arg_no
),
&
str_value_holder
);
if
(
str_value
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment