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
143c8505
Commit
143c8505
authored
Mar 04, 2003
by
monty@narttu.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for reading variables from binary log.
parent
d0d071dc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
sql/log_event.cc
sql/log_event.cc
+9
-3
No files found.
sql/log_event.cc
View file @
143c8505
...
@@ -2142,10 +2142,12 @@ void User_var_log_event::print(FILE* file, bool short_form, char* last_db)
...
@@ -2142,10 +2142,12 @@ 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
)
int
User_var_log_event
::
exec_event
(
struct
st_relay_log_info
*
rli
)
{
{
Item
*
it
=
0
;
Item
*
it
=
0
;
CHARSET_INFO
*
charset
=
log_cs
;
CHARSET_INFO
*
charset
=
0
;
LEX_STRING
user_var_name
;
LEX_STRING
user_var_name
;
user_var_name
.
str
=
name
;
user_var_name
.
str
=
name
;
user_var_name
.
length
=
name_len
;
user_var_name
.
length
=
name_len
;
double
real_val
;
longlong
int_val
;
if
(
type
!=
ROW_RESULT
)
if
(
type
!=
ROW_RESULT
)
init_sql_alloc
(
&
thd
->
mem_root
,
8192
,
0
);
init_sql_alloc
(
&
thd
->
mem_root
,
8192
,
0
);
...
@@ -2158,12 +2160,16 @@ int User_var_log_event::exec_event(struct st_relay_log_info* rli)
...
@@ -2158,12 +2160,16 @@ int User_var_log_event::exec_event(struct st_relay_log_info* rli)
{
{
switch
(
type
)
{
switch
(
type
)
{
case
REAL_RESULT
:
case
REAL_RESULT
:
double
real_val
;
float8get
(
real_val
,
val
);
float8get
(
real_val
,
val
);
it
=
new
Item_real
(
real_val
);
it
=
new
Item_real
(
real_val
);
val
=
(
char
*
)
&
real_val
;
// Pointer to value in native format
val_len
=
sizeof
(
real_val
);
break
;
break
;
case
INT_RESULT
:
case
INT_RESULT
:
it
=
new
Item_int
((
longlong
)
uint8korr
(
val
));
int_val
=
(
longlong
)
uint8korr
(
val
);
it
=
new
Item_int
(
int_val
);
val
=
(
char
*
)
&
int_val
;
// Pointer to value in native format
val_len
=
sizeof
(
int_val
);
break
;
break
;
case
STRING_RESULT
:
case
STRING_RESULT
:
it
=
new
Item_string
(
val
,
val_len
,
charset
);
it
=
new
Item_string
(
val
,
val_len
,
charset
);
...
...
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