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
653492fb
Commit
653492fb
authored
Aug 22, 2012
by
Michael Widenius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More DBUG_ENTER, to make it easier to find out where free_root(thd->mem_root) is called
parent
0af0e7a7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
sql/log_event.cc
sql/log_event.cc
+13
-9
sql/sql_class.h
sql/sql_class.h
+2
-0
No files found.
sql/log_event.cc
View file @
653492fb
...
@@ -3534,6 +3534,7 @@ int Query_log_event::do_apply_event(Relay_log_info const *rli,
...
@@ -3534,6 +3534,7 @@ int Query_log_event::do_apply_event(Relay_log_info const *rli,
LEX_STRING
new_db
;
LEX_STRING
new_db
;
int
expected_error
,
actual_error
=
0
;
int
expected_error
,
actual_error
=
0
;
HA_CREATE_INFO
db_options
;
HA_CREATE_INFO
db_options
;
DBUG_ENTER
(
"Query_log_event::do_apply_event"
);
/*
/*
Colleagues: please never free(thd->catalog) in MySQL. This would
Colleagues: please never free(thd->catalog) in MySQL. This would
...
@@ -3929,7 +3930,7 @@ end:
...
@@ -3929,7 +3930,7 @@ end:
thd
->
first_successful_insert_id_in_prev_stmt
=
0
;
thd
->
first_successful_insert_id_in_prev_stmt
=
0
;
thd
->
stmt_depends_on_first_successful_insert_id_in_prev_stmt
=
0
;
thd
->
stmt_depends_on_first_successful_insert_id_in_prev_stmt
=
0
;
free_root
(
thd
->
mem_root
,
MYF
(
MY_KEEP_PREALLOC
));
free_root
(
thd
->
mem_root
,
MYF
(
MY_KEEP_PREALLOC
));
return
thd
->
is_slave_error
;
DBUG_RETURN
(
thd
->
is_slave_error
)
;
}
}
int
Query_log_event
::
do_update_pos
(
Relay_log_info
*
rli
)
int
Query_log_event
::
do_update_pos
(
Relay_log_info
*
rli
)
...
@@ -5284,6 +5285,8 @@ int Load_log_event::do_apply_event(NET* net, Relay_log_info const *rli,
...
@@ -5284,6 +5285,8 @@ int Load_log_event::do_apply_event(NET* net, Relay_log_info const *rli,
bool
use_rli_only_for_errors
)
bool
use_rli_only_for_errors
)
{
{
LEX_STRING
new_db
;
LEX_STRING
new_db
;
DBUG_ENTER
(
"Load_log_event::do_apply_event"
);
new_db
.
length
=
db_len
;
new_db
.
length
=
db_len
;
new_db
.
str
=
(
char
*
)
rpl_filter
->
get_rewrite_db
(
db
,
&
new_db
.
length
);
new_db
.
str
=
(
char
*
)
rpl_filter
->
get_rewrite_db
(
db
,
&
new_db
.
length
);
thd
->
set_db
(
new_db
.
str
,
new_db
.
length
);
thd
->
set_db
(
new_db
.
str
,
new_db
.
length
);
...
@@ -5524,7 +5527,7 @@ error:
...
@@ -5524,7 +5527,7 @@ error:
Error '%s' running LOAD DATA INFILE on table '%s'. Default database: '%s'"
,
Error '%s' running LOAD DATA INFILE on table '%s'. Default database: '%s'"
,
err
,
(
char
*
)
table_name
,
print_slave_db_safe
(
remember_db
));
err
,
(
char
*
)
table_name
,
print_slave_db_safe
(
remember_db
));
free_root
(
thd
->
mem_root
,
MYF
(
MY_KEEP_PREALLOC
));
free_root
(
thd
->
mem_root
,
MYF
(
MY_KEEP_PREALLOC
));
return
1
;
DBUG_RETURN
(
1
)
;
}
}
free_root
(
thd
->
mem_root
,
MYF
(
MY_KEEP_PREALLOC
));
free_root
(
thd
->
mem_root
,
MYF
(
MY_KEEP_PREALLOC
));
...
@@ -5539,10 +5542,10 @@ Error '%s' running LOAD DATA INFILE on table '%s'. Default database: '%s'",
...
@@ -5539,10 +5542,10 @@ Error '%s' running LOAD DATA INFILE on table '%s'. Default database: '%s'",
rli
->
report
(
ERROR_LEVEL
,
ER_SLAVE_FATAL_ERROR
,
rli
->
report
(
ERROR_LEVEL
,
ER_SLAVE_FATAL_ERROR
,
ER
(
ER_SLAVE_FATAL_ERROR
),
buf
);
ER
(
ER_SLAVE_FATAL_ERROR
),
buf
);
return
1
;
DBUG_RETURN
(
1
)
;
}
}
return
(
use_rli_only_for_errors
?
0
:
Log_event
::
do_apply_event
(
rli
)
);
DBUG_RETURN
(
use_rli_only_for_errors
?
0
:
Log_event
::
do_apply_event
(
rli
)
);
}
}
#endif
#endif
...
@@ -6486,15 +6489,16 @@ int User_var_log_event::do_apply_event(Relay_log_info const *rli)
...
@@ -6486,15 +6489,16 @@ int User_var_log_event::do_apply_event(Relay_log_info const *rli)
{
{
Item
*
it
=
0
;
Item
*
it
=
0
;
CHARSET_INFO
*
charset
;
CHARSET_INFO
*
charset
;
DBUG_ENTER
(
"User_var_log_event::do_apply_event"
);
if
(
rli
->
deferred_events_collecting
)
if
(
rli
->
deferred_events_collecting
)
{
{
set_deferred
();
set_deferred
();
return
rli
->
deferred_events
->
add
(
this
);
DBUG_RETURN
(
rli
->
deferred_events
->
add
(
this
)
);
}
}
if
(
!
(
charset
=
get_charset
(
charset_number
,
MYF
(
MY_WME
))))
if
(
!
(
charset
=
get_charset
(
charset_number
,
MYF
(
MY_WME
))))
return
1
;
DBUG_RETURN
(
1
)
;
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
;
...
@@ -6540,7 +6544,7 @@ int User_var_log_event::do_apply_event(Relay_log_info const *rli)
...
@@ -6540,7 +6544,7 @@ int User_var_log_event::do_apply_event(Relay_log_info const *rli)
case
ROW_RESULT
:
case
ROW_RESULT
:
default:
default:
DBUG_ASSERT
(
0
);
DBUG_ASSERT
(
0
);
return
0
;
DBUG_RETURN
(
0
)
;
}
}
}
}
...
@@ -6554,7 +6558,7 @@ int User_var_log_event::do_apply_event(Relay_log_info const *rli)
...
@@ -6554,7 +6558,7 @@ int User_var_log_event::do_apply_event(Relay_log_info const *rli)
error.
error.
*/
*/
if
(
e
->
fix_fields
(
thd
,
0
))
if
(
e
->
fix_fields
(
thd
,
0
))
return
1
;
DBUG_RETURN
(
1
)
;
/*
/*
A variable can just be considered as a table with
A variable can just be considered as a table with
...
@@ -6566,7 +6570,7 @@ int User_var_log_event::do_apply_event(Relay_log_info const *rli)
...
@@ -6566,7 +6570,7 @@ int User_var_log_event::do_apply_event(Relay_log_info const *rli)
if
(
!
is_deferred
())
if
(
!
is_deferred
())
free_root
(
thd
->
mem_root
,
0
);
free_root
(
thd
->
mem_root
,
0
);
return
0
;
DBUG_RETURN
(
0
)
;
}
}
int
User_var_log_event
::
do_update_pos
(
Relay_log_info
*
rli
)
int
User_var_log_event
::
do_update_pos
(
Relay_log_info
*
rli
)
...
...
sql/sql_class.h
View file @
653492fb
...
@@ -1844,6 +1844,7 @@ public:
...
@@ -1844,6 +1844,7 @@ public:
MEM_ROOT
mem_root
;
// Transaction-life memory allocation pool
MEM_ROOT
mem_root
;
// Transaction-life memory allocation pool
void
cleanup
()
void
cleanup
()
{
{
DBUG_ENTER
(
"thd::cleanup"
);
changed_tables
=
0
;
changed_tables
=
0
;
savepoints
=
0
;
savepoints
=
0
;
/*
/*
...
@@ -1855,6 +1856,7 @@ public:
...
@@ -1855,6 +1856,7 @@ public:
if
(
!
xid_state
.
rm_error
)
if
(
!
xid_state
.
rm_error
)
xid_state
.
xid
.
null
();
xid_state
.
xid
.
null
();
free_root
(
&
mem_root
,
MYF
(
MY_KEEP_PREALLOC
));
free_root
(
&
mem_root
,
MYF
(
MY_KEEP_PREALLOC
));
DBUG_VOID_RETURN
;
}
}
my_bool
is_active
()
my_bool
is_active
()
{
{
...
...
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