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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
9257a27c
Commit
9257a27c
authored
Mar 05, 2003
by
monty@mashka.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed character set bug when replicating user variables
parent
78dff8fc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
13 deletions
+17
-13
sql/log_event.cc
sql/log_event.cc
+17
-13
No files found.
sql/log_event.cc
View file @
9257a27c
...
...
@@ -2030,6 +2030,7 @@ User_var_log_event::User_var_log_event(const char* buf, bool old_format)
if
(
is_null
)
{
type
=
STRING_RESULT
;
charset_number
=
my_charset_bin
.
number
;
val_len
=
0
;
val
=
0
;
}
...
...
@@ -2050,15 +2051,22 @@ int User_var_log_event::write_data(IO_CACHE* file)
char
buf
[
UV_NAME_LEN_SIZE
];
char
buf1
[
UV_VAL_IS_NULL
+
UV_VAL_TYPE_SIZE
+
UV_CHARSET_NUMBER_SIZE
+
UV_VAL_LEN_SIZE
];
char
buf2
[
8
];
char
*
pos
=
buf2
;
char
buf2
[
8
],
*
pos
=
buf2
;
uint
buf1_length
;
int4store
(
buf
,
name_len
);
buf1
[
0
]
=
is_null
;
if
(
!
is_null
)
if
((
buf1
[
0
]
=
is_null
))
{
buf1_length
=
1
;
val_len
=
0
;
}
else
{
buf1
[
1
]
=
type
;
int4store
(
buf1
+
2
,
charset_number
);
int4store
(
buf1
+
2
+
UV_CHARSET_NUMBER_SIZE
,
val_len
);
buf1_length
=
10
;
switch
(
type
)
{
case
REAL_RESULT
:
...
...
@@ -2075,17 +2083,14 @@ int User_var_log_event::write_data(IO_CACHE* file)
DBUG_ASSERT
(
1
);
return
0
;
}
return
(
my_b_safe_write
(
file
,
(
byte
*
)
buf
,
sizeof
(
buf
))
||
my_b_safe_write
(
file
,
(
byte
*
)
name
,
name_len
)
||
my_b_safe_write
(
file
,
(
byte
*
)
buf1
,
sizeof
(
buf1
))
||
my_b_safe_write
(
file
,
(
byte
*
)
pos
,
val_len
));
}
return
(
my_b_safe_write
(
file
,
(
byte
*
)
buf
,
sizeof
(
buf
))
||
my_b_safe_write
(
file
,
(
byte
*
)
name
,
name_len
)
||
my_b_safe_write
(
file
,
(
byte
*
)
buf1
,
1
));
my_b_safe_write
(
file
,
(
byte
*
)
buf1
,
buf1_length
)
||
my_b_safe_write
(
file
,
(
byte
*
)
pos
,
val_len
));
}
/*****************************************************************************
User_var_log_event::print()
...
...
@@ -2142,7 +2147,7 @@ void User_var_log_event::print(FILE* file, bool short_form, char* last_db)
int
User_var_log_event
::
exec_event
(
struct
st_relay_log_info
*
rli
)
{
Item
*
it
=
0
;
CHARSET_INFO
*
charset
=
0
;
CHARSET_INFO
*
charset
=
get_charset
(
charset_number
,
MYF
(
0
))
;
LEX_STRING
user_var_name
;
user_var_name
.
str
=
name
;
user_var_name
.
length
=
name_len
;
...
...
@@ -2179,7 +2184,6 @@ int User_var_log_event::exec_event(struct st_relay_log_info* rli)
DBUG_ASSERT
(
1
);
return
0
;
}
charset
=
get_charset
(
charset_number
,
MYF
(
0
));
}
Item_func_set_user_var
e
(
user_var_name
,
it
);
e
.
fix_fields
(
thd
,
0
,
0
);
...
...
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