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
5841af19
Commit
5841af19
authored
Jul 05, 2012
by
Andrei Elkin
Browse files
Options
Browse Files
Download
Plain Diff
merge bug14275000 fixes to 5.5
parents
fb3e11d0
e3c8fb4a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
5 deletions
+29
-5
sql/log_event.cc
sql/log_event.cc
+13
-5
sql/log_event.h
sql/log_event.h
+16
-0
No files found.
sql/log_event.cc
View file @
5841af19
...
...
@@ -5767,6 +5767,9 @@ User_var_log_event::
User_var_log_event
(
const
char
*
buf
,
const
Format_description_log_event
*
description_event
)
:
Log_event
(
buf
,
description_event
)
#ifndef MYSQL_CLIENT
,
deferred
(
false
)
#endif
{
/* The Post-Header is empty. The Variable Data part begins immediately. */
const
char
*
start
=
buf
;
...
...
@@ -6002,7 +6005,10 @@ int User_var_log_event::do_apply_event(Relay_log_info const *rli)
CHARSET_INFO
*
charset
;
if
(
rli
->
deferred_events_collecting
)
{
set_deferred
();
return
rli
->
deferred_events
->
add
(
this
);
}
if
(
!
(
charset
=
get_charset
(
charset_number
,
MYF
(
MY_WME
))))
return
1
;
...
...
@@ -6054,7 +6060,8 @@ int User_var_log_event::do_apply_event(Relay_log_info const *rli)
return
0
;
}
}
Item_func_set_user_var
e
(
user_var_name
,
it
);
Item_func_set_user_var
*
e
=
new
Item_func_set_user_var
(
user_var_name
,
it
);
/*
Item_func_set_user_var can't substitute something else on its place =>
0 can be passed as last argument (reference on item)
...
...
@@ -6063,7 +6070,7 @@ int User_var_log_event::do_apply_event(Relay_log_info const *rli)
crash the server, so if fix fields fails, we just return with an
error.
*/
if
(
e
.
fix_fields
(
thd
,
0
))
if
(
e
->
fix_fields
(
thd
,
0
))
return
1
;
/*
...
...
@@ -6071,9 +6078,10 @@ int User_var_log_event::do_apply_event(Relay_log_info const *rli)
a single record and with a single column. Thus, like
a column value, it could always have IMPLICIT derivation.
*/
e
.
update_hash
(
val
,
val_len
,
type
,
charset
,
DERIVATION_IMPLICIT
,
e
->
update_hash
(
val
,
val_len
,
type
,
charset
,
DERIVATION_IMPLICIT
,
(
flags
&
User_var_log_event
::
UNSIGNED_F
));
free_root
(
thd
->
mem_root
,
0
);
if
(
!
is_deferred
())
free_root
(
thd
->
mem_root
,
0
);
return
0
;
}
...
...
sql/log_event.h
View file @
5841af19
...
...
@@ -2562,14 +2562,23 @@ public:
Item_result
type
;
uint
charset_number
;
bool
is_null
;
<<<<<<<
TREE
uchar
flags
;
#ifdef MYSQL_SERVER
=======
#ifndef MYSQL_CLIENT
bool
deferred
;
>>>>>>>
MERGE
-
SOURCE
User_var_log_event
(
THD
*
thd_arg
,
char
*
name_arg
,
uint
name_len_arg
,
char
*
val_arg
,
ulong
val_len_arg
,
Item_result
type_arg
,
uint
charset_number_arg
,
uchar
flags_arg
)
:
Log_event
(),
name
(
name_arg
),
name_len
(
name_len_arg
),
val
(
val_arg
),
val_len
(
val_len_arg
),
type
(
type_arg
),
charset_number
(
charset_number_arg
),
<<<<<<<
TREE
flags
(
flags_arg
)
=======
deferred
(
false
)
>>>>>>>
MERGE
-
SOURCE
{
is_null
=
!
val
;
}
void
pack_info
(
Protocol
*
protocol
);
#else
...
...
@@ -2582,6 +2591,13 @@ public:
Log_event_type
get_type_code
()
{
return
USER_VAR_EVENT
;}
#ifdef MYSQL_SERVER
bool
write
(
IO_CACHE
*
file
);
/*
Getter and setter for deferred User-event.
Returns true if the event is not applied directly
and which case the applier adjusts execution path.
*/
bool
is_deferred
()
{
return
deferred
;
}
void
set_deferred
()
{
deferred
=
val
;
}
#endif
bool
is_valid
()
const
{
return
1
;
}
...
...
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