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
6b19cd56
Commit
6b19cd56
authored
Mar 26, 2013
by
Andrei Elkin
Browse files
Options
Browse Files
Download
Plain Diff
merge from 5.1
parents
61b1d076
c7303ae5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
sql/log_event.cc
sql/log_event.cc
+9
-2
sql/log_event.h
sql/log_event.h
+6
-1
No files found.
sql/log_event.cc
View file @
6b19cd56
...
...
@@ -5848,7 +5848,7 @@ User_var_log_event(const char* buf, uint event_len,
const
Format_description_log_event
*
description_event
)
:
Log_event
(
buf
,
description_event
)
#ifndef MYSQL_CLIENT
,
deferred
(
false
)
,
deferred
(
false
)
,
query_id
(
0
)
#endif
{
bool
error
=
false
;
...
...
@@ -6121,11 +6121,16 @@ int User_var_log_event::do_apply_event(Relay_log_info const *rli)
{
Item
*
it
=
0
;
CHARSET_INFO
*
charset
;
query_id_t
sav_query_id
;
/* memorize orig id when deferred applying */
if
(
rli
->
deferred_events_collecting
)
{
set_deferred
();
set_deferred
(
current_thd
->
query_id
);
return
rli
->
deferred_events
->
add
(
this
);
}
else
if
(
is_deferred
())
{
sav_query_id
=
current_thd
->
query_id
;
current_thd
->
query_id
=
query_id
;
/* recreating original time context */
}
if
(
!
(
charset
=
get_charset
(
charset_number
,
MYF
(
MY_WME
))))
...
...
@@ -6201,6 +6206,8 @@ int User_var_log_event::do_apply_event(Relay_log_info const *rli)
(
flags
&
User_var_log_event
::
UNSIGNED_F
));
if
(
!
is_deferred
())
free_root
(
thd
->
mem_root
,
0
);
else
current_thd
->
query_id
=
sav_query_id
;
/* restore current query's context */
return
0
;
}
...
...
sql/log_event.h
View file @
6b19cd56
...
...
@@ -2605,6 +2605,7 @@ class User_var_log_event: public Log_event
uchar
flags
;
#ifdef MYSQL_SERVER
bool
deferred
;
query_id_t
query_id
;
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
)
...
...
@@ -2629,7 +2630,11 @@ class User_var_log_event: public Log_event
and which case the applier adjusts execution path.
*/
bool
is_deferred
()
{
return
deferred
;
}
void
set_deferred
()
{
deferred
=
true
;
}
/*
In case of the deffered applying the variable instance is flagged
and the parsing time query id is stored to be used at applying time.
*/
void
set_deferred
(
query_id_t
qid
)
{
deferred
=
true
;
query_id
=
qid
;
}
#endif
bool
is_valid
()
const
{
return
name
!=
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